Skip to content

fix(session-flow): stop three recall eval graders failing correct answers - #15985

Merged
kyle-sexton merged 6 commits into
mainfrom
fix/recall-eval-grader-false-negatives
Nov 13, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix/recall-eval-grader-false-negatives

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

No related issue: grader false negatives found by the eval runs on #15920
session: GitHub Support

Summary

Three regex graders in the eval case plugins/session-flow/evals/recall-reports-tried-kept-reverted/ fail correct answers on wording. The eval passes on #15920 hit this on both sides of a compare (before and after), so it is a property of main and was found before any change was under test.

This changes graders of an existing case, and that is not moving a goalpost:

  • The failed answers are correct. Each one says the token bucket was tried and reverted for dropping requests during bursts, says the sliding window is kept, cites SHAs, and says the PR and tracker skills were unavailable. They are quoted below.
  • The fix lands on main, so both sides of any later compare use the same graders.
  • Every existing failing sample of the three graders is still rejected, along with the wrong answers two independent reviews found. Calibration figures are under Verification.

The real answers that failed:

  • Sonnet before, run 3, failed tried-kept-reverted, unavailable-prs-named and unavailable-tracker-named:

    Other sources: I searched git. The /source-control:pull-request and /work-items:track skills aren't available here, so I searched neither closed PRs nor the tracker.

    Answer: Yes. The in-memory limiter was already replaced once, with a token bucket, and that was reverted because it dropped legitimate requests during bursts. A sliding-window limiter then replaced the in-memory one and is current.

  • Sonnet after, run 2, failed unavailable-prs-named and unavailable-tracker-named:
    • Pull requests and tracker: /source-control:pull-request and /work-items:track aren't available here, so closed PRs and tracker items weren't searched.

Fix

Only case.yaml and samples/ under this one case directory change, plus a changelog fragment. No skill text, prompt or other case changes.

  • unavailable-prs-named, unavailable-tracker-named: both are now model-graded (type: llm, focus: last_message), with the same names and arm: with-only.
    • Each passes only if the reply says its source (closed pull requests through gh or the pull-request skill; the work-item tracker) could not be searched or was not searched, and reports no result from that source.
    • A statement about the other source, about code not yet in a branch, or about a narrower check left undone while results are reported is a FAIL.
    • Why not regex: two regex rounds each closed the tested strings and let the next phrasing through, because a pattern cannot tell which noun a negation belongs to, or see that another clause reports a search that returned results.
  • tried-kept-reverted is split in two:
    • cites-commit-and-burst (regex, arm: both): a 7 to 40 character hex commit id holding a digit is present, and "burst" is mentioned. A pattern decides both without knowing which approach a statement is about. names-both-attempts already checks that both approaches are named.
    • token-bucket-reverted-sliding-window-kept (type: llm, focus: last_message, arm: both): passes only if the reply says the token bucket was reverted because of bursts and the sliding window is the one kept, and nothing in it (a closing summary included) says the token bucket is current, kept, in use, or re-applied after its revert.
    • Why: the relaxed regex at the previous commit passed "The token bucket was reverted in a1b2c3d because it dropped requests during bursts, but it later replaced the sliding window; it is current.", which main fails. A regex cannot tell which noun "current" or "reverted" belongs to; this wrong answer is now a must-fail sample of the judge, which failed it in every run.
  • The case keeps its regex and tool graders (git-searched, names-both-attempts, cites-commit-and-burst), so it is not judge-only.

Samples:

  • cites-commit-and-burst: 5 must-pass and 5 must-fail, checked offline by the validator.
  • token-bucket-reverted-sliding-window-kept: 8 must-pass and 25 must-fail calibration samples. Every earlier tried-kept-reverted sample carries over to the grader that owns its judgment. New must-pass: three correct phrasings the regex rejected (the token bucket and "is current" in one sentence, where "is current" belongs to the sliding window). New must-fail: the wrong answer above, the token bucket restored, re-adopted or remaining in use after the revert, the two approaches reversed, both named with no outcome, a revert reason other than bursts, an answer to a different question, and an empty answer.
  • unavailable-prs-named: 14 must-pass and 35 must-fail calibration samples.
  • unavailable-tracker-named: 12 must-pass and 17 must-fail calibration samples.
  • Both criteria count a read that was attempted and failed as could not be searched, and a search that returned a count, zero included, as a search that ran.
  • Every earlier sample of the two graders carries over. The new ones are the real answers above, the wrong answers both reviews found, and correct phrasings the regex rejected.

