Skip to content

fix(sweep): clamp system-dir worktree_root to the loop's namespace (#451)#452

Merged
hadamrd merged 1 commit into
trunkfrom
fix/451-namespace-reaper
Jun 11, 2026
Merged

fix(sweep): clamp system-dir worktree_root to the loop's namespace (#451)#452
hadamrd merged 1 commit into
trunkfrom
fix/451-namespace-reaper

Conversation

@hadamrd

@hadamrd hadamrd commented Jun 11, 2026

Copy link
Copy Markdown
Owner

A live run configured worktree_root: /tmp; the sweep then treated every
/tmp worktree as loop-owned and force-removed two OPERATOR worktrees
(one seconds old — uncommitted work destroyed; evidence on #451).

Roots resolving to /, /tmp, /var/tmp, /home or $HOME are now clamped to
worktree_base(repo) and a worktree_root_clamped event is emitted so the
operator sees the config smell. Narrow roots behave exactly as before.

Closes #451.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

)

A live run configured worktree_root: /tmp; the sweep then treated every
/tmp worktree as loop-owned and force-removed two OPERATOR worktrees
(one seconds old — uncommitted work destroyed; evidence on #451).

Roots resolving to /, /tmp, /var/tmp, /home or $HOME are now clamped to
worktree_base(repo) and a worktree_root_clamped event is emitted so the
operator sees the config smell. Narrow roots behave exactly as before.

Closes #451.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hadamrd hadamrd merged commit e457519 into trunk Jun 11, 2026
1 check passed
@hadamrd hadamrd deleted the fix/451-namespace-reaper branch June 11, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Worktree reaper culls OPERATOR worktrees — must be namespaced to wt-loop-*

1 participant