Skip to content

fix(recall): archived page titles leak into every session-start digest #490

Description

@boskodev790

recall.build_digest filters claims by status but not pages. an archived page's title is injected into the opening context of every new session, while its claims are correctly suppressed.

wheresrc/vouch/recall.py:57-61:

claims = [
    c for c in store.list_claims()
    if c.status not in _RETRACTED_CLAIM_STATUSES
]
pages = store.list_pages()          # <- no status filter

Page.status exists (models.py:337) and synthesize.py:121,124 already filters page.status != PageStatus.ARCHIVED, so recall is the odd surface out.

why it matters — the rationale is already written down on _RETRACTED_CLAIM_STATUSES (context.py:35): "otherwise the archive/supersede/redact controls are decorative." that argument applies to pages. recall is also the one surface that runs unprompted on every SessionStart, so a retracted title reaches every future session's first turn.

repro — 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:

s = KBStore.init(Path("kb"))
pr = propose_page(s, title="obsolete design", body="body", proposed_by="a")
pg = approve(s, pr.id, approved_by="u")
p = s._page_path(pg.id)
p.write_text(p.read_text().replace("status: draft", "status: archived"))

assert s.get_page(pg.id).status is PageStatus.ARCHIVED    # passes
assert "obsolete design" not in recall.build_digest(s)    # fails on test

scope — only ARCHIVED should be filtered. DRAFT and STALE stay live knowledge, mirroring the reasoning that keeps CONTESTED in the claim set.

happy to send the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions