Skip to content

fix(hot-memory): keep actionable claims in the sidebar#520

Open
jeffrey701 wants to merge 1 commit into
vouchdev:testfrom
jeffrey701:fix/hot-memory-actionable-claims
Open

fix(hot-memory): keep actionable claims in the sidebar#520
jeffrey701 wants to merge 1 commit into
vouchdev:testfrom
jeffrey701:fix/hot-memory-actionable-claims

Conversation

@jeffrey701

@jeffrey701 jeffrey701 commented Jul 17, 2026

Copy link
Copy Markdown

What changed

_is_active in hot_memory now counts actionable as a live status, so
the _meta.vouch_hot_memory sidebar stops skipping actionable claims. the
set is lifted to a module-level _ACTIVE_STATUSES frozenset — the exact
complement of the retired statuses (superseded / archived /
redacted).

Why

the sidebar's live set was working / stable / contested. actionable
was simply left out, and it isn't a retired status: vault_sync treats it
as approved knowledge alongside stable and contested, and synthesize
pairs it with working. hot memory was the only surface that disagreed.

the effect is backwards, and kb.confirm is where it bites. confirm
promotes a working claim to actionable and bumps last_confirmed_at — and
_compute_sidebar ranks on exactly that timestamp. so re-confirming a
claim, which is the strongest signal a human can give that knowledge is
still live, dropped it out of the "what just changed?" sidebar at the
moment it became the freshest thing in the kb. the starter claim
onboarding files is actionable too, so a fresh kb never shows it either.

What might break

nothing on disk, and no kb.* method changes shape — _meta.vouch_hot_memory
is additive and its row shape is untouched. a kb holding actionable claims
will now see them in the sidebar, and because rows are recency-ranked and
capped at limit, a recently-confirmed claim can displace an older one.
that is the intended behaviour. a kb with no actionable claims is
byte-identical.

VEP

not a surface change — no method, model, on-disk layout, bundle or
audit-log shape is touched.

Tests

  • New / changed behaviour has a test
  • CHANGELOG.md updated under ## [Unreleased]
  • make check passes locally (lint + mypy + pytest) — see below

tests/test_hot_memory.py::test_confirmed_claim_stays_in_sidebar walks the
real lifecycle path rather than setting a status by hand: it asserts the
claim is in the sidebar, calls confirm, and asserts it is still there. on
the previous code the second assert gets an empty sidebar back.

what i ran, and what i couldn't:

  • ruff check src tests — clean.
  • mypy src — clean apart from two pre-existing errors this branch doesn't
    touch (sandbox.py:112, os.getuid / os.getgid are posix-only and
    resolve on linux ci).
  • pytest on test_hot_memory, plus volunteer_context, trust,
    salience, openclaw_context_engine, vault_sync and storage (the
    suites that consume hot memory or exercise confirm) — all pass.

i'm on windows and the full suite wedges locally on an unrelated test, so i
leaned on ci for the whole matrix rather than claim a green make check i
didn't see.

Summary by CodeRabbit

  • Bug Fixes
    • Confirmed claims now remain visible in the recent-claims sidebar after becoming actionable.
    • Sidebar results now consistently include all non-retired claim statuses.
    • Updated release documentation to reflect this behavior.

the sidebar's live set was working / stable / contested, which left
actionable out. actionable is not a retired status — vault_sync treats it
as approved knowledge alongside stable and contested, and synthesize pairs
it with working.

the effect was backwards. kb.confirm promotes a working claim to
actionable and bumps last_confirmed_at, and the sidebar ranks on exactly
that timestamp — so re-confirming a claim, the strongest signal it is
still live, dropped it out of the "what just changed?" sidebar at the
moment it became the freshest thing in the kb.

_is_active is now the complement of the retired statuses (superseded /
archived / redacted), so the sidebar agrees with every other read surface
about what is live.

the regression test walks the real lifecycle path: it asserts the claim is
in the sidebar, calls confirm, and asserts it is still there. on the
previous code the sidebar comes back empty.
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 31098811-aa6c-4f39-89f4-91c07fa72cfa

📥 Commits

Reviewing files that changed from the base of the PR and between 74abc8e and 35ae487.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/vouch/hot_memory.py
  • tests/test_hot_memory.py

Walkthrough

The hot-memory sidebar now treats ACTIONABLE claims as active. A regression test verifies that confirming a working claim preserves its sidebar entry while updating its status.

Changes

Hot-memory sidebar status handling

Layer / File(s) Summary
Active status filter
src/vouch/hot_memory.py, CHANGELOG.md
The sidebar uses a dedicated active-status set that includes ClaimStatus.ACTIONABLE; the changelog documents the behavior.
Confirmation regression coverage
tests/test_hot_memory.py
The test confirms a claim remains in the sidebar after confirm(...) and changes from working to actionable.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: jsdevninja, plind-junior

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: actionable claims now remain in the hot-memory sidebar.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added docs documentation, specs, examples, and repo guidance retrieval context, search, synthesis, and evaluation tests tests and fixtures size: XS less than 50 changed non-doc lines labels Jul 17, 2026
@jeffrey701

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation, specs, examples, and repo guidance retrieval context, search, synthesis, and evaluation size: XS less than 50 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants