Repository navigation
Fail useagent fan --qc when no verifier passed the work - #421
Merged
abhishekgahlot2 merged 1 commit intoNov 5, 2026
Merged
abhishekgahlot2 merged 1 commit into
abhishekgahlot2 merged 1 commit into
Conversation
fanCommand gated a QC batch on `verdict !== "fail"` and ignored the verifier run's own status. A verifier run that failed or timed out usually leaves no VERDICT line, so its verdict was "unknown", the row kept the work run's "completed" status with no error, and the command exited 0. A completed verifier that gave no verdict also exited 0. The existing case where verify throws already shows the intended rule: it is a verification_error and the batch exits 1. QC also ran on every settled run, including runs that failed or hit the settle timeout while still working. For a run still working, that queued a verifier reply behind it in the same thread and waited up to another 15 minutes to judge unfinished work. Now: - only completed runs are sent to the verifier; a failed or timed-out run keeps its own status, which already exits 1 - a verifier run that does not complete is reported as verification_error, with an error naming the verifier run and its status - with --qc, the command exits 0 only when every verdict is PASS The README states the exit rule. Three new cases in test/commands.test.ts cover a failed and a timed-out verifier, a verifier with no verdict, and a timed-out work run that must not be verified. All three fail without the change. Fixes useagenthq#417
Contributor
|
Merged, thanks @officialasishkumar. A batch should only pass when a verifier actually said PASS, and now it does. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
By opening this pull request you agree to the Contributor License Agreement. On your first pull request a bot asks you to sign it with a one-line comment.
Fixes #417
useagent fan --qcgates a batch on a verifier, butfanCommandonly checkedverdict !== "fail"and ignored the verifier run's own status. In three cases it exited 0 or did the wrong work:VERDICT:line, so the verdict is"unknown". The row kept the work run'scompletedstatus and the command exited 0."unknown"and the command exited 0.The existing case where
verifythrows already reportsverification_errorand exits 1. This change applies the same rule to the cases above.What changed
All code changes are in
packages/cli/src/commands.ts:completedare sent to the verifier. A failed or timed-out run keeps its own status, which already makes the command exit 1.status: "verification_error"withverdict: "unknown". The error names the verifier run and its status, for exampleverifier run <id> did not complete (timeout).--qc, the command exits 0 only when every verdict ispass. Without--qc, nothing changes.packages/cli/README.mdstates the exit rule.Tests
Three new cases in
packages/cli/test/commands.test.ts, using the package's fake client:failed(with a strayVERDICT: PASSin its partial answer) and one endstimeout: both rows areverification_errorwith the expected error, and the command exits 1verdicts: 2 unknowntimeoutis never sent toverify, and the completed one isAll three fail on
main. Checks with Bun 1.3.14:cd packages/cli && bun run test: 49 pass, 0 failcd packages/cli && bunx -p typescript@5.9.3 tsc --noEmit: passesOpen in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.