Repository navigation
feat(OMN-10347): harden Receipt Gate to FAIL on [skip-*] tokens per Rule #10 - #986
Conversation
…ule #10 validate_pr_receipts() previously returned passed=True (friction only) when [skip-receipt-gate:] was present. Now any [skip-*] token returns passed=False unless paired with a valid # skip-token-allowed: <id>. Adds SKIP_TOKEN_PATTERN + ALLOWLIST_PATTERN constants; OVERRIDE_PATTERN becomes an alias for backwards compat. Unit tests cover all cases: [skip-receipt-gate:] alone FAILs, [skip-deploy-gate:] alone FAILs, [skip-anything:] alone FAILs, paired with allowlist receipt PASSes with friction, empty receipt-id still FAILs.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 0/5 reviews remaining, refill in 5 minutes and 1 second. Comment |
Summary
Closes OMN-10347
validate_pr_receipts()now returnspassed=Falsewhen any[skip-*]token is found without# skip-token-allowed: <receipt-id>[skip-receipt-gate:]returnedpassed=True, friction_logged=True(exit 0) — this violated Rule Refactor tech debt: Add Protocols and Pydantic models for type safety #10SKIP_TOKEN_PATTERN+ALLOWLIST_PATTERNconstants;OVERRIDE_PATTERNbecomes an alias for backwards compatProblem
OMN-9608 remediation: GHA run 25132166746 accepted
[skip-receipt-gate:]with only a warning. The escape hatch (# skip-token-allowed: <id>) continues to work — it must be paired with a non-empty receipt ID from the user.DoD evidence
pytest (receipt gate tests)
Key behavioral verification
[skip-receipt-gate: docs only]→passed=False✓[skip-deploy-gate: reason]→passed=False✓ (regression)[skip-anything: reason]→passed=False✓[skip-receipt-gate: ...]+# skip-token-allowed: USER-APPROVAL-2026-04-30-jonah→passed=True, friction_logged=True✓# skip-token-allowed:(empty id) →passed=False✓pre-commit
pre-commit run --all-files— all passed