Repository navigation
fix(xtask): require terminal agent-eval verification (#16292) - #16294
EffortlessSteven wants to merge 1 commit into
Conversation
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 58 minutes. View limit details
|
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
An independent in-session reviewer fetched head 3c92bea842d66d6ca03da761c47053087cd438a5 and verified parent 69c74906e470cba42c9cf0a8f6809c3fe8aff7a8, tree e6496b037a9abeb1a59a279c843c458ab1b81f19, and both changed blobs against the audited candidate. No actionable findings.
The reviewer traced the quickstart, renderer and both scoring callers. With pinned Rust 1.95.0, an isolated harness used the committed formatter, parser and score conditions. It accepted both completion variants with LF and CRLF, refused a later refusal, unknown record, text, blank line or unterminated later line, and verified the existing nonzero/missing-exit and gap conditions. The committed test refused the old any-line parser and two alternatives that skip nonrecords or trim trailing whitespace. The harness uses synthetic verdicts passed into the formatter. The full evaluator test run independently passed all 13 focused tests.
The candidate changes only positioning in the evaluator and its regression coverage. Producer semantics and the score schema are preserved. Hosted qualification is outside this review.
There was a problem hiding this comment.
Code Review
This pull request modifies the verify_complete function in xtask/src/reports/agent_eval.rs to require that the completion record is on the final line of the agent report before scoring the loop as closed. It also adds a comprehensive test suite to validate this behavior and includes a changelog entry. No review comments were provided, and there is no additional feedback.
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY for head 3c92bea
Native Windows review of fix(xtask): require terminal agent-eval verification (#16292) at 3c92bea.
What changed
verify_complete in xtask/src/reports/agent_eval.rs changes from "any line starts with a completion record" to "the last line starts with one". A report that reaches verify=complete and then logs anything later (a refusal, an unrecognized record, even a trailing blank line) no longer reads as DONE.
Source review (verified against source)
- The strictness matches the documented producer contract: the agent report renderer's module doc (crates/ripr/src/output/human/agent.rs:21) states "The last line is always
verify=complete|...", and the agent protocol docs in init_agents.rs (lines 54-55 and siblings) require "its last lineverify=complete|...". This PR closes a checker/producer contract drift where the checker was looser than the documented protocol. - Exact record names are still required (
verify=complete|,verify=complete_with_limits|); a futureverify=completed|variant does not read as DONE even on the last line. - CRLF handled: Rust
lines()strips\r; the test pins{refused}\r\n{terminal}\r\n. - The new unit test is a proper discriminator: refuses-after-complete, unrecognized-after-complete, blank/space-after-complete, unterminated trailing text, empty report, bare
verify=complete(no pipe), and the refused-only report — all negative; header-prefixed and CRLF forms positive. - The removed assertions moved out of the neighboring test into the dedicated one; changelog present.
Native proof
- Native proof (native Windows, worktree wt-16294 at head 3c92bea): sections
16294 xtask verify_requires_completion=> 1 passed; 0 failed across 43 test-binary result(s) (all exits 0).
Residuals
None blocking. The trailing-blank-line rejection is strict by design; the producer never emits one, and a hand-trimmed report failing closed is the safe direction for an eval gate.
Summary
Make the deterministic agent evaluator read the final report line when scoring loop closure. A successful line earlier in the report cannot override a later refusal, unrecognized line or blank line. Both documented completion states still count on the final line.
Swarm / Source Boundary
Source-of-truth Links
Proposal: none
Spec: RIPR-SPEC-0147 and the Agent Quickstart
ADR: none
Plan item: Deterministic evaluator follow-up to #14298 and #15322.
Governing issue or accepted claim: Closes #16292.
Acceptance delta (one sentence): Count verification completion only when a documented completion record starts the final report line and the existing exit and gap conditions hold.
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication):
fix/16292-agent-eval-terminal-verifyStack parent or prerequisite PR (if any): none. #15322 is already in the base.
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): none
Accepted winner and losing candidate disposition (when decided): One candidate for #16292.
Scope
The change is in the evaluator's report-reading predicate. The exit and gap checks stay in the scoring caller. The producer, analyzer, score schema, evaluation scenarios, #15320 and the broader A/B program are outside this change.
The contributor-only changelog entry is
changelog.d/16292-agent-eval-terminal-verify.md.Proof
Local source tree
e6496b037a9abeb1a59a279c843c458ab1b81f19matches candidate head3c92bea842d66d6ca03da761c47053087cd438a5. Base is69c74906e470cba42c9cf0a8f6809c3fe8aff7a8.cargo test --locked -p xtask --bin xtask verify_requires_completion_on_the_last_report_linefailed on the base implementation with the new test, at the earlier-completion/later-refusal assertion (exit 101).cargo test --locked -p xtask --bin xtask reports::agent_eval::tests::passed 13 tests on the candidate.cargo test --locked -p ripr --test cli_smoke verify_complete_with_limits::passed both producer contract tests. Realripr check --quiet --format agentcalls emittedverify=complete|outcome=complete_with_findings|findings=1|exposed=1,verify=complete_with_limits|outcome=complete_with_findings|findings=1|exposed=0|limits=infection_unknown:1, andverify=refused|outcome=complete_with_findings|findings=1|exposed=0|reason=unexposed_findings_remain. Each was the final line followed by one newline, with exit 0.xtask agent-eval --scenario boundary_threshold --skip-cargoscoring command. The reference loop closed for each real completion record. It stayed open after appending a refusal, an unknown record, ordinary text, or a blank line, and when the producer returned exit 7 with genuine successful stdout. The replay wrapped only the reference check, preserved the weak-test result, and checked schemaripr-agent-eval-v1.cargo fmt --check,check-changelog-fragments,check-output-contracts, and offlinecheck-pr-shapepassed.check-fastselected the two expected paths. Formatting, static-language, command-catalog, support-tier, no-panic and allow-attributes checks passed before I stopped the aggregate at its broader policy-test builds under the runner's 16 GiB memory ceiling. The aggregate has no pass result.worktree doctorreported the one-commit base advance to06fd39af8780cb18bf89effed806ec1f2dbc36b5. That commit leaves the evaluator, producer, and quickstart paths unchanged, and the local merge-tree check was clean. The candidate retains its tested base.Qualification handoff
On 2026-11-26 GitHub published merge ref
d626d03b9dc2c6551808a0b6cc1e36f334d99652, tree706d081f868ea5c1486a8003f35cf15c4efd0d56, with first parent06fd39af8780cb18bf89effed806ec1f2dbc36b5and second parent3c92bea842d66d6ca03da761c47053087cd438a5. Its delta against current main is exactly the evaluator and changelog. The base advance landed in #16288 and changes Rust oracle admission, analysis-cache identity, and dependent fixtures. The evaluator and producer contract sources are byte-identical to the reviewed head.cargo test --locked --offline -j 2 -p ripr --test cli_smoke verify_complete_with_limits::tests andcargo test --locked --offline -j 2 -p ripr --test matches_or_pattern_strengthpassed. Seven scorer cases also passed using the newly built composed-tree producer and the retained evaluator executable whose source is unchanged. The earlier aggregatecheck-fastwas outside this rerun.Ripr Rust Small Result. This Rust-only candidate reasonably expects green on the ordinary Rust route. Its actual hosted results are still pending qualification.merge-ready, exact-head qualification and protected enqueue.Claim boundary
The failure was reproduced with a constructed report. No current mis-scored run has been established.
Rollback
Revert the candidate commit. The patch changes no score shape or persisted inputs.