Skip to content

fix(ship): preserve every coding child ending - #2158

Merged
justinhelmer merged 1 commit into
mainfrom
plan/fix-issue-2153-a-coding-8aa4bb/u1
Sep 21, 2026
Merged

justinhelmer merged 1 commit into
mainfrom
plan/fix-issue-2153-a-coding-8aa4bb/u1

Conversation

@coreplane-switchboard

@coreplane-switchboard coreplane-switchboard Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Coding children now resolve pre-push conflicts under one bounded rule and checkpoint dirty or unpushed work after their actual final model turn. Workspace release can no longer discard work created during the description follow-up.

Why: Issue #2153 exposed a contradiction with record 0071: conflict handling had rival instructions, while work created after the earlier salvage boundary could still be lost.

Where to look

  1. Single pre-push conflict rule Bounds conflict resolution to one model round with thread and repository context before gates and push.
  2. Completion-aware workspace checkpoint Preserves dirty or unpushed completion work while allowing clean successful children onto the normal PR path. ⚠ A false clean result could lose work; a false dirty result could suppress PR creation.
  3. Post-description checkpoint Repeats preservation after the last model turn, closing the final workspace-tool window reported by review. ⚠ Incorrect placement could skip the PR post-step for an otherwise clean child.
  4. Resumable parent ending Treats a mechanical checkpoint as unfinished WIP and reports the branch head for a re-issue.
  5. Final-turn discard regression Proves late dirty work is committed, pushed as salvage, and never reaches the discarded-work report.
  6. Conflict replay fixture Replays the conflict, continued rebase, fast gates, and push inside one bounded round.
  7. Generated vocabulary baseline Records the retired duplicate contract term so the consistency gate remains monotonic and current.

Feedback wanted: Please verify that clean children still reach description and PR post-steps, while dirty final-turn work becomes resumable WIP before release.

Risk: This affects runner-owned coding child endings. Misclassification could create a WIP checkpoint or skip PR creation; rollback is a revert of the completion checkpoint and parent handling.

Verified: 458 focused tests and all CI verification jobs passed at the pushed head; CodeQL analysis remains in progress.

Decisions (3)
  • No marker for a clean normal completion. Abnormal endings retain an empty WIP marker because completion was not declared. Normal completion records salvage only when full git status or unpushed history finds work, preserving the description and PR post-steps for clean success.
  • Any salvage head is unfinished. The pushed-head source distinguishes child-declared work from mechanical preservation. Letting a completed status override it could send unfinished conflict work to review, so the parent aborts and names the resumable head.
  • Checkpoint again instead of restricting the final turn. Removing bash would also remove the final turn's fallback for inspecting the pushed diff and would not guard future workspace-capable tools. Repeating the checkpoint enforces preservation at the release boundary.
Validation (9 criteria)
Criterion Proof
Conflict, contract, salvage, parent, and final-turn regressions npx vitest run on the six changed test files — 458 tests passed after rebase.
Scoped TypeScript NODE_OPTIONS=--max-old-space-size=6144 npx tsc --noEmit -p tsconfig.json — exit 0 after rebase.
Changed TypeScript lint npx eslint on the 12 changed TypeScript source and test files — exit 0.
Changed-file formatting npx prettier --check on all 15 changed files — all matched files use Prettier code style.
Consistency failure from review npm run vocabulary:gen updated the retired-term baseline; npm run check:consistency passed every subcheck.
Public hygiene and spec proof bindings npm run hygiene:check passed; npm run specs:check passed with 51 specs and 5656 proof references.
Changed-path coverage and test guard npm run specs:coverage -- --changed origin/main...HEAD --test-guard — every source path covered and no verification removed.
PR title npm run check:pr-title -- "fix(ship): preserve every coding child ending" — passed.
Pushed-head CI ci / bot, docs, image, package, web, workers, deploy targets, PR title, and zizmor completed successfully at 3a32ebb.
For agents

Rebased immediately before push onto origin/main at c3f1554; force-pushed head 3a32ebb as one coherent commit. Review finding F1 remains resolved by the post-description completion checkpoint and its regression. The two check findings are fixed by the generated vocabulary baseline update; skip reviewing that JSON as handwritten logic. CodeQL analysis was still in progress at final observation.
Requested by @justinhelmer in slack:C0BRRHKFLCB

🤖 Generated with Claude Code

@coreplane-switchboard coreplane-switchboard Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: The main salvage path is improved, but work created by the final description turn can still be discarded.

Warning

Changes requested · head fefde58 · 1 finding: 1 minor

Severity Finding Where
minor F1 Final description-turn work bypasses the new completion salvage src/core/dispatch/runLoop.ts:1592
Full review

F1 — The completion checkpoint runs before the optional description follow-up, but that follow-up still exposes bash, and the code explicitly anticipates it may push. If it leaves a dirty tree or unpushed commit, the subsequent observation reaches work_left_behind without another preservation attempt, so release can still discard the work. Run completion preservation after the final model turn, or repeat it after this observation before ending the harness.

@coreplane-switchboard
coreplane-switchboard Bot force-pushed the plan/fix-issue-2153-a-coding-8aa4bb/u1 branch from fefde58 to cacda92 Compare September 21, 2026 20:07

@coreplane-switchboard coreplane-switchboard Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: The final description-turn salvage gap is fixed, and no findings remain.

Note

Approved · head cacda92 · no findings

Full review

F1 is resolved: final description-turn work is now salvaged before release, with regression coverage. The test-title changes are refactors with verification intact.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). This repository opted in through its REVIEW_BOT_LOGIN and REVIEW_BOT_ID variables.

Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
@coreplane-switchboard
coreplane-switchboard Bot force-pushed the plan/fix-issue-2153-a-coding-8aa4bb/u1 branch from cacda92 to 3a32ebb Compare September 21, 2026 20:17

@coreplane-switchboard coreplane-switchboard Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: The regenerated vocabulary baseline resolves the failed consistency check, and no unresolved finding remains.

Note

Approved · head 3a32ebb · no findings

Full review

The vocabulary baseline now matches the retired contract term, resolving both prior CI findings; no new findings.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). This repository opted in through its REVIEW_BOT_LOGIN and REVIEW_BOT_ID variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant