Skip to content

fix(recall): exclude archived pages from the session-start digest#491

Open
boskodev790 wants to merge 1 commit into
vouchdev:testfrom
boskodev790:fix/recall-archived-pages
Open

fix(recall): exclude archived pages from the session-start digest#491
boskodev790 wants to merge 1 commit into
vouchdev:testfrom
boskodev790:fix/recall-archived-pages

Conversation

@boskodev790

Copy link
Copy Markdown

What changed

recall.build_digest now filters archived pages out of the session-start digest, mirroring the status filter it already applies to claims. only PageStatus.ARCHIVED is excluded — draft and stale pages still appear.

Why

fixes #490. claims were filtered against _RETRACTED_CLAIM_STATUSES but store.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,124 already filters PageStatus.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: archived in its frontmatter (the plaintext / obsidian edit path; lifecycle.archive is claims-only). the status round-trips through get_page correctly, so this is reachable today.

What might break

nothing on disk: no file moves, no field changes shape, and no kb.* method behaves differently — recall is CLI + SessionStart-hook only, and build_digest has exactly one caller (cli.py:2514).

the one visible change for an existing .vouch/: a KB with archived pages will see those titles disappear from vouch recall output and the N 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 — recall isn't a kb.* method, and the object model, on-disk layout, bundle format and audit-log shape are all untouched. no VEP.

Tests

  • make check passes locally (lint + mypy + pytest) — 1379 passed, 49 skipped; ruff clean; mypy clean across 98 source files
  • New / changed behaviour has a test
  • CHANGELOG.md updated under ## [Unreleased]

three tests in tests/test_recall.py, sitting alongside the existing test_digest_excludes_retracted_claims:

  • test_digest_excludes_archived_pages — verified failing on test without the src change
  • test_digest_empty_when_only_archived_pages — verified failing on test without the src change
  • test_digest_keeps_stale_pages — pins that only ARCHIVED is filtered, so a later change can't over-filter draft/stale

no ui surface touched, so no screenshots.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fcd5ed8a-9560-408f-8d5a-d3ed968c8a02

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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 tests tests and fixtures size: XS less than 50 changed non-doc lines labels 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.
@boskodev790 boskodev790 force-pushed the fix/recall-archived-pages branch from 12e94c7 to 9e61cad Compare July 16, 2026 03:38
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 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