Skip to content

CI: Magic Nix Cache throttling (HTTP 418) fails nix flake check without running it #774

Open

Description

@dezren39

Problem

The nix flake check CI job intermittently fails for infrastructure reasons that have nothing to do with the change under test: the Magic Nix Cache backend throttles the runner (HTTP 418 rate-limit), the job dies before or during cache access, and NO check actually runs — but the PR shows a failed check. Sweeps then cannot certify a merge from CI, and a re-run (which passes) costs a full queue cycle.

Evidence

Why it matters

  • The four-repo sweeps merge on green checks (Drew's standing directive: merge good PRs, fix later if needed). A cache-service hiccup masquerading as a red check either blocks good merges or trains everyone to ignore red checks — both bad.
  • It burns the scarcest resource in this system, verified-merge windows, on re-runs of identical heads.

Asks

  1. Make cache-layer failures non-fatal to the check verdict: if the cache backend is unreachable or throttling (418/5xx on cache access), the job should fall back to building without the cache (or retry with backoff) and its pass/fail should reflect the code, not the cache service. E.g. continue-on-error on the cache step, or the DeterminateSystems action's failure-mode settings if it offers one.
  2. Evaluate moving the flake check's cache to a backend this project controls — Cachix is already wired into the fleet's local nix config (omnibin substituter) — or GitHub's own actions cache, so CI health does not depend on a free-tier third-party cache's rate limits.
  3. Secondary, observed during sweep work on this repo: gh pr checks has been seen exiting 0 while a check job in the same PR had failed. Worth a look while in here — a checks summary that can say green over a red job compounds the trust problem above.

Acceptance criteria

  • A PR whose only flake-check failure is a cache-backend 418/5xx either passes on the cache-less fallback or is reported distinctly as infra-failed (not code-failed), without a manual re-run.
  • The cache backend choice for the flake check is recorded in the workflow (or an ADR/comment) with the throttling history as the reason.

Related: #375 (DeterminateSystems actions floated on @main in 6 workflows — same action family), #257 (CI disk space, different failure mode).

Activity

  1. developing-today commented on Oct 24, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 24, 2026

    @dezren39
    MemberAuthor

    Owner direction (Drew, 2026-10-24): simpler than fixing the cache — don't use nix for GitHub Actions. This repo already has the precedent: #286 replaced nix with direct toolchains in Actions. Preferred resolution for this issue is therefore to retire the nix flake check Actions job in favor of direct-toolchain checks (cargo/bun/etc. as #286 did), not to nurse the Magic Nix Cache. The cache-fallback asks above only matter if a nix job has to stay in Actions for some specific check that cannot run any other way — if so, name that check here. Acceptance update: this closes when no Actions job depends on nix (or the exceptions are named and their cache failures are non-fatal per the original asks).

  3. added
    task/ci-investigationQueue packet kind: investigate a CI failure
    kind/ciCI/CD pipelines, workflows, and build automation
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    area/ciCI/CD pipelines, workflows, and build automation (area)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 25, 2026
  4. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    Intake review

    Still live: no merged PR since 2026-10-24 records a cache-failure fallback, a backend change, or a recorded cache-backend decision for the flake check, and the issue's two documented 418 incidents (PRs #771, #747) stand unaddressed. Acceptance criteria were already present, so the body is unchanged. (No source/* label applied: the filer is not recorded in the body — the evidence mixes pr-review and sweep observations.)

    Related: #257 (CI ENOSPC — different failure mode, same 'CI verdict does not reflect the code' theme; note #257's investigation found the PR gate has since been matrix-split per check, which changes where a cache fallback would live), #375 (same DeterminateSystems action family floated on @main).

    Notes / risks: ask 3 (the gh pr checks exit-0-over-a-red-job observation) is a secondary, separable thread — it should not block the cache-fallback work. Any backend switch (ask 2) is a cost/control decision the criteria correctly frame as needing a recorded rationale.

    Suggested approach: first make cache-step failure non-fatal with a cache-less fallback on the flake-check workflow (ask 1, the criteria's core), then record the backend decision; verify by simulating a cache outage on a test PR if the workflow supports it.

    Labels normalized by the fleet monitor: kind/ci, status/needs-triage, priority/normal, effort/m, area/ci, meta/enriched (task/ci-investigation was already present).

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Oct 28, 2026
  6. 44 remaining items

  7. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 8049 · repo-fleet-monitor run 2026-11-03 18:12 CST
    • Found via: monitor reconciliation
    • Task: Claim evaporated — task 8049 returned to queued and unclaimed in repo-health-code-pilot after the holding run ended without a terminal verb (checkpoint stage: handed_off). Labels reset to the truth: queue/queued + status/needs-triage. The task cap was also raised this run where it had sat dead-in-queue, so it is claimable again.
    • Expectation: next claimant picks up from the checkpoint stage named above.
  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 4, 2026
  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  11. added a commit that references this issue on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: done (fixed_merged)
    queue: repo-health-code-pilot
    task: 8049, worker repo-worker-code, lane bf419306-c4ef-470f-a553-beabf93239de
    at: 2026-11-04T03:11:08Z
    result: PR #5259 merged as 9bd87e6. All eight residual cache steps are best-effort; the backend migration remains outside this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/ciCI/CD pipelines, workflows, and build automation (area)effort/mMedium: expected under 1 day of workkind/ciCI/CD pipelines, workflows, and build automationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/ci-investigationQueue packet kind: investigate a CI failuretask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions