Repository navigation
fix(#749): AC_MET_BUT_NOT_A_PLUS QA verdict breaks to PR instead of looping - #753
Merged
admarble merged 2 commits intoJul 14, 2026
Conversation
… loop
mapAgentSuccessToPhaseResult classified any qa verdict outside
{READY_FOR_MERGE, NEEDS_VERIFICATION} as a hard failure, so
AC_MET_BUT_NOT_A_PLUS (a stopping/ready state per ready-gate.ts's `ac`
policy) fell to success:false. Under -Q this fed the quality loop, never
reached zero failures, and exited with no PR despite ACs being met.
Narrow the failing branch to an explicit `verdict === "AC_NOT_MET"`
check (null/unparseable branch from #534 unchanged). AC_MET_BUT_NOT_A_PLUS
now returns success:true with the verdict retained, so the run breaks to
PR and the "not A+" note surfaces. Downstream routers (loop trigger,
shouldCreatePR, --qa-gate --chain break) all key off result.success, so
this also keeps the chain from breaking on such a predecessor (AC-2).
Flip the locking test (phase-executor.test.ts) to assert success +
verdict retention, add a chain-gate-predicate assertion for AC-2.
run.test.ts AC_MET parser tests are parser-only — verified, unchanged.
Entire-Checkpoint: 42a4b0a5d7f8
4 tasks
…k-to-PR QA of PR #753 found two gaps in the AC_MET_BUT_NOT_A_PLUS break-to-PR fix: 1. The CHANGELOG/comment claimed the retained verdict surfaces the "not A+" note "in the PR body / run log", but createPR built a fixed-template body and was never passed the verdict — only the run log carried it. Extract the pure, testable buildAutomatedPRBody() helper; append a note for non-A+ stopping states (AC_MET_BUT_NOT_A_PLUS, NEEDS_VERIFICATION) and thread the qa verdict from phaseResults through createPR. The PR body now surfaces the note, making the documented claim true. 2. The reported scenario (run-path break-to-PR vs quality loop) had no integration coverage — only the mapping function and chain predicate were tested. Add a runIssueWithLogging test: a success qa result carrying AC_MET_BUT_NOT_A_PLUS reaches createPR (verdict forwarded) and never spawns the loop phase. buildAutomatedPRBody unit tests cover the note/no-note/stack-manifest matrix.
admarble
added a commit
that referenced
this pull request
Sep 9, 2026
…k-to-PR QA of PR #753 found two gaps in the AC_MET_BUT_NOT_A_PLUS break-to-PR fix: 1. The CHANGELOG/comment claimed the retained verdict surfaces the "not A+" note "in the PR body / run log", but createPR built a fixed-template body and was never passed the verdict — only the run log carried it. Extract the pure, testable buildAutomatedPRBody() helper; append a note for non-A+ stopping states (AC_MET_BUT_NOT_A_PLUS, NEEDS_VERIFICATION) and thread the qa verdict from phaseResults through createPR. The PR body now surfaces the note, making the documented claim true. 2. The reported scenario (run-path break-to-PR vs quality loop) had no integration coverage — only the mapping function and chain predicate were tested. Add a runIssueWithLogging test: a success qa result carrying AC_MET_BUT_NOT_A_PLUS reaches createPR (verdict forwarded) and never spawns the loop phase. buildAutomatedPRBody unit tests cover the note/no-note/stack-manifest matrix.
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.
Summary
sequant runtreated a QA verdict ofAC_MET_BUT_NOT_A_PLUSas a phase failure. Under-Qthis fed the quality loop, re-ran the pipeline from phase 0 (starting withtestgenunder--testgen), never reached zero failures, and exitedstatus=failurewith no PR — even though acceptance criteria were met. The documented policy (andready-gate.ts'sacpolicy, already wired intosequant ready) is to break to PR;/loopis forAC_NOT_METonly.The fix is the single load-bearing line at
phase-executor.ts:396: the failing branch is narrowed from "any verdict not in{READY_FOR_MERGE, NEEDS_VERIFICATION}" to an explicitverdict === "AC_NOT_MET"check. The null/unparseable branch (#534) is unchanged.AC_MET_BUT_NOT_A_PLUSnow returnssuccess: truewith the verdict retained so the PR body / run log surfaces the "not A+" note.Because every downstream router (batch-executor loop trigger,
shouldCreatePR, the--qa-gate --chainbreak atrun-orchestrator.ts:1076-1080) keys offresult.successonly, flipping this one mapping fixes AC-1 and AC-2 together — no router changes needed.Pre-PR AC Verification
runbreaks to PR onAC_MET_BUT_NOT_A_PLUSinstead of looping/failingphase-executor.ts:396; test "treats AC_MET_BUT_NOT_A_PLUS as success → break to PR"--qa-gate --chainnot broken by anAC_MET_BUT_NOT_A_PLUSpredecessorresult.success); test applies the exactrun-orchestrator.ts:1077predicateAC_NOT_METand null/unparseable still hard-failAC_NOT_METbranch + #534 null branch unchanged; existing tests greenphase-executor.test.ts:1557flipped + positive assertion;run.test.tsreconciledrun.test.ts1192-1193/1282-1292 are parser-only — verified unchanged (per /spec correction)Test plan
npx vitest run src/lib/workflow/phase-executor.test.ts— 127 passednpx vitest run src/commands/run.test.ts— 143 passed (parser tests unchanged)npm run build— cleannpm run lint— cleanDeferred (follow-ups, not this issue)
a-plus"keep looping" policy gate in the run path (needsReadyPolicyplumbingrun.ts → batch-executor → phase-executor, absent today).NEEDS_VERIFICATIONsemantics diverge betweenphase-executor(success) andready-gate(never-stop) — pre-existing, out of scope.Closes #749
🤖 Generated with Claude Code