Repository navigation
ci(janitor): re-run CLA checks the spent GITHUB_TOKEN budget failed, once the budget is back - #25326
Conversation
…once the budget is back CLA Assistant and CLA policy guard (required on main) run on GITHUB_TOKEN and fail outright when the installation budget is spent (since 21:10Z 2026-10-25), then stay red until someone re-runs them by hand. Both are a trusted control plane whose change needs a trusted maintainer's review, so the retry lives in the janitor's scheduled sweep: one free rate_limit read of GITHUB_TOKEN, and when at least 20% is left, re-run (on the App's budget) each CLA Assistant run at its PR's current head whose log says the rate limit was exceeded, plus that head's policy guard run (whose reason is hidden by design; a first-attempt guard failure also gets one retry). Bounded: 12 log reads and 8 re-runs a sweep, 24 h, attempt < 20. Never fails the sweep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
…nded scan, re-runs failed guards up to 8 attempts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
|
Owned by an agent session · session |
|
Found 2 test failures on Blacksmith runners: Failures
|
Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🔇 Additional comments: 1
scripts/ci/cla_quota_rerun.py-95-96: 1
95-96:Major · Functional Correctness · Heavy lift
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Scan beyond the first page of workflow runs.
The API returns at most 100 runs on this page. If more than 100 newer runs precede an eligible failure, that failure never enters
rotated()and can age out before any sweep examines it. Paginate through the recent-run window, or rotate the page queried across sweeps. (docs.github.com)

Review info
-
Run configuration-
- Source mode: Auto
- Repository: manaflow-ai/cmux
- Branch: gt-quota-cla-heal
- File: .coderabbit.yaml
- Commit: 3719687
- Layers: Repository YAML
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
ca457bc9-5444-451e-a3b8-d74e9ca3af3b
Files selected for processing: 3-
.github/workflows/ci-queue-janitor.ymlscripts/ci/cla_quota_rerun.pytests/test_cla_quota_rerun.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
…r and freshness gate stay as they are Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-85ca59f74f02d81734c3
|
All contributors have signed the CLA ✍️ ✅ |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Merge receipt for |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
The required checks CLA Assistant and CLA policy guard both run on the repository's GITHUB_TOKEN. When the installation budget runs out (2026-10-06, and since 21:10Z on 2026-10-25), both fail outright and stay red until someone re-runs them by hand, often while the budget is still spent. This currently blocks #25172 and #25302, among others.
Why CLA policy guard says "rejected the proposed policy" on PRs that touch no CLA file.
validate-cla-policy.rbreads the PR, its reviews, its compare and snapshots throughgh api. A failed read raisesPolicyError("GitHub API request failed…"), and the rescue at the end turns everyPolicyErrorinto the same generic annotation. So a quota 403 looks exactly like a policy rejection. That explains the pass-then-fail pattern on unrelated PRs.Why the fix is not inside the two jobs.
cla.ymland the guard are a trusted control plane. The guard requires an exact-head review from a trusted maintainer (TRUSTED_REVIEWER_IDS) for any change tocla.ymlor to its own bytes (EXPECTED_GUARD_SCRIPT_DIGEST). In-job backoff is therefore a trust-policy change and is left to that review.What this adds instead is a self-healing re-run in the janitor's scheduled sweep (every 10 minutes, no new schedule):
rate_limitread of GITHUB_TOKEN, which costs no quota. If less than 20% (minimum 500) is left, it stops: a re-run would fail the same way.actions: write), it takes each PR head's newest run of each workflow, across all statuses. It acts only when that run failed at the head the PR still has.Cost: about 34 App calls per sweep at most, and 0 GITHUB_TOKEN calls.
Tests:
tests/test_cla_quota_rerun.py, 7 cases against a fake GitHub, all pass. actionlint is clean.Review: independent Codex (gpt-6-astra, xhigh). The first pass returned BLOCK with three findings (lost guard retries, scan starvation, replaying superseded runs). All three are fixed, and the second pass returned SHIP.
🤖 Generated with Claude Code
Agent session: agent session
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit