fix(workflow): wt-rm removes only the named worktree (was auto-sweeping merged ones)

The first wt-clean.sh removed every worktree whose branch was merged into
origin/main — but long-lived branches (website, the ci line) are merged too,
so it would have deleted their worktrees. Caught on review before any real use.

Replace the auto-sweep with an explicit `wt-rm <branch>` that removes only the
named worktree; safety comes from git's own refusals — it won't remove a dirty
worktree (no --force) and deletes the local branch only when it's merged into
origin/main, otherwise keeps it (and its unmerged commits).

Update test-wt.sh to 15 checks (incl. "unnamed worktree untouched", primary
refused, dirty refused, unmerged branch preserved) and the wt-clean references
in ADR-0059 / CLAUDE.md / the README index.
This commit is contained in:
claude@clouddev1
2026-06-23 21:27:41 +00:00
parent 3585cca5ea
commit 4570c4e1ea
6 changed files with 126 additions and 94 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long