Repository navigation
feat(server): isolate remotely delegated tasks in worktrees - #754
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
43321c6 to
02c3d85
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Remote tasks that need a separate checkout previously had to launch a top-level thread. Fetch the parent commit on the destination and prepare the worktree before starting the owned task. Built by GPT-6.2 Sol in Codex. Carry-Group: incubator Carry-Fix: #751 Carry-Observation: Keep the wire capability, durable launch intent, worktree preparation, and its tests together.
Some Git servers refuse requests for older object IDs. Fetch the initiating branch when needed, verify it contains the pinned commit, and use the normal worktree fetch timeout. Built by GPT-6.2 Sol in Codex. Carry-Group: incubator Carry-Fix: #751
Run fetches in the destination’s owned preparation run so an idle peer request cannot lose the checkout. Find a containing published branch for a detached base that the remote refuses to serve by object ID. Built by GPT-6.2 Sol in Codex. Carry-Group: incubator Carry-Fix: #751
A source checkout can have a published HEAD without its own Git remote. Resolve HEAD on the source and leave fetchability to the explicitly selected destination. Built by GPT-6.2 Sol in Codex. Carry-Group: incubator Carry-Fix: #751
Keep the remote worktree requirement in the isolation field and put recovery guidance in the refusal. Regenerate the tool budget. Built by GPT-6.2 Sol in Codex. Carry-Group: incubator Carry-Fix: #751
Resolve the parent HEAD, validate the new destination, and choose the activation mode in fork-owned helpers. Keep the existing preparation and failure order. Built by GPT-6.2 Sol in Codex. Carry-Group: incubator Carry-Fix: #751
02c3d85 to
a557612
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Part of #751
What changes
HEADof the initiating checkout, whether that is the parent thread’s worktree or the project root. Uncommitted edits stay out. With an explicit destination project, the source checkout can lack a Git remote.features.remoteWorktreeIsolationVersion: 1. An older peer refuses isolation before creating a thread. The source also checks that the prepared delegation confirms the exact commit before activating it.Verification
a557612845747a4833b532abc1d2a038f21f15e4. Server typechecking, targeted lint, 38 focused helper and integration tests, and both context-budget tests passed for the refactor. After rebasing over the thread-ownership changes on main, 17 focused suspension, helper, and budget tests passed. The tool context increase remains 142 bytes.baseRefargument. The shared-checkout control and local worktree delegation case each passed 3/3. The full run with the earlier wording scored 91% across 594 samples, with both remote delegation cases passing 2/2.Local review: 4 rounds Terra xhigh; churn-gate substituted by one confirming round (judge model unavailable)
The confirming round verified the four earlier fixes. Its setup-script finding describes the existing asynchronous mode shared by local and remote tasks. The existing test explicitly checks that this mode releases the provider while its setup script is running.
One additional Terra xhigh round approved the fork-owned refactor.
Upstream-owned files
Parent HEAD resolution and destination validation now live in
remoteWorktreeDelegation.ts. Activation mode is selected by a pure function inremoteOwnership.ts. Destination validation checks conflicting launch options before dispatch, then checks Scratch after project selection so it preserves accepted-launch replay. New helper tests are fork-owned.Line counts compare the PR with its LastCode base. Ownership is checked against
origin/main.apps/server/src/git/GitWorkflowService.tsapps/server/src/mcp/OrchestratorMcpService.tsapps/server/src/mcp/toolkits/project/handlers.tsapps/server/src/mcp/toolkits/project/tools.tsapps/server/src/orchestration-v2/Orchestrator.tsapps/server/src/orchestration-v2/ThreadLaunchService.test.tsapps/server/src/orchestration-v2/ThreadLaunchService.tsapps/server/src/peer/RemoteDelegation.test.tsapps/server/src/peer/RemoteDelegation.tsapps/server/src/provider/agentContextBudget.jsonapps/server/src/vcs/GitVcsDriverCore.tsevals/README.mdevals/mcp-tool-use/cases/orchestration.ndjsonpackages/contracts/src/orchestrationV2.tspackages/contracts/src/orchestratorMcp.tsFollow-up
Consider using an already-present commit when a destination Git remote is unreachable. An unconditional local lookup could also accept a commit that the remote no longer serves, so this PR keeps the publication check.
Built by GPT-6.2 Sol in Codex.