fix(hot-memory): keep actionable claims in the sidebar#520
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughThe hot-memory sidebar now treats ChangesHot-memory sidebar status handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
What changed
_is_activeinhot_memorynow countsactionableas a live status, sothe
_meta.vouch_hot_memorysidebar stops skipping actionable claims. theset is lifted to a module-level
_ACTIVE_STATUSESfrozenset — the exactcomplement of the retired statuses (
superseded/archived/redacted).Why
the sidebar's live set was
working/stable/contested. actionablewas simply left out, and it isn't a retired status:
vault_synctreats itas approved knowledge alongside stable and contested, and
synthesizepairs it with working. hot memory was the only surface that disagreed.
the effect is backwards, and
kb.confirmis where it bites. confirmpromotes a working claim to actionable and bumps
last_confirmed_at— and_compute_sidebarranks on exactly that timestamp. so re-confirming aclaim, 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
onboardingfiles 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_memoryis 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
CHANGELOG.mdupdated under## [Unreleased]make checkpasses locally (lint + mypy + pytest) — see belowtests/test_hot_memory.py::test_confirmed_claim_stays_in_sidebarwalks thereal 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. onthe 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'ttouch (
sandbox.py:112,os.getuid/os.getgidare posix-only andresolve on linux ci).
pytestontest_hot_memory, plusvolunteer_context,trust,salience,openclaw_context_engine,vault_syncandstorage(thesuites 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 checkididn't see.
Summary by CodeRabbit