ci: fix the review continuation the reviewer found

The review switch read the previous-review record before it was fetched, so
every automatic review would have thrown before publishing anything.

Also fixed: a reused checkout now drops files the new head deleted; the round
loop merges every round's findings instead of keeping only the last; the
session cleanup honours its keep switch and leaves other files alone; the state
cache keeps one entry per pull request instead of one per run; and the job
timeout covers all three review rounds.

A resumed review still keeps its full budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NwflowerandClaude Opus 5.5 committed 2026-12-04 01:37:31 -07:00
1 parent fcbc77af57
commit d28b97c4ea
3 files changed
+60 -20

No files matched your search

+7 -4
View File
@@ -26,7 +26,8 @@ jobs:
name: Reims Go Reviewer
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'workflow_dispatch' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
timeout-minutes: 30
# Up to three review rounds, each bounded by the OCR timeout.
timeout-minutes: 90
steps:
- name: Create reviewer App token
id: app-token
@@ -62,13 +63,15 @@ jobs:
# Keep the OCR session records and the checkout between runs. A review
# that stops at its token budget continues from here on the next run
# instead of paying for the same files again.
# One entry per pull request: a cache entry cannot be overwritten, so a key
# with the run id would add a full checkout per run until the quota runs
# out. The entry seeds the next run; the staying-ahead work happens inside
# a single job.
- name: Cache PR review state
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ${{ runner.temp }}/pr-review-state
key: pr-review-state-${{ github.repository }}-${{ github.event.pull_request.number || inputs.pull_number }}-${{ github.run_id }}
restore-keys: |
pr-review-state-${{ github.repository }}-${{ github.event.pull_request.number || inputs.pull_number }}-
key: pr-review-state-${{ github.repository }}-${{ github.event.pull_request.number || inputs.pull_number }}
- name: Ensure PR review state directories
shell: bash