Skip to content

fix(#1824): attribute review findings to the evaluated run - #1825

Merged
Benkapner merged 2 commits into
mainfrom
agent/1824-finding-expectations-attribution
Oct 30, 2026
Merged

Benkapner merged 2 commits into
mainfrom
agent/1824-finding-expectations-attribution

Conversation

@fullsend-ai-coder

@fullsend-ai-coder fullsend-ai-coder Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes eval/review/eval.yaml so the finding_expectations judge 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 satisfy required/required_any or trigger forbidden.

How it works

  • fullsend post-review puts 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.
  • The judge picks out the comment whose first line is that marker, then cuts it at the first <!-- sticky:history-start -->. This is the same current-section rule scripts/pre-review.src.sh uses for the projection marker, so an edited sticky still works but its earlier runs are ignored.
  • Each eval case runs in a new ephemeral repo, and prior_review fixtures are passed in as a file, not posted. So the sticky comment can only come from the run being evaluated.
  • If there are zero or several sticky comments, including a failed PR capture, the judge fails with Findings not attributable to this run: ... found N. Missing output is therefore never scored as a clean review.
  • Cases with no finding expectations (001–003, 012) still pass, now with the message "No finding expectations specified". Category matching, thresholds, and gating are unchanged.

I left capture-fixture.sh alone. 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

  • New eval/scripts/finding-expectations-test.sh (added to make script-test). It pulls the shipped judge out of the YAML with yq and 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 review passes. eval/scripts/aggregate-nightly-test.sh passes. eval/run-functional-test.sh reports no failing assertions, but exits 1 both before and after this change because the sandbox blocks /dev/zero.
  • pre-commit couldn'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 because uvx isn't available. It only covers skills and agents, which this change doesn't touch.

Context

#1003 adds the required_findings/forbidden_findings judges. Whichever lands second should use the same rule: the review-agent sticky comment, current section only.


Closes #1824

Post-script verification

  • Branch is not main/master (agent/1824-finding-expectations-attribution)
  • Secret scan passed (gitleaks — 16657d540187b16743c8693dc2ccc40366334430..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

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>
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Oct 28, 2026
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team October 28, 2026 13:10
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 1:12 PM UTC

Commit: fea56ac · View workflow run →

Automated review did not complete for this commit. Check the latest review status before merging. If no review is queued or running, comment /fs-review to retry.

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:14 PM UTC · Completed 1:29 PM UTC

Commit: fea56ac · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.93

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Oct 28, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

<!-- fullsend:risk-assessment -->
Risk Assessment: moderate (2/5)

Details

Moderate 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 -->
Risk Assessment: moderate (2/5)

Details

Moderate 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.

@fullsend-ai-review

fullsend-ai-review Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge bug Something isn't working labels Oct 28, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 3:04 PM UTC · Completed 3:12 PM UTC

Commit: 5cb6a90 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.28

@fullsend-ai-review fullsend-ai-review Bot removed the ready-for-merge All reviewers approved — ready to merge label Oct 29, 2026
@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review October 29, 2026 15:11

Superseded by updated review

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Oct 29, 2026
@Benkapner
Benkapner disabled auto-merge October 29, 2026 15:27
@Benkapner
Benkapner added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 34b5c58 Oct 30, 2026
67 checks passed
@Benkapner
Benkapner deleted the agent/1824-finding-expectations-attribution branch October 30, 2026 13:35

This branch was previously deployed

1 inactive deployment
dev — 5cb6a90f Deployed Oct 29, 2026 by Benkapner via behaviour #1431
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eval: finding_expectations can score historical reviews and unrelated comments instead of the evaluated run

2 participants