fix(recall): exclude archived pages from the session-start digest#491
Open
boskodev790 wants to merge 1 commit into
Open
fix(recall): exclude archived pages from the session-start digest#491boskodev790 wants to merge 1 commit into
boskodev790 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This was referenced Jul 15, 2026
build_digest filtered claims against _RETRACTED_CLAIM_STATUSES but passed store.list_pages() through unfiltered, so an archived page's title reached every new session's opening context while its claims stayed suppressed. recall is the one surface that runs unprompted on every SessionStart, so the leak lands in every future session's first turn. synthesize already filters PageStatus.ARCHIVED; this brings recall in line with it, and with the rationale already written on _RETRACTED_CLAIM_STATUSES — otherwise the archive control is decorative. only ARCHIVED is filtered: draft and stale pages stay, mirroring the reasoning that keeps contested claims in the claim set.
12e94c7 to
9e61cad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
recall.build_digestnow filters archived pages out of the session-start digest, mirroring the status filter it already applies to claims. onlyPageStatus.ARCHIVEDis excluded — draft and stale pages still appear.Why
fixes #490. claims were filtered against
_RETRACTED_CLAIM_STATUSESbutstore.list_pages()was passed through unfiltered, so an archived page's title kept arriving in every new session's opening context while its claims stayed correctly suppressed.recall is the one surface that runs unprompted on every SessionStart, so the leak reaches every future session's first turn.
synthesize.py:121,124already filtersPageStatus.ARCHIVED, so this brings recall in line with the sibling surface — and with the rationale already written on_RETRACTED_CLAIM_STATUSES(context.py:35): "otherwise the archive/supersede/redact controls are decorative." that argument applies to pages.archiving a page means setting
status: archivedin its frontmatter (the plaintext / obsidian edit path;lifecycle.archiveis claims-only). the status round-trips throughget_pagecorrectly, so this is reachable today.What might break
nothing on disk: no file moves, no field changes shape, and no
kb.*method behaves differently —recallis CLI + SessionStart-hook only, andbuild_digesthas exactly one caller (cli.py:2514).the one visible change for an existing
.vouch/: a KB with archived pages will see those titles disappear fromvouch recalloutput and theN page(s)header count drop accordingly, which is the intent. a KB whose only pages are archived and which has no claims now emits an empty digest, so the SessionStart hook prints nothing instead of an empty pages section.VEP
not a surface change —
recallisn't akb.*method, and the object model, on-disk layout, bundle format and audit-log shape are all untouched. no VEP.Tests
make checkpasses locally (lint + mypy + pytest) — 1379 passed, 49 skipped; ruff clean; mypy clean across 98 source filesCHANGELOG.mdupdated under## [Unreleased]three tests in
tests/test_recall.py, sitting alongside the existingtest_digest_excludes_retracted_claims:test_digest_excludes_archived_pages— verified failing ontestwithout the src changetest_digest_empty_when_only_archived_pages— verified failing ontestwithout the src changetest_digest_keeps_stale_pages— pins that only ARCHIVED is filtered, so a later change can't over-filter draft/staleno ui surface touched, so no screenshots.