Handle a PR review round

Table of Contents

This page documents a runbook — a named, repeatable composition of recipes and skills for a complete multi-step procedure. Each step references a recipe or skill by id-link.

Goal

Handle one complete review round: sync with main, read all review comments, decide accept/decline per comment, apply fixes, push, reply to every comment, resolve threads, and record the round in the task.

Preconditions

  • PR is open with review comments.
  • You are on the feature branch.
  • SSH_AUTH_SOCK is exported (see SSH memory).

Steps

In execution order:

  1. Gate: confirm there is a round to handle. compass review list <N> --detail before anything else:

    • No comments yet, or the reviewer is still running ("Working on review…" placeholders) → stop and wait; do not sync.
    • Every comment already has a reply and all threads are resolved → the round is done; stop.

    Only proceed when unaddressed comments exist. Syncing first churns CI and forces a force-push even when there is nothing to do.

  2. Sync with main. compass pr sync — fetch, rebase, and report; on conflicts it stops with the conflicted files and the ways out. Never address review comments on a stale branch.
  3. Check CI status. Before reading comments, inspect the current CI state:

    compass pr checks <N>
    
    • If any check is failing, identify and fix the root cause first — as a separate commit — before looking at review comments. A CI failure may explain or supersede some review comments.
    • If checks are pending / running, notify the user and proceed to step 3; CI will be re-verified after fixes are pushed (step 7).
    • If CI is green, proceed immediately.
  4. Read the comments. compass review list <N> --detail — line-level threads and conversation-level comments/review summaries in one view. See How do I address PR review comments? step 1.
  5. Decide per comment. For each comment, make an explicit accept/decline decision. Never silently ignore a comment.
  6. Apply fixes. One commit per logical fix. Never amend commits on a branch under review. Use commit conventions.
  7. Push. git push.
  8. Verify CI is green. Re-run compass pr checks <N> (or --watch to poll) and wait until no checks are pending. If any check fails, fix, commit, push, and repeat this step. Do not reply to review comments while CI is red.
  9. Reply to every comment. Accepted: "Fixed in commit <sha> — <description>." Declined: "Not changed. <reason>." Use compass review reply <N> <comment-id> "<message>" per the recipe.
  10. Resolve threads. compass review resolve <N> (--dry-run to preview).
  11. Record the round. Add or update the * Review table in the task doc per step 7 of the review recipe.
  12. If this was the final round and the PR delivers the task, end the bookkeeping now so it rides the PR: compass task done <slug>, write the * Result, commit, push. Then merge — compass pr merge never touches task state.

Postconditions

  • All CI checks on the PR are green.
  • All review comments have replies.
  • All threads are resolved.
  • Review round is recorded in the task's * Review table.
  • Branch is pushed and PR is updated.

See also

Emacs 29.1 (Org mode 9.6.6)