A bump: none changelog fragment is included, because scripts/check-changelog-fragments.sh --check-required origin/main requires one for any change under plugins/session-flow/.

Added cost per eval run: two opus judge calls per with-arm run of this case for the with-only graders, plus one per run in either arm for token-bucket-reverted-sliding-window-kept (arm: both). In calibration that was about 0.02 USD per run at list price, including the reproduction call.

Verification

  • Static: plugins/evals/skills/validate/scripts/validate-cases.py plugins/session-flow/evals reports no FAIL. For this case it prints the existing WARN that allowed_tools lists Bash, and one WARN per llm samples file that its answers need judge calibration (33, 49 and 29).

  • Judge calibration: plugins/evals/skills/plugin-eval/scripts/calibrate-judge.py with an opus judge, 3 runs per sample and a haiku agent reproducing each sample:

    Grader Samples Agreement Cost (list price)
    unavailable-tracker-named 28 (12 pass, 16 fail; one empty must-fail sample needs no judge) 84/84 runs (100%)
    unavailable-prs-named 48 (14 pass, 34 fail; one empty must-fail sample needs no judge) 144/144 runs (100%)
    Both, one run at the tip, judge claude-opus-5-5, reproduction agent on the CLI default model 76 228/228 12.31 USD
    token-bucket-reverted-sliding-window-kept, judge claude-opus-5-5, reproduction agent --model haiku 32 (8 pass, 24 fail; one empty must-fail sample needs no judge) 93/93 runs (100%), 0 false positives, 0 false negatives 0.89 USD, 557 s

    In that last run three replies did not reproduce their sample and were left out by the score script (two runs of the real eval answer must-pass sample, one run of a must-fail sample); every sample kept at least one reproduced run.

    An earlier calibration at 64 samples with a haiku reproduction agent cost 3.64 USD and also agreed on every run. The samples added since are replies that ran the read and reported it failed (must-pass), seven cross-source wrong answers, a zero-count search, an empty answer per grader and an answer to a different question.

    In the two unavailable-* calibrations every run reproduced its sample, checked against the kept traces.

  • Real answers: the calibration script grades only labeled samples, so the six kept traces were not re-run through the new judges. The three real answer lines the regex failed are must-pass calibration samples, and the judges passed each in every reproduced run.

  • typos on the case directory: clean.

Known limits:

  • The three judges are calibrated against short answer lines. A full recall report is longer; the judge reads only what the reply says about its own source, and the three real answers are calibrated in full or near full.
  • The outcome judge has two unpinned shapes an independent review named: a reply that says the token bucket "dropped requests during bursts" and the sliding window is current without saying the token bucket was reverted (the criteria list "dropped" as a word for reverted), and a correct reply that adds "its code remains in history" (the criteria fail a token bucket that "remains"). Neither is a calibration sample yet.
  • No sample pins a reply that says "searched" and attaches the failure to that same search ("Searched closed PRs; the command exited 1"); the criterion's definition of a search that ran points it to PASS. An independent review of the last commit found nothing blocking and named this as the one unpinned shape.
  • The tracker grader accepts a tracker read that ran and failed, which is broader than the recall skill: the skill defines a non-zero-exit path for pull requests only.
  • The judge is a model: verdicts can vary between runs. Calibration showed no split, but re-calibrate when the judge model changes.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01RMa43yD6ENjKAwDyeHp3bc

kyle-sexton and others added 3 commits November 13, 2026 10:23
…wers

In recall-reports-tried-kept-reverted, three regex graders failed correct
answers on wording:

- tried-kept-reverted: the "token bucket is current" lookahead now fires
  only when no sliding window is named between the token bucket and "is
  current", so "with a token bucket, ... A sliding-window limiter ... is
  current" no longer reads as the token bucket being current.
