Keep a pull request's review count intact when a posted description brings its own run history (GST-2707) (#4440)

When `/ship` posts a pull request's description, the count of earlier
review rounds now always comes from the PR's real history. Before this
fix, a description that brought extra history blocks of its own could
make gstack count one round where there were three.

Why: the per-PR round cap (R51) depends on that count, and it's the last
gap before crews can stop counting rounds by hand.

Nothing to do as a reader.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=red-team
Review-Finding: p1/specialist-batched#2 reader=testing
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-17 14:10:23 +00:00
1 parent eff8b78dce
commit b79843c5d7
4 files changed
+59 -8

No files matched your search

+3 -1
View File
@@ -159,7 +159,9 @@ caught on another crew's PRs.
run still reviews its head in full; what's lost is the cap on earlier
runs, so check the PR body by hand when that line shows. A `/ship` body
post keeps the live `gstack-receipt-runs` block (`lib/gstack-post.ts`), so
earlier runs and started stubs stay countable.
earlier runs and started stubs stay countable. Any runs block the posted
body brings in its own Agent notes is dropped first, so only the live
history is counted.
2. **Runs that stop count too.** After each Step 9 pass, `gstack-ship-receipt
stub --pr <n> --run <id> --review-loop <summary>` writes a `status: started`
entry, so a run that stops before its receipt still counts. The run's receipt