Commit graph

1 commit

Author SHA1 Message Date
Anthony Alaribe
f8514ee295
ci: let anyone run CI, and let CI skip what was already proven (#491)
CI re-runs work that has already been done: a PR run proves a tree, the squash
merge keeps that exact tree, and master builds and tests all of it again. On
4-vCPU runners that is ~20 minutes per push, and none of that capacity is
available to a developer whose laptop is faster than the runner.

ci/checks.tsv is now the one definition of what CI is; the workflows and
scripts/ci/ci.sh both read it. Each check is fingerprinted over the git blob
hashes of its declared inputs, and a pass publishes an attestation as a ref:

  refs/ci-attest/v1/<check>/<fingerprint>/<platform>/<capabilities>/<date>

A gate job resolves those with one ls-remote and no object fetches, and skips
any check already proven for the tree it is about to test — whether by an
earlier run, a re-run, or `make ci` on someone's machine. Producing one needs
push access, the same trust boundary as pushing code; forks can neither create
nor be affected by them.

Reuse is deliberately conservative because this gates a production deploy.
Checks declare the capabilities they need and attestations record the ones the
environment had, so a run that fell back to a stub service can never satisfy a
check that needs the real one. Fingerprints are pinned from the gate, so steps
that rewrite the tree (hpack, npm ci, hlint --refactor) cannot desync what gets
attested from what was looked up. The deploy condition is spelled out rather
than implied by `needs`: build-and-test may be skipped, but only when the gate
says every Haskell check was already proven.

Also switches the minio service to bitnamilegacy/minio. The bitnami/minio
repository was emptied in the Aug-2025 catalog change and now has no tags at
all; CI has only been working off a runner-side image cache, and an eviction
would have taken the integration suite down with nothing in the diff to blame.

Verified end to end: all six checks ran through ci.sh and published
attestations, and a clean checkout on macOS/arm64 then resolved CI's
linux-amd64 attestations and skipped the entire Haskell suite.

See docs/local-ci.md.
2026-08-16 19:20:59 +02:00