fix: Witness cleanup uses gt polecat nuke for correct repo base

The witness template previously instructed using raw git commands:
- git worktree remove polecats/<name>
- git branch -d polecat/<name>

This failed because git worktree operations must run from the repo
that created the worktree (mayor/rig or .repo.git), not the rig root.

Now uses `gt polecat nuke` which handles repo base detection via
the repoBase() function and properly cleans up worktrees.

Fixes gt-gp6i

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-30 00:49:10 -08:00
parent a68cf54057
commit d8be33d13e

View File

@@ -59,10 +59,13 @@ Before killing ANY polecat session, verify:
Polecat: <polecat>
Verified: clean git state, issue closed"
```
2. **Kill session**: `tmux kill-session -t gt-{{RIG}}-<name>`
3. Remove worktree: `git worktree remove polecats/<name>` (if ephemeral)
4. Delete branch: `git branch -d polecat/<name>` (if ephemeral)
5. **Notify Mayor** (for tracking):
2. **Nuke the polecat** (kills session, removes worktree, deletes branch):
```bash
gt polecat nuke {{RIG}}/<name>
```
NOTE: Use `gt polecat nuke` instead of raw git commands. It knows the correct
worktree parent repo (mayor/rig or .repo.git) and handles cleanup properly.
3. **Notify Mayor** (for tracking):
```bash
gt mail send mayor/ -s "Polecat <name> processed" -m "Work: <issue>
MR sent to refinery for branch: <branch>"