fix(kanban): isolate worker-created child workspaces - #67570
peacockesq wants to merge 2 commits into
Conversation
Default kanban_create children now keep fresh scratch paths, while explicit dir sharing remains supported and project context resolves to a per-task worktree. Surface resolved workspace fields in create responses/events and cover scratch mutation, nesting, explicit sharing, and project inheritance. Fixes NousResearch#67567
|
Thanks for the focused isolation fix. The premise is verified against current main: The change removes that literal workspace inheritance while retaining only Automated hermes-sweeper review. |
|
Reviewed against #67567. This PR closes the whole issue, not just the reported scratch case. Root cause / fix — correct.
The Overlap — consistent with the #61907 worktree-sibling lane (that PR left One note vs the sibling PR #67574: that one special-cases only |
|
Merged via #70143 — both of your commits were cherry-picked onto current main with your authorship preserved in git history (merge SHA 781968b). Thanks for the complete treatment: the isolation matrix tests, the explicit-sharing escape hatch, and the cross-profile project_source_task_id routing fallback all landed as-is. |
Summary
kanban_createfrom implicitly copying a running worker's literalworkspace_kind/workspace_pathinto a child.scratch, unmaterialized path) so dispatch resolves<board>/workspaces/<child-id>.project_id, which resolves to a fresh per-task worktree and branch.workspace_kind=dirandworkspace_path.createdevent.Fixes #67567.
Root cause and RED proof
tools/kanban_tools.py::_handle_createtreated omitted workspace fields as a request to copy the parent worker task's literal workspace fields. A materialized scratch review parent therefore produced a child row pointing at the same directory.On unpatched
main, the new focused matrix reproduced the defect:The scratch test also models a parent review-evidence file and a child write, proving the paths cannot alias after the fix.
Behavior after this change
workspace_path=NULLuntil dispatchscratchdir+ pathVerification
Exact implementation commit at PR creation:
ce80a54436a56062c94defc86e4a6a515410237b(treeb3aaa09223d2cf494bb7ae59249ed68c59b22003).