Fall back to prune-based removal for submodule-bearing worktrees #6

Merged
weichen merged 1 commits from fix/task-finish-remove into main 2026-09-30 03:37:20 +00:00
Owner

task-finish 回收通路第二击:git 对含 gitlink 的 worktree 无条件拒绝 remove(索引级检查,deinit 不绕过)。合入验证+deinit 之后自动 rm -rf+prune 兜底。守卫不变。证据:tool-adaptation 任务现场复现并手验通路。

task-finish 回收通路第二击:git 对含 gitlink 的 worktree 无条件拒绝 remove(索引级检查,deinit 不绕过)。合入验证+deinit 之后自动 rm -rf+prune 兜底。守卫不变。证据:tool-adaptation 任务现场复现并手验通路。
weichen added 1 commit 2026-09-30 03:37:19 +00:00
Why: git unconditionally refuses worktree remove when the tree contains
gitlinks (index-level check; deinit does not bypass it), so the PR#4 fix
path still failed on the second real task.
Evidence: after deinit the worktree was clean and submodule dirs empty, yet
remove refused; rm -rf + worktree prune is the documented workaround and
was proven manually on the empty-list task worktree.
Impact: task-finish now completes the recycle path automatically after its
merge verification; no guard weakened.
Refs: Agent-System-Dev PR#4; policy/tool-adaptation-matrix.md A5
weichen merged commit 1e08eb6ba2 into main 2026-09-30 03:37:20 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Dev#6