Repository navigation
[local-fail-a-run-whose-delivery-halted-even-wh] Fail a run whose delivery halted even when the incomplete summary cannot be written - #847
Merged
danii1 merged 1 commit intoDec 4, 2026
Conversation
… a run whose delivery halted even when the incomplete summary cannot be written
Contributor
Author
Artifacts & verificationRun: 1717 · Commit: Verification reportProduced by Show artifactAuto-review summaryProduced by Show artifact |
danii1
deleted the
feature/local-fail-a-run-whose-delivery-halted-even-wh
branch
December 4, 2026 12:19
Contributor
Author
|
🤖 Auto-merge: merged (squash) at The merge-safety review judged it safe: Small, tested bug fix: an in-memory delivery-halt flag makes settleImplementationRun escalate (and skip markDone) when the incomplete-summary file can't be written. It touches no auto-merge, CI, security, permission or dependency surfaces, and the new tests exercise the changed path. |
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.
Why
Task local-fail-a-run-whose-delivery-halted-even-wh: Fail a run whose delivery halted even when the incomplete summary cannot be written
When the delivery pipeline halted after the agent finished, the only signal to the run recorder was
implementation-summary-incomplete.md. If that write failed (for exampleENOSPCin/tmp, the same condition that breaks verify), the run was recordedsucceededwith nothing pushed. Markdown tasks were also marked Done.What changed
src/lib/cli/context.ts: newdeliveryHalt?: stringon the active task context.src/lib/agent/run-harness-finalize.ts:reportPipelineHaltsetsdeliveryHaltright after the shutdown early return and before the file write or tracker calls. The file write is kept. I also shortened an existing comment there to keep the file at the 1000-line lint limit.src/lib/task/pipeline.ts:settleImplementationRuntreatsdeliveryHaltlike an incomplete summary, so the run escalates. A failure already noted withnoteRunFailure(such as verify) still wins.markDoneIfSuccessfulnow also requires that the run is not incomplete.tests/pipeline-pr-delivery.test.ts: three new tests.Scope
Included: the in-memory halt flag, its use in
settleImplementationRun, and unit tests. Excluded, as the task said: the default output dir, verify retry/backoff, the tracker comment path, andnoop/stophalts. Shutdown halts keep today's behavior because they return before the flag is set.Tradeoffs
The
markDoneIfSuccessfulguard is!implementationIncomplete, which also covers the file-based incomplete case. That case could previously mark a markdown task Done if the outcome marker said succeeded. I judged that a fix, but it is a small behavior change beyond the missing-file case. The same guard still doesn't coverstackBlocked.Blast Radius
Only runs where
reportPipelineHaltfires (non-noop, non-stop halts, plus stack-blocked) are affected. Successful, noop and shutdown runs behave as before. Commit, auto-review and publish halts still reject. No CLI output or exit codes changed, so I did not run the offline e2e tests.Verification
bun run teston the three relevant files: 38 pass.packages/codesuite: 6525 pass, 7 skip, 0 fail.format,lintandtypecheckpass. Lint first failed on max-lines (1003 lines against a limit of 1000) and passed after I trimmed comments.deliveryHaltdirectly and cover three cases: a missing summary file escalates and a markdown task is not marked Done; a noted verify failure still wins; a run with no halt still succeeds and is marked Done. Nothing exercisesreportPipelineHaltwith a forcedwriteFileSyncfailure. That link is covered by reading the code, because the flag is set before the write.🤖 Opened by DevIntern from local-fail-a-run-whose-delivery-halted-even-wh