fix(review-check): skip 403 candidates instead of hard-failing gate #1894
Reference in New Issue
Block a user
Delete Branch "fix/review-check-403-graceful"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
hard-fails on the first 403 from . This happens when the workflow token owner is not in the queried team (Gitea 1.22.6 behaviour). The current code exits 1 immediately, failing the entire gate even if other valid team-member candidates exist on the PR.
Fix
Change the 403 handler from to so the gate skips the unverifiable candidate and checks the rest. The gate still exits 1 at the end of the loop if no candidate passes, keeping fail-closed semantics.
Impact
SOP Checklist
When the token owner is not in the queried team, Gitea 1.22.6 returns 403 on GET /teams/{id}/members/{user}. Previously review-check.sh immediately exited 1 on the first 403, which failed the entire gate even if other valid team-member candidates existed. Change to continue (skip the candidate) so the gate only fails when NO candidate can be verified. This closes the RFC#324 token-scope gap for multi-reviewer PRs while keeping fail-closed semantics when all candidates are unverifiable. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>Approved — 403 team-probe responses now skip only the unqueryable candidate while the gate still fails if no confirmable team member is found. This preserves fail-closed semantics without letting one inaccessible candidate block valid approvals.
PM 2nd-approve per direct CTO request: 1-file 8-line review-check.sh fix that skips 403 candidates instead of hard-failing the qa-review/security-review gate. Unblocks the 11-PR Category C bucket (see PM tick-46 surface). CR2 already APPROVED r7221.