Repository navigation
Conversation
…ations Entire-Checkpoint: 11a4060e2ff0
3 tasks
admarble
deleted the
feature/935-fix-run-abort-path-paper-cuts-work-is-preserved-in
branch
September 8, 2026 05:24
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
<path>") would otherwise be false the moment an external SIGTERM fires the shutdown cleanup and deletes exactly that directory (D13, option A fromdocs/internal/graph-2026-09/PLAN.md).shouldPreserveWorktree) and the cleanup task itself (cleanupWorktreeOnShutdown/registerWorktreeRemovalCleanup) intoworktree-manager.tsso both are independently testable and reused byrun-orchestrator.ts's cleanup registration block.bin/cli.ts'sabortcommand description andsrc/commands/abort.ts's header comment cited#645(the relay bug, "relay messages silently lost") as the origin of theabortcommand.#645never mentions abort.git log -S'Out-of-band abort' -- bin/cli.tsshows the citation should be#858, the PR that actually introduced the command.Acceptance Criteria
src/lib/workflow/run-orchestrator.shutdown.test.ts— mutation-verified (see below)abort=nullteardown) names the branch, never the (now-gone) pathabortcites its originbin/cli.ts:507andsrc/commands/abort.ts:3,7(the only citations tied to the abort command) now cite#858; see note below on the AC's verify commandNote on AC-3's verify command: the literal grep (
grep -n '#645' bin/cli.ts src/commands/abort.ts | wc -l→0) also matchesbin/cli.ts:470, an unrelated#645citation on theprompt --waitcommand's--waitflag description ("Block until a reply arrives or the timeout elapses (#645, Gap 4)"). That citation is correct —#645's own "Gap 4" section is specifically about this behavior — and isn't one of the citations the issue names as wrong (bin/cli.ts:507andabort.ts:3,7). I left it as-is rather than scrubbing a correct citation to satisfy a whole-file grep; happy to change if that's not the right call.Mutation-verified: AC-1 —
shouldPreserveWorktreehardcoded toreturn false;AC-1: a signal-driven shutdown preserves a dirty worktree and removes a clean onefailed; restored.Files changed
src/lib/workflow/worktree-manager.ts—isWorktreeDirty,shouldPreserveWorktree,cleanupWorktreeOnShutdown,registerWorktreeRemovalCleanupsrc/lib/workflow/run-orchestrator.ts— cleanup registration block now delegates toregisterWorktreeRemovalCleanupbin/cli.ts,src/commands/abort.ts— citation fixsrc/lib/workflow/run-orchestrator.shutdown.test.ts— new regression test (real git worktrees, no mocks)Test plan
npx vitest run src/lib/workflow/run-orchestrator.shutdown.test.ts -t "935"→ passesnpm run build/npm run lint→ cleannpx vitest run): 3 pre-existing failures unrelated to this diff (batch-executor.test.ts,prompt-wait.test.ts,relay-hook.integration.test.ts— none of these files, or files they depend on, were touched by this PR; reproduced failing on an unmodified checkout of the same base commit)Closes #935