Task: Add compass pr sync: fetch main and rebase, conflict-aware

Table of Contents

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

Every review round starts with fetch + rebase, and every conflict leaves the session improvising. compass pr sync makes step 1 one command: fetch origin/main, rebase the current branch, report how far ahead it is; --push force-pushes with lease after success. On conflicts: stop where git stops, list the conflicted files and the ways out (continue/abort); --abort-on-conflict rolls back automatically so unattended runs never strand a half-finished rebase.

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

  • compass pr sync [--push] [--abort-on-conflict] fetches, rebases, and reports; refuses on main and detached HEAD.
  • Conflict stop lists the files and prints continue/abort guidance; --abort-on-conflict restores the branch; both exit non-zero.
  • Non-conflict failures surface git's own message untouched.
  • The review-round runbook and the address-review-comments recipe lead 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
#1094 [agile] Close PR-management story: all six tasks DONE
#1092 [ores.compass] Add pr sync: conflict-aware fetch and rebase

Review

# Comment summary File Decision Notes
1 Merge cleanup claims deletion unconditionally; no main/master guard compass_pr.py Accepted verified + guarded; 7f95079aa

Result

Shipped in PR #1092 (merged 2026-06-05 by compass pr merge --force): fetch + rebase + ahead-count with --push (force-with-lease) and honest conflict handling (stop-with-guidance, --abort-on-conflict). The review-round runbook's step 1 is now one command. Also hardened pr merge's branch cleanup (worktree-safe, verified, main/master guarded).

Emacs 29.1 (Org mode 9.6.6)