Repository navigation
fix(#1824): attribute review findings to the evaluated run - #1825
Conversation
The finding_expectations judge joined every captured comment and formal review body before matching [category] tags, so old reviews, unrelated comments and the "Previous run" history kept inside the review sticky comment could satisfy required categories or trip forbidden ones. fullsend post-review publishes the review in one sticky comment whose first line is <!-- fullsend:review-agent --> (other copies are escaped); formal review bodies only link to it. The judge now reads only that comment, cut at the first <!-- sticky:history-start --> sentinel, the same current-section rule pre-review uses. Each eval case runs in a new ephemeral repo, so the sticky can only come from the evaluated run. Zero or several sticky comments fail with a distinct "not attributable" message, so a run with no attributable output never scores as a clean review. Cases with no finding expectations still pass vacuously. Category matching, thresholds and gating are unchanged. eval/scripts/finding-expectations-test.sh runs the shipped judge offline against the four cases from the issue plus controls, and is wired into make script-test. Note: pre-commit could not fetch hook repos (network); its hooks were run directly (pre-commit-hooks 6.0.0, shellcheck 0.10.0.1, lint-release-cases, gitleaks 8.30.1) and passed. make lint (skillsaw) could not run: uvx is unavailable; it covers skills/agents only. Closes #1824 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Review · Commit: Automated review did not complete for this commit. Check the latest review status before merging. If no review is queued or running, comment |
|
🤖 Finished Review · ✅ Success · Started 1:14 PM UTC · Completed 1:29 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.93 |
|
<!-- fullsend:risk-assessment --> DetailsModerate risk driven by a compact 3-file eval judge bugfix with complete acceptance criteria coverage and tests, balanced against high churn and regression history on touched build and evaluation files. Previous run<!-- fullsend:risk-assessment --> DetailsModerate risk driven by a compact 3-file eval judge bugfix with complete acceptance criteria coverage and tests, balanced against high churn and regression history on touched build and evaluation files. |
|
Looks good to me Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJhcHByb3ZlIiwiZmluZGluZ3MiOltdfQ== --> Looks good to me Labels: PR fixes a bug in the eval finding_expectations judge |
|
🤖 Finished Review · ✅ Success · Started 3:04 PM UTC · Completed 3:12 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.28 |
Superseded by updated review
Summary
Changes
eval/review/eval.yamlso thefinding_expectationsjudge only reads output from the run being evaluated. Before, it joined every captured comment and formal review body before looking for[category]tags. That let old reviews, unrelated comments, and the "Previous run" history inside the review sticky comment satisfyrequired/required_anyor triggerforbidden.How it works
fullsend post-reviewputs the whole review in one sticky comment. The first line of that comment is<!-- fullsend:review-agent -->, and any other copy of that marker is escaped. Formal review bodies only link to the comment ("See the review comment..."), and the 422 fallback body uses**[severity]** category, never[category]. So the sticky comment is the only place[category]text is published.<!-- sticky:history-start -->. This is the same current-section rulescripts/pre-review.src.shuses for the projection marker, so an edited sticky still works but its earlier runs are ignored.prior_reviewfixtures are passed in as a file, not posted. So the sticky comment can only come from the run being evaluated.Findings not attributable to this run: ... found N. Missing output is therefore never scored as a clean review.I left
capture-fixture.shalone. The issue suggested adding ids and timestamps to the capture so formal reviews could be ordered. With this approach the judge doesn't read formal reviews at all, so the existing capture is enough.Testing
eval/scripts/finding-expectations-test.sh(added tomake script-test). It pulls the shipped judge out of the YAML withyqand runs 23 offline cases: the four scenarios from the issue, required/required_any/forbidden cases for genuine current findings, edited stickies (including CRLF), multi-level history, a quoted marker, two stickies, a failed capture, and a missing state file. All pass. 14 of them fail against the old judge.eval/lint-cases.sh reviewpasses.eval/scripts/aggregate-nightly-test.shpasses.eval/run-functional-test.shreports no failing assertions, but exits 1 both before and after this change because the sandbox blocks/dev/zero.pre-commitcouldn't fetch its hook repos (no network), so I ran the hooks directly instead: pre-commit-hooks 6.0.0, shellcheck 0.10.0.1, lint-release-cases, and gitleaks 8.30.1. All passed.make lint(skillsaw) did not run becauseuvxisn't available. It only covers skills and agents, which this change doesn't touch.Context
#1003 adds the
required_findings/forbidden_findingsjudges. Whichever lands second should use the same rule: the review-agent sticky comment, current section only.Closes #1824
Post-script verification
agent/1824-finding-expectations-attribution)16657d540187b16743c8693dc2ccc40366334430..HEAD)