Repository navigation
feat(pair): delete executors left behind by abandoned drafts - #656
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
rynfar
force-pushed
the
feat/pair-orphans
branch
from
September 18, 2026 22:11
cadfec8 to
098f6e9
Compare
This branch was successfully deployed
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.
What
When the server starts, it deletes pair executors that nothing will ever brief.
Why
Turning Pair on in a draft creates the executor before the lead thread exists, because the first send creates the lead, its worktree and its first turn in one step. If the draft is abandoned, or its id changes before that first send, the executor stays forever as an empty "Executor · New thread" in the delegated group.
How
orphanedExecutorIds(pure) is deliberately conservative. A missing lead proves nothing on its own, since that is what every freshly paired draft looks like. An executor counts only if it is a pair executor, its lead is not among the active or archived threads, it never ran (no turn, no session), and it is more than a day old.PairLifecycleReactor.startruns the sweep once before subscribing to events and dispatchesthread.deletewith a deterministic command id, so a restart replays harmlessly. A failed sweep logs a warning and never stops the reactor from starting.Verification
vp test runonapps/server/src/orchestrationandapps/server/src/mcp/toolkits: 957 passed. New, written first and seen failing: the pure rule with six "leave it alone" cases (existing lead, fresh draft, an executor that ran, one with a session, a fan-out child, an ordinary thread), and a reactor test where only the abandoned draft's executor is deleted while an executor whose lead is archived is kept.t3: 0 errors. Lint, format andvp run knip:checkclean.How it was built
Second change made through pair mode on a real install: Claude lead, Antigravity executor, one shared worktree, tests protected (
protectedPaths: checked 2, changed []). One lead correction after review: the executor had made production code fall back to the snapshot time when the clock read zero, to get past a test running under a test clock. The test now sets the clock and the reactor reads it plainly.Part of #622.
Model: Claude Fable 5.1 (lead) with an Antigravity executor, paired in Pylon via the Claude Code harness.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.