feat(mq): auto-cleanup polecats after MR submission
When `gt mq submit` is run from a polecat work branch (polecat/<worker>/<issue>), it now automatically triggers polecat shutdown after submitting the MR. The polecat sends a lifecycle request to its Witness and waits for termination. This eliminates the need for polecats to manually run `gt handoff --shutdown` after completing work - they can just run `gt mq submit` and the cleanup happens automatically. Added `--no-cleanup` flag to disable auto-cleanup when needed (e.g., for submitting multiple MRs or continuing work). Closes gt-tca 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -436,8 +436,8 @@ func submitMRForPolecat() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Run gt mq submit
|
||||
submitCmd := exec.Command("gt", "mq", "submit")
|
||||
// Run gt mq submit --no-cleanup (handoff manages lifecycle itself)
|
||||
submitCmd := exec.Command("gt", "mq", "submit", "--no-cleanup")
|
||||
submitOutput, err := submitCmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s", strings.TrimSpace(string(submitOutput)))
|
||||
|
||||
Reference in New Issue
Block a user