fix(kernel): route the last abort linker through the one cascade - #952
Merged
Conversation
#942 collapsed the abort cascade to one owner and missed this copy: it is named linkSignals, in a file the search for mergeAbortSignals and abortIfSignalled never covered. It carries the same defect — c.abort() with no argument on both branches — so a cascaded death through the worktree CLI executor still reached the worker's down record naming no cause. Its docstring also claimed to return undefined when neither signal is present, which the body never did.
drewstone
force-pushed
the
fix/last-abort-linker
branch
from
August 21, 2026 10:50
2c3d4ab to
15b4e92
Compare
tangletools
approved these changes
Aug 21, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — 15b4e92f
This PR was opened by the trusted drewstone account.
This approval is provisional and was applied by the local stand-in because the pr-reviewer webhook host is unreachable (2026-08-21). CI on this head is fully green. The full PR reviewer audit re-runs via the resweep when the service returns and will publish findings if it detects issues.
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.
Problem
#942 collapsed the supervision tree's abort cascade to one owner and reported "6 implementations → 1". The real count was 7. This copy survived because it is named
linkSignalsand lives insupervise/worktree-cli-executor.ts— a third name, in a file the search formergeAbortSignalsandabortIfSignallednever covered. I found it re-measuring after the merge, not before.It carries the same defect #942 fixed:
c.abort()with no argument on both branches, so a cascaded death through the worktree CLI executor still reaches the worker'sdownrecord naming no cause — the exact behaviourabort-reason.test.tsforbids.Its docstring also claims it "returns
undefinedwhen neither is present"; the body has no path that returnsundefined.Change
The one call site uses
linkAbortfromsupervise/abortable.ts. The copy and its stale docstring are deleted.Why long-term right
Same reason as #942 — one cascade, one reason rule — and this PR is the evidence for it: a primitive with three names in four files cannot be found by searching for any one of them. With the last copy gone,
grep -rn 'function linkSignals\|function mergeAbortSignals' src/returns nothing.Cost
1 file, net −16 lines. No public API change (
check:version-bump: consumer surface unchanged).Proof
pnpm run typecheck,pnpm run lint(613 files),pnpm run docs:check— clean.tests/runtime/worktree-cli-executor.test.ts,tests/mcp/worktree-harness.test.ts, plus both abort suites — 52 passed.Simplification
Simplification: the seventh and last hand-written abort cascade routed through the one owner; a docstring describing a return the function never makes, deleted with it.
Net: +2 / -18 lines, 1 file, 1 copy removed.
Not done here: none — this closes the primitive.
abortErrorstill has three factories andawaitAbortabletwo implementations, which #942 already named as its follow-up boundary and which remain out of scope for the same reason: collapsing them changes the messagethrowIfAbortedproduces at 135 call sites.Tests: +0. The contract is already pinned on
linkAbortbyabort-reason.test.ts(re-pointed at production in #942); this PR moves a call site onto that owner and introduces no behaviour of its own to pin.