Repository navigation
fix(evals): keep a reply's opening prose when only calls follow the leading reads - #351
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
claude.sh unsets every CLAUDE* and ANTHROPIC* variable, which also removes a login that lives in the environment (a config directory or gateway token). EOR_KEEP_ENV lists variable names to keep. The default is unchanged.
…eading reads With allowRead, afterLeadingReads dropped prose that came before a read-only call. A reply with a status line, a read-only call and an acting call, and no prose after them, lost its status line, so a correct reply could fail a required pattern. That reply is now graded whole.
bompus
force-pushed
the
eval-grader-leading-prose-20261017
branch
from
October 17, 2026 21:59
8b0603d to
c49ca7e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
allowRead,afterLeadingReadsinevals/end-of-reply/grade.mjsgrades only the text after the leading read-only calls and treats text before the first call as narration. A reply that opens with a status line, then makes a read-only call (for exampledate +%Z), then an acting call (start a watcher), and has no prose after those calls, loses its status line. A required pattern on that line then fails a correct reply. I saw this on a Sonnet run of the periodic-updates launch scenario: the reply said "ETA is about 68-81 minutes ... based on the last two full runs" and was graded as if it said nothing.The fix: when the only prose in the reply comes before the first call and nothing but tool calls follow the leading reads,
afterLeadingReadsreturns the whole reply. Every other shape is unchanged: narration before reads is still dropped when prose follows them, a reads-only reply is still graded whole, and a reply with no prose before the reads still grades the acting call alone.Changes:
evals/end-of-reply/grade.mjs: 5 lines inafterLeadingReadsplus its header comment.test/grade.test.mjs: two newafterLeadingReadscases (status line kept; no status line, acting call alone, as before) and agrade()check that a required pattern matches the status line and a non-matching one still fails.CHANGELOG.md: an Unreleased entry marked repository only.Proof I ran:
afterLeadingReadsreturns only the watcher call). After it,test/grade.test.mjshas 23 pass, 0 fail.node --test test/*.test.mjs: 179 pass, 0 fail, 7 skipped (exit 0).bun test test/grade.test.mjs: 23 pass.npx --yes oxfmt@0.70.0 --check .exit 0;npx --yes oxlint@1.85.0 .exit 0 (one existing warning intest/install-ps1.test.mjs).hr-code-reviewof the final diff found no defects.Not done: I did not rerun the model evals with this grader; no scenario file changes here.
check:packageandbun test skills/not run, no packaged or skill file changed).CHANGELOG.mdentry underUnreleased.Summary by cubic
Fixes the end-of-reply eval grader so a reply's opening prose is kept when it is the only prose and only tool calls follow the leading reads. Previously a reply with a status line, a read-only call, then an acting call, and no prose after them, lost its status line and could fail a required pattern even when correct. Also lets
claude.shkeep namedCLAUDE*/ANTHROPIC*environment variables viaEOR_KEEP_ENV(space-separated names) instead of unsetting them all, so a run can use a login that lives in the environment; the default behavior is unchanged.Written for commit c49ca7e. Summary will update on new commits.