Bug: re-run bypasses receipt verification — skips PP API entirely
Bug
When a PR Gate workflow is re-run via gh run rerun, the action takes a different code path that only checks protected paths and exits with success — without ever calling the PP verify API. This means re-runs bypass Permission Protocol approval entirely.
Reproduction
- PR opens → Deploy Gate runs → creates deploy request → exits 1 (expected)
- Request expires (1h production TTL)
gh run rerun <run_id>- Action succeeds with
✅ No protected paths changed - merge allowed - No PP API call made, no new deploy request created
- PR checks go green without any PP approval
Expected Behavior
Re-runs should call the PP verify API just like the original run. If no receipt exists, a new deploy request should be created.
Evidence
Re-run logs show only:
✅ No protected paths changed - merge allowed
No API response status, no Resolved company, no Request ID — the entire PP verification block was skipped.
Root Cause (Suspected)
The action likely has conditional logic that short-circuits when certain conditions are met on re-run (different event context, missing PR metadata, or a cached result). The protected paths check runs but the receipt verification doesn't.
Impact
Security: Any PR can bypass PP approval by simply re-running the failed Action. This defeats the entire purpose of the deploy gate.
Root cause found: The v1 tag pointed to an old version that had a 3-step flow:
- Check protected paths
- Verify PP Receipt (only if protected paths changed)
- Skip with success (if no protected paths changed)
This meant any PR without changes to deploy/ or .github/workflows/ bypassed PP verification entirely.
Fix: Force-updated v1 tag to point to main (5449384) which always runs PP verification regardless of protected paths. Re-triggered all 5 site PR workflows.
This bug existed in the pre-v2 action (Phase 0) which had a two-step flow: check protected paths → only verify receipt if protected paths changed. The 'Skip (No protected paths)' step would set a success commit status and exit without calling the PP API.
This was removed in v2 (commit 58be964 — 'feat: v2 — gate every PR, fail-open, PR comments'). The current action (v1 tag @ 5449384, which includes v2) always calls the PP verify API regardless of whether protected paths changed. The protected-paths input is now metadata-only, sent to the API for risk assessment but never used for gating.
All consumer workflows (app, site, deploy-gate) reference @v1, which includes the fix.