fix: add gt witness process command to invoke polecat cleanup handlers (gt-h3gzj)

The Witness handlers (HandlePolecatDone, HandleMerged, etc.) existed in Go
code but were never called - there was no CLI command to invoke them.

This caused polecats to remain in 'done' state after MR merge because
POLECAT_DONE messages were never processed.

Changes:
- Add `gt witness process <rig>` command to process Witness mail
- Fix --wisp flag to --ephemeral in cleanup wisp creation
- Command processes POLECAT_DONE, MERGED, HELP, SWARM_START messages
- Auto-nukes clean polecats, creates cleanup wisps for dirty ones

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/jack
2026-01-06 13:21:55 -08:00
committed by Steve Yegge
parent 74409dc32b
commit a3bccc881b
2 changed files with 228 additions and 5 deletions

View File

@@ -397,7 +397,7 @@ func createCleanupWisp(workDir, polecatName, issueID, branch string) (string, er
labels := strings.Join(CleanupWispLabels(polecatName, "pending"), ",")
output, err := util.ExecWithOutput(workDir, "bd", "create",
"--wisp",
"--ephemeral",
"--title", title,
"--description", description,
"--labels", labels,
@@ -431,7 +431,7 @@ func createSwarmWisp(workDir string, payload *SwarmStartPayload) (string, error)
labels := strings.Join(SwarmWispLabels(payload.SwarmID, payload.Total, 0, payload.StartedAt), ",")
output, err := util.ExecWithOutput(workDir, "bd", "create",
"--wisp",
"--ephemeral",
"--title", title,
"--description", description,
"--labels", labels,
@@ -450,7 +450,7 @@ func createSwarmWisp(workDir string, payload *SwarmStartPayload) (string, error)
// findCleanupWisp finds an existing cleanup wisp for a polecat.
func findCleanupWisp(workDir, polecatName string) (string, error) {
output, err := util.ExecWithOutput(workDir, "bd", "list",
"--wisp",
"--ephemeral",
"--labels", fmt.Sprintf("polecat:%s,state:merge-requested", polecatName),
"--status", "open",
"--json",