Context
From health check report #33 — Recommendation #1.
Problem
When post-pr-review.sh attempts to rebase a PR branch that is BEHIND via PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch, a 403 ("user doesn't have permission to update head repository") causes the script to exit non-zero. Because review-one-pr.sh propagates this exit code, the batch loop in pr-review.yml treats it as session-fatal and aborts all remaining PR candidates.
The review itself was already posted successfully — failing to request a rebase is cosmetic.
Proposed Fix
In scripts/post-pr-review.sh, ensure the branch-update call and its polling loop cannot cause a non-zero exit. The || true on the gh api call already exists, but the polling loop's early exit 0 on "still BEHIND" should not be the only path — any failure in this section should be a warning, not a fatal error.
Expected Impact
Eliminates the session-abort failure mode. The rebase warning will be visible in logs but the queue will complete.
Urgency
CRITICAL — a permanent permission gap causes every batch that encounters a behind-branch PR to abort early.
Context
From health check report #33 — Recommendation #1.
Problem
When
post-pr-review.shattempts to rebase a PR branch that is BEHIND viaPUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch, a 403 ("user doesn't have permission to update head repository") causes the script to exit non-zero. Becausereview-one-pr.shpropagates this exit code, the batch loop inpr-review.ymltreats it as session-fatal and aborts all remaining PR candidates.The review itself was already posted successfully — failing to request a rebase is cosmetic.
Proposed Fix
In
scripts/post-pr-review.sh, ensure the branch-update call and its polling loop cannot cause a non-zero exit. The|| trueon thegh apicall already exists, but the polling loop's earlyexit 0on "still BEHIND" should not be the only path — any failure in this section should be a warning, not a fatal error.Expected Impact
Eliminates the session-abort failure mode. The rebase warning will be visible in logs but the queue will complete.
Urgency
CRITICAL — a permanent permission gap causes every batch that encounters a behind-branch PR to abort early.