Repository navigation
Closed
Labels
retrievalRetrieval ranking, use telemetry, negative evals, consolidationseverity:highReal defect on a boundary or documented claim; MVP-relevant, bounded blast radius
Description
Part of #334. Reference implementation: branch retrieval-fix-20261107 @ 6f03e2d, commit item (2).
Problem
The epoch froze at the first request of a session: a block scored against prompt 1 rode every later request until a store write or compaction. Two failure modes, both measured: the first topic's rows rode a session that had moved on (precision), and rows matching a later prompt never arrived (recall). This was the accepted staleness policy from #162/#165 — the cache argument. The benchmark shows the cost: it is one reason pass-2 could not recover guidance even when a later turn asked about it.
Change
refreshEpoch's cheap pre-check becomescached.version === version && cached.prompt === prompt. A new prompt re-scores.- The epoch MOVES only when the rendered bytes move; a prompt change that selects the same rows adopts the new fingerprint and prompt in place (no evidence line, no bust).
- New reason
prompt_reveal(evidence + status payload union). Invalidations count any byte-moving recompute of a live epoch, not onlystore_changed.
Acceptance
- Contract tests rewritten (done on the branch): an unrelated prompt ABSTAINS; a same-rows prompt does not bust; evidence shows
firstthenprompt_reveal. - README injection section updated (see docs ticket).
Footguns
- This is a deliberate cache-policy change against P0: every memory write busts the prompt cache — the memory prefix carries bytes the model never needed #162's framing. The reviewer anchor: bytes move only when the SELECTED rows change; ordinary turns and tool-loop requests still hit the pre-check.
- The A session pays a re-prefill for memories it wrote itself — 92% of lifetime cache busts (follow-up on #162) #165 riding-bytes check re-renders with
cached.prompt; when prompt AND store move in the same refresh and the riding check matches, the epoch adopts the store version but keeps the old prompt, so the next refresh re-scores once more. Correct, one extra build, reachable only if a prompt event is lost (LRU eviction). Do not "fix" by rendering the riding check with the new prompt — that would compare bytes scored against different inputs. - Old status files never carry
prompt_reveal; readers must treat unknown reason strings as display-only.
Metadata
Metadata
Assignees
Labels
retrievalRetrieval ranking, use telemetry, negative evals, consolidationseverity:highReal defect on a boundary or documented claim; MVP-relevant, bounded blast radius
Activity
abogartz commentedon Nov 8, 2026
Landed via #361: contract tests (unrelated prompt ABSTAINS, same-rows prompt does not bust, first then prompt_reveal). README injection section is owned by #344, as this ticket's AC states — closing here, docs tracked there.