Repository navigation
fix(#1254): a ladder halt is recorded nowhere: the halting phase reads success, failureCategory is empty, and the bundle exists only on stdout - #1304
Merged
admarble merged 2 commits intoOct 4, 2026
Conversation
3 tasks
admarble
deleted the
feature/1254-fix-run-a-ladder-halt-is-recorded-nowhere-the-halt
branch
October 4, 2026 22:10
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
A ladder halt (
SPEC_DIVERGENCE,DIVERGENCE_SUSPECT,TOP_OF_LADDER) used to be recorded only in stdout. The halting phase readsuccess, the issue result wassuccess: falsewith nofailureCategory, and the evidence bundle never reached the run log, state or the MCP result. Runs on released sequant still behave this way. This PR's own first spec run halted withSPEC_DIVERGENCE, and the MCP result reported the issue and the phase assuccess.The fix belongs at the place an issue's outcome is assembled. This is the fifth recurrence of the same gap, after #739, #856, #879 and #920. Per the owner's decision on #1254, it reuses existing fields and adds no new one-off field:
ladderHaltOutcome(bundle)is spread into bothrunIssueWithLoggingreturn sites (the spec-path early return and the final return). It setsfailureCategory: "ladder_halt"(new value inERROR_CATEGORIES, which the run-log and metrics enums mirror), anabortReasonsuch asladder halt: SPEC_DIVERGENCE in exec (AC-2), andevidenceBundleonIssueResult.recordIssueCompletionnow forcesfailurefor any failure that no failed phase explains (a PR-creation failure, a ladder halt, an abort before any phase ran). It writesabortReasonand the bundle on the issue entry, so the next stop outside a phase needs no new field. An issue whose phase failed keeps the status its phases give it (a timeout still recordspartial).phaseRecordFor(result)records a phase that declaredSPEC_DIVERGENCEas failed, whatever its exit status, withoutcomeanddivergenceAcs. State, the run-log phase row and the progress event all read it, for both the spec path and the phase loop.sequant_runper-issue result carriesabortReason,haltReasonanddeclaredAcs. The last two are read from the bundle in the run log, not stored separately.AC verification
batch-executor.test.ts: spec path and loopSPEC_DIVERGENCE. TheDIVERGENCE_SUSPECTandTOP_OF_LADDERcases are inbatch-executor.model-ladder.test.ts, which has the configured-ladder harness they need; see the note belowbatch-executor.test.ts: state, run-log row and progress event arefailedfor a clean-exitSPEC_DIVERGENCE. Mutation-verified belowsrc/mcp/tools/run.test.ts:haltReasonanddeclaredAcsare carried from a halted issue's bundleAC-1's evidence command, as written, doesn't reach two of its four paths. It names only
batch-executor.test.ts. The two halts that happen only inside the ladder need a configured model ladder, and that harness lives in the sibling file. The behaviour is covered, and the runner ran both files.Mutation-verified: AC-2 — phaseRecordFor made to ignore specDivergence; src/lib/workflow/batch-executor.test.ts > #1254: a ladder halt is recorded, not only printed > phaseRecordFor: a declared divergence is a failure whatever the exit status failed (3 failed / 142 passed); restored.
Test plan
npx vitest runonbatch-executor.test.ts,batch-executor.model-ladder.test.ts,run.test.ts,log-writer.test.ts,state-manager.test.ts,error-capture.test.tsandrun-orchestrator.test.ts: 434 passed (run by the runner)npx tsc --noEmit: cleanFixes #1254
🤖 Generated with Claude Code