Skip to content

Epoch re-scores on new prompts (prompt_reveal); the freeze hid later-topic rows #340

Closed

Description

@abogartz

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

  1. refreshEpoch's cheap pre-check becomes cached.version === version && cached.prompt === prompt. A new prompt re-scores.
  2. 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).
  3. New reason prompt_reveal (evidence + status payload union). Invalidations count any byte-moving recompute of a live epoch, not only store_changed.

Acceptance

  • Contract tests rewritten (done on the branch): an unrelated prompt ABSTAINS; a same-rows prompt does not bust; evidence shows first then prompt_reveal.
  • README injection section updated (see docs ticket).

Footguns

Activity

  1. added
    retrieval
    severity:high
    on Nov 7, 2026
  2. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    retrievalseverity:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions