fix(retrieval): the review drops records written after the call it re-runs (#4773)
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 13s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m8s
CI & Build / Python tests (push) Successful in 1m53s
CI & Build / Build & push image (push) Successful in 36s

The first live sample ranked records the call could never have been offered:
the session that made a call writes the decision, often quoting the message,
and that record tops the re-run. Judged, it inflates on_point exactly where
the budget is decided.

- _rerun over-fetches by POSTDATED_SLACK, drops records created after the
  call before ranking, and names them in `postdated`.
- each line carries `changed_since_call` (updated_at or a work log after
  the call) and `logged` (shown fresh then).
- judge_menu shares the re-run, so a post-dated record cannot be judged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 19:42:20 -04:00
co-authored by Claude Opus 5.5
parent 6598c7fa85
commit 5d0e97576b
3 changed files with 109 additions and 14 deletions
+7
View File
@@ -29,6 +29,13 @@ async def menus_to_review(
`missing` names ids the call logged that the re-run no longer finds — the
corpus has moved since. Judge what is in front of you.
The re-run is against today's corpus, so it guards what has been written
since. Records created after the call are left out and named in
`postdated`: the call could not have offered them, and the session that
made it often wrote them, quoting it. A line marked `changed_since_call`
was written to afterwards; if its passage is plainly the later text, leave
it unjudged. `logged` says the line was shown fresh at the time.
JUDGE FROM THE LINE; DO NOT OPEN THE RECORD. Opening counts as a pull and
would credit the arm with an open it never earned. Then record verdicts
with `judge_menu`. `how_to_judge` in the response repeats the vocabulary.