Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
97a5222
Pick how to show what changed since the last round
catalan-adobe Nov 26, 2026
49b5e6d
Track each finding's status across rounds, and write the progress line
catalan-adobe Nov 26, 2026
a428099
Build round 2 and later on the last code review: earlier findings, wh…
catalan-adobe Nov 26, 2026
727f47d
Backfill counts each old round on its own, without carrying the round…
catalan-adobe Nov 26, 2026
27dbd66
Leave out what a base merge brought when picking what changed since t…
catalan-adobe Nov 26, 2026
52087fd
docs: PR 2 results on a real PR (preview round 3 on adobe/skills#823)
catalan-adobe Nov 26, 2026
838d33e
docs: record the posted round 3 on adobe/skills#823
catalan-adobe Nov 26, 2026
19d85cb
Accept a previous head or base from a marker only as a full commit ID
catalan-adobe Nov 26, 2026
27cfa6d
Review the whole PR when the base branch was merged in with conflicts
catalan-adobe Nov 26, 2026
51fe032
Compare binary files by blob ID, and review the whole PR when the fil…
catalan-adobe Nov 26, 2026
f109ea3
Deepen the PR and base histories once before refusing a PR without a …
catalan-adobe Nov 26, 2026
7921ae5
Review the whole PR when the last record lost its findings list
catalan-adobe Nov 26, 2026
19122ba
Keep watching the findings the last round fixed, even when none is le…
catalan-adobe Nov 26, 2026
6c17ee4
Keep a finding open unless a decline quotes its reason and Later fits…
catalan-adobe Nov 26, 2026
4a2ac78
Read IDs and the folded sections of a later-round review when the fin…
catalan-adobe Nov 26, 2026
52d369d
README: round 2 and later show the loop in the progress line
catalan-adobe Nov 26, 2026
d4fc2a2
Merge the review fixes of #8 into #9
catalan-adobe Nov 26, 2026
356fd67
Build the uppercase SHA fixture with tr, and fail a test script that …
catalan-adobe Nov 26, 2026
3b628b1
Keep the previous severity when a status update is rejected
catalan-adobe Nov 26, 2026
7ecfa5a
Allow a status-only findings entry only for an ID the last code revie…
catalan-adobe Nov 26, 2026
17f5154
Check Later candidates against the files the delta touched
catalan-adobe Nov 26, 2026
6280f7e
Read a later round without its marker as a round without a findings list
catalan-adobe Nov 26, 2026
8257680
Review the whole PR when its base is not a descendant of the previous…
catalan-adobe Nov 26, 2026
68b1497
Compare a rebased file's two versions directly when the base left it …
catalan-adobe Nov 26, 2026
5808f3e
Recover a carried finding's file and title from earlier rounds, and t…
catalan-adobe Nov 26, 2026
38079a2
Wrap the long lines of records.jq
catalan-adobe Nov 26, 2026
0b415ba
Give marker_line a record file in the markerless-round test, as Bash …
catalan-adobe Nov 26, 2026
4947ca0
Check the markerless-round fixture with a real marker first
catalan-adobe Nov 26, 2026
a1b34f1
Merge the second-round review fixes of #8 into #9
catalan-adobe Nov 26, 2026
25a0e57
Merge the third-round review fixes of #8 into #9
catalan-adobe Nov 27, 2026
a69aaf3
Merge the fourth-round review fixes of #8 into #9
catalan-adobe Nov 27, 2026
a08e13f
Merge the fifth-round review fixes of #8 into #9
catalan-adobe Nov 27, 2026
943a157
Skip outsiders' generated reviews when reading the previous round's text
catalan-adobe Nov 27, 2026
356961f
Merge the sixth-round review fixes of #8 into #9
catalan-adobe Nov 27, 2026
bfb1206
Merge main (#10) into #9
catalan-adobe Nov 27, 2026
c701fa7
Approve automatically only on a record that shows zero open blockers
catalan-adobe Nov 28, 2026
78a5269
Review the whole PR when the previous round's base is unknown
catalan-adobe Nov 28, 2026
d16d8c9
List every PR file the base changed in a rebased round
catalan-adobe Nov 28, 2026
81c680d
Keep a promoted Later finding that the Markdown shows in its Later list
catalan-adobe Nov 28, 2026
86210e4
Mark a later round whose record failed, and read its count back as un…
catalan-adobe Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 70 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ Inside a repo clone, a bare number works: `gh pr-review 42`.
| `--no-post` | posting on (with confirm) | Print the review only |
| `--instructions <text>` | none | Extra guidance for both passes, for example `"Focus on db/; skip style nits"`. For a file: `--instructions "$(cat notes.md)"`. The tool does not post them, and the reviewer is told not to quote them, but the review can still reflect them: use `--no-post` to preview a review shaped by sensitive notes |
| `--skip-approach` | off | Skip the maintainer's approach pass and run the code review only, for example when the approach is already agreed |
| `--decision <d>` | from verdict | `comment`, `approve`, `request-changes`. Unset: an approach verdict of Rethink → request-changes. Otherwise the last "Ready to merge?" line decides: No → request-changes, a bare Yes → approve (comment when the round's blocker count is unknown, as for a code review read from its Markdown with no severity section; a valid empty findings block is a known zero, and approves), anything else (Yes with fixes, Yes, with fixes, …) → comment. On your own PR it is always comment. `-y` submits the decision without asking |
| `--decision <d>` | from verdict | `comment`, `approve`, `request-changes`. Unset: an approach verdict of Rethink → request-changes. Otherwise the last "Ready to merge?" line decides: No → request-changes, a bare Yes → approve only when the round's record shows 0 open blockers (comment when blockers are open, or when the count is unknown, as for a code review read from its Markdown with no severity section; a valid empty findings block is a known zero, and approves), anything else (Yes with fixes, Yes, with fixes, …) → comment. On your own PR it is always comment. `-y` submits the decision without asking |
| `-y`, `--yes` | off | Skip the confirmations. A loop-check stop then exits with code 3, and no new commits with code 5, instead of asking |
| `--check` | off | Run only the loop check (see below) and exit 0, 3 or 5. No clone, no model call |
| `--json` | off | With `--check`: print the decision as JSON on stdout |
| `--force-round` | off | Run a round even when the loop check stops it or nothing changed |
| `--full` | off | Review the whole PR again, as in round 1. Earlier findings are still re-checked by ID |
| `--doctor` | — | Check prerequisites and exit |

Environment variables: `GH_PR_REVIEW_MODEL` (default model),
Expand Down Expand Up @@ -169,8 +170,12 @@ next round: stop · churning · approach-stuck too-big · Settle the approach be

The Markdown is the cross-check for the model's findings block: it is parsed
before the block is accepted, and a block that leaves out a blocker the Markdown
shows, or has one where it says none, is rejected. It is also the source when
the block is rejected, and for a review without a usable marker. The reader
shows, or has one where it says none, is rejected. A Later item that can't be
Later (it is in what changed) is kept as a finding: the Markdown showing it in
its Later list instead of its severity section is no contradiction. The
Markdown is also the source when the block is rejected, and for a review
without a usable marker; when the rejected block had such an item, the
Markdown can't count it, so the round's blocker count is unknown. The reader
follows the format the tool asks the model for (the `### Issues` section with
severity headings, findings as list items, the folded Fixed and Later lists,
each `<details>` tag on its own line), and is best effort for other Markdown:
Expand All @@ -193,6 +198,56 @@ its Markdown has no severity section to rebuild one from (never read as 0, so
never `ready`). `--json` prints the records and the decision; `-u <login>`
picks the gh account, as for a review.

## Round 2 and later

From the second round, the reviewer builds on the last code review instead of
starting over:

1. **Earlier findings are re-checked by ID.** Each one comes back `fixed`,
`open` (a fix attempt that did not work stays open) or `declined` (only with
a reason from the PR discussion, quoted; without one it stays open). The
findings that round fixed are listed too: one that comes back keeps its ID
and is `regressed`. One the reviewer forgets is kept `open` and marked as
not re-checked: nothing disappears silently.
2. **What changed since that round is reviewed in full**, at every severity:
`git diff <previous head>..<head>`, or `git range-diff` when the author
rebased.
3. **Outside what changed, only Critical findings are raised.** Important and
Minor issues there go to a folded **Later** list. Later items don't block
the PR, and can become follow-up issues. A Critical finding, or one in
what changed, is never Later.

The owner pass starts from its previous verdict, and keeps it in one line
unless the changes or the discussion change it. After a Rethink it judges
afresh.

The posted review opens with a progress line counted from the round record,
not from the model's text:

```
### Round 3 · since round 2
4 fixed · 2 still open · 3 new (1 in the new commits) · open blocking: 5 (was 6) · loop: converging
```

Fixed findings and the Later list follow the open ones, folded. "Ready to
merge? Yes" with blocking findings still open posts as a comment: the record
wins.

A later round read back from its Markdown (no marker, or one without the full
counts) takes its open blocking count from the progress line: its Markdown
leaves out the findings it carried without re-checking them. The IDs in its
Fixed list are never open, and every ID it shows, and every Later item, keeps
its number reserved.

When the comparison is not safe, the round is a full review, and it says why:
the previous head is gone (a force-push), the base branch was merged in with
conflicts, the PR's base changed (a retarget), the last round's base is unknown
(a review read back from its Markdown), git cannot list the changed files, or
the last round's record lost its findings to GitHub's size cap or could not be
built. A later round whose record could not be built still posts a minimal
marker that says so: read back, its blocker count is unknown, never 0. `--full` asks for one, for example after a
rewrite.

## Loop check

Before a round, the tool reads the PR's earlier rounds and decides whether
Expand All @@ -202,9 +257,18 @@ Important) of each round:
- **Converging:** the count drops (to 1 or less, or by 30% over two rounds).
The round runs.
- **Nit loop** (3 or fewer, no Critical) or **Churning** (anything else) after
the first 3 rounds: a warning. The round runs, and the posted review starts
with a line such as
`**Loop:** Churning · blocking 9, 12, 8 · Split the PR: each part converges on its own`.
the first 3 rounds: a warning. The round runs. Its posted review opens with
the progress line (see above), which carries the loop label, and a
suggested move under it:

```
### Round 4 · since round 3
2 fixed · 6 still open · 4 new · open blocking: 10 (was 8) · loop: churning
**Next:** Split the PR: each part converges on its own
```

Without a round record to count from, the review opens with the older
one-line form instead: `**Loop:** Churning · blocking 9, 12, 8 · …`.
- **Two such rounds in a row:** the round stops before any clone or model
call. In a terminal it asks first; with `-y` (scripts and agents) it exits
with code 3. The suggested move comes from the history: settle the approach,
Expand Down
49 changes: 49 additions & 0 deletions docs/superpowers/specs/2026-11-26-review-tracking-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,52 @@ Nothing was posted.
The whole suite passes on macOS (BSD userland, jq 1.8.2) and in an Ubuntu 24.04 container (mawk, jq 1.7, no
`column`). The first Linux run caught one bug: `column` turned the `–` placeholder into byte escapes outside a UTF-8
locale. `rounds` now pads its table in jq.

## PR 2: incremental rounds

Date: 2026-11-26. Branch `review-tracking`. No round was posted.

### Preview round 3 on adobe/skills#823

`gh pr-review https://github.com/adobe/skills/pull/823 --no-post`, model `github-copilot/gpt-5.6-sol`. Rounds 1 and
2 predate the records, so round 3 builds on the backfilled round 2: 8 findings with IDs F11 to F18.

| Check | Result |
| --- | --- |
| Mode | `incremental`: the author merged `main` into the PR since round 2, so the delta starts from round 2's head merged onto the new base |
| Files the delta touched | 11, all in the PR (a plain diff from round 2's head listed 32: 21 came from `main`) |
| Earlier IDs accounted for | 8 of 8: 5 fixed, 2 open, 1 declined (with the author's reason quoted), 0 not re-checked |
| New findings | 2 (F19, F20), both in the new commits. Later list: empty |
| Open blocking | 3 (was 7): 1 Critical, 2 Important. Label `converging` (series 9, 7, 3) |
| Progress line | `5 fixed · 2 still open · 2 new (2 in the new commits) · 1 declined · open blocking: 3 (was 7) · loop: converging`, the same numbers as `round.json` |
| Owner pass | Got its round 2 verdict (Questionable) and the delta. It changed the verdict to Sound and wrote the full section |
| Findings block | Present (10 entries), cut from the body. No loop line next to the progress line |

The model set `in_delta: true` on the earlier findings too. It only matters for new findings (the progress line
counts those), so the record keeps it as given.

### Bugs this check found, fixed before the run above

- **Backfill carried every earlier finding.** With statuses, a backfilled round carried the round before it as
"open, not re-checked", so the backfilled blocking series grew (adobe/skills#813: 9, 21, 29, …). An old review says
nothing about what was fixed, so backfill now uses the previous record for ID numbers only. The 12 calibration PRs
match the spec's table again.
- **A merge of the base branch counted as the author's change.** A plain `git diff <previous head>..<head>` included
everything `main` brought in. The delta now compares with the previous head merged onto the new base
(`git merge-tree --write-tree`), and falls back to a range-diff when that merge conflicts.

### Posted round 3 on adobe/skills#823

With approval, the previewed review above was posted as a comment (my own PR) through the tool's posting functions:
the same body, the round marker, `gh pr review --comment`. The head was unchanged since the preview.

- On GitHub the review opens with the progress line. Body 11,208 characters, marker 3,264.
- `gh pr-review rounds` reads round 3 from its marker: `source: model`, 1 Critical, 2 Important and 1 Minor open,
label `converging`, 4 commits since round 2.
- `gh pr-review <PR> --check` then says "no new commits since round 3" (exit 5).

### Not checked yet

- A rebase between two rounds on a real PR: none at hand. The rebase, force-push and shallow cases are covered by
`tests/delta.sh` with real git.
- A full posted run through the interactive prompt (the agent's shell has no terminal).
Loading