- unavailable-prs-named and unavailable-tracker-named: a new alternative
  accepts a contracted or plain negation of availability or search after
  the subject ("aren't available", "isn't an available skill", "weren't
  searched", "did not search"), with the hyphenated pull-request skill
  name. The stretch between subject and negation may not hold "but" or a
  positive search verb, so "PRs were searched, but I didn't search the
  tracker" still fails. The existing alternatives are unchanged.

The real answers that were failed are added as passing samples, with new
failing samples for the wrong readings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa43yD6ENjKAwDyeHp3bc
… through

An independent review found that the first version of this fix accepted
wrong answers that main rejects. Each one is now rejected again and kept
as a failing sample:

- tried-kept-reverted: the "token bucket is current" lookahead also
  fires, as on main, when the token bucket and "is current" sit in one
  sentence. So "the token bucket replaced the sliding window and is
  current" fails, and so do the appositive and rather-than forms.
- unavailable-prs-named and unavailable-tracker-named:
  - The negation form stops at the other source, at "returned", and at
    a comma, period or semicolon, and spans at most four words.
  - An are/were form accepts only a coordinated noun phrase before the
    verb ("gh and the tracker aren't available").
  - "checked into" is not read as a search word.
- unavailable-prs-named: "did not search closed pull requests" is
  accepted directly, which keeps the after-run 1 answer passing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa43yD6ENjKAwDyeHp3bc
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T15:43:17.867192Z 37dd0e6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37dd0e6af1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 267b09fa1249b59a1b0a1ecc00fde981d90c4f43: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review (incremental, 853bebf → 267b09f): no security issues found

I read every hunk of all 3 files in scope:

  • plugins/session-flow/evals/recall-reports-tried-kept-reverted/case.yaml
  • .../samples/cites-commit-and-burst.json (added)
  • .../samples/token-bucket-reverted-sliding-window-kept.json (renamed from tried-kept-reverted.json, with samples added)

This lane already reviewed an earlier head, so this review reports blocking findings only (CRITICAL and IMPORTANT). The change has no security-relevant surface, so the review stops early under skip gate 2.

What changed:

  • One grader split in two. The long tried-kept-reverted regex grader is now two graders:
    • cites-commit-and-burst is a short regex. It needs a hex token of 7 to 40 characters that contains at least one digit, plus the word "burst". It is linear and has no nested quantifiers, so it carries no meaningful backtracking risk.
    • token-bucket-reverted-sliding-window-kept is a type: llm grader with focus: last_message and arm: both.
  • Calibration samples. Pass and fail samples were added or moved to match the new graders.

Why nothing here is a security concern:

  • No trusted path or trust control. None of the 3 files matches a TRUSTED PATHS: glob. The change does not touch the trusted-actor checks, token scope, the kill switch, merge holds or .github/actions/.
  • No plugin manifests and no standing instructions. No plugin.json, marketplace.json, userConfig key, skill or agent body, CLAUDE.md or hook changes.
  • Nothing ships to users. The judge criteria only score model output during the owner's own eval runs. The sample answers are static calibration text; nothing runs them as commands, paths or templates.
  • The judge reads only owner-run output. Its input is the eval agent's reply to a case the owner wrote, not text from an outside party. Steering the judge could at worst skew an eval score; it reaches no credential and no merge gate.

Spend (not a finding): every run of this case now makes one more model judge call, on both arms (arm: both), on top of the two with-only judges from the earlier head. This draws on prepaid API credits only.

Text in the PR description: it contains no instructions aimed at this review.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on 37dd0e6af169478db3e40e44e9359509a6687c7a; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 267b09fa1249b59a1b0a1ecc00fde981d90c4f43: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #15985, changes since 853bebf9

No blocking findings in this push. This lane had already reviewed an earlier head (blocking only: yes), so I report only blocking findings and dropped advisory ones.

Scope. I read every hunk of the three files in scope in .claude-lane/incremental.diff:

  • case.yaml
  • the new samples/cites-commit-and-burst.json
  • samples/tried-kept-reverted.json, renamed to samples/token-bucket-reverted-sliding-window-kept.json

For context I also read the whole case.yaml and the renamed samples file at head. The PR has no closing issue, so there were no acceptance criteria to check. No plugin manifest changed.

What changed. The regex grader tried-kept-reverted is replaced by two graders, both with arm: both:

  • cites-commit-and-burst (regex) checks only that the reply has a hex token of 7 to 40 characters containing a digit, and the word burst.
  • token-bucket-reverted-sliding-window-kept (llm, focus: last_message) judges which rate limiter was reverted and which was kept. Its criterion explicitly leaves commit hashes out, so the two graders split the work without overlap.

The case still has regex and tool graders, so it is not judge-only.

Samples, checked by hand:

  • Each samples file matches its grader's name.
  • The old "no SHA cited" must-fail sample moved to cites-commit-and-burst.json. That fits, because the new judge's criterion says not to judge hashes.
  • The two phrasings the PR body listed under "Known limits" are now must-pass samples:
    • "replaced by the sliding window, which is current"
    • "reverted after bursts, and the sliding window is current"
  • The "remains in use" and restored or re-adopted gap is now covered by must-fail samples and by the criterion text.
  • I traced each regex sample by hand: the pass samples contain a hex token with a digit plus burst, and the fail samples lack one or the other (deadbeef has no digit).
  • Every llm pass and fail sample I read agrees with the criterion text.

Not verified: I did not run the validator or judge calibration for the new llm grader, because this lane can't run either. The PR body's calibration figures cover only the two unavailable-* graders, and its "Fix" section still says tried-kept-reverted stays regex. The body predates this push.

Spend: one more opus judge call per run of this case, on both arms. That makes three judge calls per with-arm run and one per without-arm run, drawn from prepaid API credit. This isn't a hold, and the PR body's cost line predates the change.

Verifier dropped 0 of 0 candidates.

kyle-sexton and others added 3 commits November 13, 2026 11:11
… model

A second independent review found that the reworked regex graders
unavailable-prs-named and unavailable-tracker-named still accepted 15
wrong answers that main rejects. A pattern cannot tell which noun a
negation belongs to, or that another clause reports a search that
returned results, so each regex round closed the tested strings and let
the next phrasing through.

Both are now llm graders (focus last_message, arm with-only, same
names). Each passes only if the reply says its source could not be or
was not searched and reports no result from that source.

Calibration samples: every earlier sample carries over, plus the
reviews' wrong answers and the correct phrasings the regex rejected
(prs 12 pass / 29 fail, tracker 11 pass / 12 fail). With an opus judge
and 3 runs per sample, agreement was 123/123 and 69/69.

tried-kept-reverted stays regex as at the previous commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa43yD6ENjKAwDyeHp3bc
…aders

The two model-graded unavailable-source graders failed a reply that ran
the pull-request or tracker read and reported that it failed, which is
the answer the recall skill asks for when the read exits non-zero. The
criteria now say an attempted read that failed counts as could not be
searched, and that a search that ran is one that returned results or a
count, zero included.

Samples added: the failed-read replies as must-pass, the earlier
review's seven cross-source wrong answers and a zero-count search as
must-fail, an empty answer for each grader and an answer to a different
question for the tracker grader.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa43yD6ENjKAwDyeHp3bc
…a model

The relaxed tried-kept-reverted regex passed a wrong answer that main
fails: "The token bucket was reverted in a1b2c3d because it dropped
requests during bursts, but it later replaced the sliding window; it is
current." A pattern cannot tell which approach "current" or "reverted"
belongs to.

The grader is split:

- cites-commit-and-burst (regex, arm both): a hex commit id with a digit
  is present and bursts are mentioned.
- token-bucket-reverted-sliding-window-kept (llm, focus last_message,
  arm both): the token bucket was reverted because of bursts, the
  sliding window is kept, and nothing says the token bucket is current,
  kept, in use or re-applied after its revert.

Every earlier sample carries over to the grader that owns its judgment.
The judge adds the wrong answer above, restore, re-adopt and remains-in-
use variants, a reversal, both named with no outcome, a wrong revert
reason, a different-question answer and an empty answer as must-fail,
and three correct phrasings the regex rejected as must-pass (8 pass,
25 fail). With an opus judge, a haiku reproduction agent and 3 runs per
sample, agreement was 93/93 with no false positives, for 0.89 USD.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RMa43yD6ENjKAwDyeHp3bc
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 3e18146 Nov 13, 2026
72 checks passed
@kyle-sexton
kyle-sexton deleted the fix/recall-eval-grader-false-negatives branch November 13, 2026 19:57
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant