Uh oh!
There was an error while loading. Please reload this page.
feat(runtime): isolate implementation operators in Git worktrees - #1570
Merged
Conversation
likun666661
marked this pull request as ready for review
July 28, 2026 13:40
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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
Follow-up to #1341: make code-changing child operators usable without teaching the graph scheduler about Git.
SubagentWorktreeExecutorcapability and a strict, immutable workspace binding on linked child Sessions;implementationcatalog profile only when the host supplies the executor, across Graph,agent_spawn, and Swarm paths;Two Graph implementation operators now receive distinct worktrees and can edit concurrently. Allocation for one Git common directory is serialized to avoid
.git/configlock races; Agent execution remains concurrent.Safety and boundaries
Validation
npm run buildnpm run lint -- --diagnostic-level=errorFull Runtime/Headless sweeps also surfaced pre-existing environment-specific failures unrelated to this diff: one macOS executable-root assertion and two Python 3.9 Harbor adapter tests.
中文说明
这是 #1341 的后续能力:让会改代码的 Graph operator 真正拥有独立 worktree,同时不把 Git 逻辑塞进 graph scheduler。
SubagentWorktreeExecutor,并把不可变的 workspace binding 持久化到 child Session 的 SQLite metadata;implementationprofile 只有在 host 提供 executor 时才可用,Graph、agent_spawn、Swarm 统一走 SessionManager 的能力判断;现在 Graph 中 A/B 两个 implementation operator 会得到不同的 worktree,可以并行改代码。同一 Git 仓库的“分配事务”会短暂串行,以避免
.git/configlock 冲突;Agent 的实际执行仍然并行。安全边界:非 Git 项目直接失败;父 worktree 有未提交修改时也直接失败,避免 child 静默遗漏用户本地修改。本 PR 不负责自动 merge、自动清理 worktree 或新增 worktree UI。