Task: Add compass pr merge with guard rails
This page documents a task in the Add PR management support to compass story. It captures the goal, current status, acceptance, and any notes or results.
Goal
compass pr merge <N> closes out a PR with guard rails: refuses to
merge while review threads are unresolved or CI is red, merges via
gh, deletes the remote branch, and prompts the task/journal
close-out. Replaces the merge recipe's raw gh pr merge.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Add PR management support to compass |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-06-05 |
Acceptance
- Merge is a merge commit — never squash, never rebase — matching
the repository's history (
gh pr merge --merge). - Default guard rails: refuse while review threads are unresolved or CI is red/pending.
--forceoverrides the guards (merge with red CI), stating loudly what was bypassed.- Deletes the remote branch after merge; prompts the task/journal close-out.
- The merge recipe leads with the command.
Plan
(Transient implementation strategy. Written when work starts;
distilled into the parent story's * Decisions and cleared when the
task closes. Plans do not outlive their task.)
Notes
PRs
| PR | Title |
|---|---|
| #1088 | [ores.compass] Add pr merge with guard rails; scaffold pr sync |
Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | pr=0 treated as falsy; validate positive integer | compass_pr.py | Accepted | 9def8887f; record fixed too |
| 2 | pr positional should default to None not 0 | compass_pr.py | Accepted | 9def8887f |
Result
Shipped in PR #1088 (merged 2026-06-05 — by the command itself, the
first compass-driven merge). Guard rails proven live: the command
refused its own PR on unresolved threads + pending CI; --force
exercised the gh --admin path against base branch protection; the
multi-worktree cleanup issue (gh –delete-branch checks out main)
found and fixed by deleting the remote branch directly.