elm CI flake: Warmup.elm fixture setup races the compiler (elm-stuff file locks / MVar deadlock)
Author: schaniCreated Jul 21, 2026Updated Jul 21, 2026
LabelsCI
What happens
The elm / schema-elm fixture jobs intermittently fail in the fixture-setup step, before any schema or JSON sample is tested. Setup runs rm -rf elm-stuff && elm make Warmup.elm, and the rm -rf races the Elm compiler's use of elm-stuff, deadlocking on file locks.
Evidence
- Signature: Elm compiler crash during the
rm -rf elm-stuff && elm make Warmup.elmstep —elm-stuff/*.dat withBinaryFile: resource busy (file locked), with a thread blocked indefinitely in an MVar operation. The failure is in setup output, not in any test's round-trip comparison. - Affected PRs (2): #3004, #2968. Both touch only TS-as-input / unrelated code, and their fixtures passed in every other language job. The crash happens before any schema is tested.
Impact
Because the fixture matrix runs with fail-fast: true, a single Elm setup crash cancels every sibling language job in the same matrix and trips the test-complete gate. See #3066 for details.
Suggested solutions
- Make the warmup retry-safe: wrap the setup in a retry loop with backoff.
- Serialize Elm invocations so nothing else touches
elm-stuffwhile the compiler runs. - Pre-build
elm-stuffinto the runner image or cache it, avoiding therm -rf+ rebuild race entirely.
Interim policy
Per CLAUDE.md ("Known CI flakiness"), we accept this flake for now. When it happens we retry the failed jobs (gh run rerun <run-id> --failed); a failure here only counts as real if it reproduces across retries or the PR actually touches Elm.
Source: glideapps/quicktype