fix(ci): authenticate nix github flake fetches to stop 429 rate-limiting - #239
Conversation
Every rainix reusable runs `nix develop github:rainlanguage/rainix#...`, which
resolves the flake HEAD via an UNAUTHENTICATED GitHub API call capped at 60
req/hour/IP. Under CI bursts (concurrent runs, deploy rollouts) the cap blows
and the run dies with HTTP 429 before doing any work -- the recurring "429
retrigger" churn across rain repos and the st0x V4 deploy rollout.
Add access-tokens = github.com=${{ github.token }} to the shared
nix-cachix-setup preamble so nix authenticates those calls with the run token
(~1000/hour limit). github.token is the automatic per-run token (not a secret),
so it is present in every run including cross-org reusable calls and needs only
public-repo read to fetch the rainix flake. Single-sourced here, applies to
every reusable using this preamble.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 59 minutes and 30 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Reviewed 1cafc09: one-line CI fix — adds |
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
Problem
Every rainix reusable workflow runs
nix develop github:rainlanguage/rainix#<shell>, which resolves the flake HEAD via an unauthenticated GitHub API call (github.com/ghapi/repos/rainlanguage/rainix/commits/HEAD), capped at 60 req/hour/IP. Under CI bursts — concurrent runs, the st0x V4 deploy rollout, the issue→PR cron — the cap blows and the run dies early with:This is the recurring transient red papered over with empty "429 retrigger" commits across the org.
Fix
Add
access-tokens = github.com=\${{ github.token }}to thenix_confof the sharednix-cachix-setupcomposite, so nix authenticates its GitHub API calls with the run token — raising the limit from 60/hr to ~1000/hr and eliminating the 429.github.tokenis the automatic per-run GITHUB_TOKEN, not a secret, so it is present in every run (including cross-org reusable calls from consumers like S01-Issuer) with nosecrets:plumbing, and only needs public-repo read to fetch the public rainix flake. Single-sourced in the preamble, so it fixes the 429 for every reusable in one place. Low risk: worst case it is a no-op.🤖 Generated with Claude Code