From b68cbf582fe7a0982c8d24134cc4a568967346d8 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 28 Dec 2025 16:31:04 -0800 Subject: [PATCH] refinery patrol: Reorder merge-push for reliable MERGED notification (gt-kfznm) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Notifications now come immediately after push, before cleanup - Added STOP HERE warning after push - Made verification gate more emphatic - Cleanup happens only after notifications confirmed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../formulas/mol-refinery-patrol.formula.toml | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.beads/formulas/mol-refinery-patrol.formula.toml b/.beads/formulas/mol-refinery-patrol.formula.toml index 0d6de76a..4ccb1e6f 100644 --- a/.beads/formulas/mol-refinery-patrol.formula.toml +++ b/.beads/formulas/mol-refinery-patrol.formula.toml @@ -161,20 +161,20 @@ id = "merge-push" title = "Merge and push to main" needs = ["handle-failures"] description = """ -Merge to main and push immediately. +Merge to main and push. CRITICAL: Notifications come IMMEDIATELY after push. -**Step 1: Merge** +**Step 1: Merge and Push** ```bash git checkout main git merge --ff-only temp git push origin main -git branch -d temp -git push origin --delete # Delete remote polecat branch ``` -**Step 2: Notify Witness (REQUIRED - DO NOT SKIP)** +⚠️ **STOP HERE - DO NOT PROCEED UNTIL STEPS 2-3 COMPLETE** -After successful merge, you MUST send MERGED mail to Witness: +**Step 2: Send MERGED Notification (REQUIRED - DO THIS IMMEDIATELY)** + +RIGHT NOW, before any cleanup, send MERGED mail to Witness: ```bash gt mail send /witness -s "MERGED " -m "Branch: @@ -182,25 +182,31 @@ Issue: Merged-At: $(date -u +%Y-%m-%dT%H:%M:%SZ)" ``` -This signals the Witness to nuke the polecat worktree. Without this notification, -polecat worktrees accumulate indefinitely. +This signals the Witness to nuke the polecat worktree. WITHOUT THIS NOTIFICATION, +POLECAT WORKTREES ACCUMULATE INDEFINITELY AND THE LIFECYCLE BREAKS. -**Step 3: Close MR bead (REQUIRED - DO NOT SKIP)** - -Close the merge-request bead that was created when polecat ran `gt done`: +**Step 3: Close MR Bead (REQUIRED - DO THIS IMMEDIATELY)** ```bash bd close --reason "Merged to main at $(git rev-parse --short HEAD)" ``` -The MR bead ID was included in the MERGE_READY message or can be found via: +The MR bead ID was in the MERGE_READY message or find via: ```bash bd list --type=merge-request --status=open | grep ``` -**Verification**: Before proceeding, confirm: -- [ ] MERGED mail sent to witness -- [ ] MR bead closed +**Step 4: Cleanup (only after Steps 2-3 confirmed)** +```bash +git branch -d temp +git push origin --delete +``` + +**VERIFICATION GATE**: You CANNOT proceed to loop-check without: +- [x] MERGED mail sent to witness +- [x] MR bead closed + +If you skipped notifications, GO BACK AND SEND THEM NOW. Main has moved. Any remaining branches need rebasing on new baseline."""