Fix stale orchestration bundle path after lane VM placement change#376
Closed
cursor[bot] wants to merge 1 commit into
Closed
Fix stale orchestration bundle path after lane VM placement change#376cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
When a lane moves between local and Mac VM, IPC resolves the bundle from the current worktree but agent sessions kept the old orchestrationBundlePath. Repoint persisted session paths and relocate in-memory run runtimes on lane-placement-changed events. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Owner
|
Closing in favor of #382. I validated the stale orchestration bundle path issue and folded the fixed relocation behavior into the combined orchestration hardening lane. |
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.
Bug and impact
Orchestration split-brain after lane placement change (critical correctness)
When a lane moves between local worktree and Mac VM (or back),
handleLanePlacementChangedrefreshed chat execution context but leftorchestrationBundlePathpointing at the old worktree. Agent tools and sandbox protection used the stale path while the Orchestration panel IPC resolved the bundle from the currentgetLaneWorktreePath, causing manifest/code divergence and workers editing the wrong tree.Concrete trigger: Start an orchestration run on a local lane → attach lane to Mac VM (or detach) mid-run → lead spawns workers → workers read/write
.ade/orchestration/<runId>under the old path while the UI shows state from the new worktree.Root cause
orchestrationBundlePathis set at session creation and never updated onlane-placement-changed.getOrCreateRuntimepinned the first bundle path seen for arunIdand ignored later paths.Fix
laneWorktreePath+orchestrationRunId, persist on the session, and callrelocateRunBundle.Validation
npm run test -- --run src/main/services/orchestration/orchestrationService.test.ts -t "relocates in-memory"npm run test -- --run src/main/services/chat/agentChatService.test.ts -t "repoints orchestration bundle"Does not overlap open draft PRs for orchestration manifest clobber (#375/#365), plan approval bypass (#364), sync/CRR (#367/#363/#372), or Linear review bypass (#374).