Skip to content

Add attestation-based CI#6150

Merged
aryairani merged 7 commits intotrunkfrom
ci/transcripts-before-push
Feb 12, 2026
Merged

Add attestation-based CI#6150
aryairani merged 7 commits intotrunkfrom
ci/transcripts-before-push

Conversation

@aryairani
Copy link
Contributor

@aryairani aryairani commented Jan 29, 2026

Overview

This PR implements a attestation-based CI system moves a bunch of the work to before you git push and also caches results for speed.

The goal is that we could get PRs as far as the "ready to merge" state before having to run a million hours in CI.

  • Git hooks run the checks and cache the results. pre-commit just warns if there are failures, pre-push will block a push by default if it would fail CI, but you can override it if you just want to save your stuff to Github.
  • on feature branches: CI only verifies proofs exist (<10 seconds)
  • on trunk: Full tests still run on all architectures, but transcripts don't (tbd)

./scripts/check.sh, which is the one-stop shop for checks, now uses cached test results if available.

Usage

Git hooks

Install the git hooks with ./scripts/hooks/install.bash, and that's it.

Manual way

  1. Run ./scripts/check.sh (because it runs the tests and the transcripts) or the individual ./scripts/proofs/*.sh
  2. Check in: .github/workflows/proofs/*

Implementation approach and notes

  • Version-controlled proofs vs local (untracked) proofs
    • Local proofs (.gitignored in .local-proofs) keep the last 100 checks around for reuse; dropping the least recently added.
    • Version-controlled proofs file normally contains just the single current hash for CI to verify, git attribute merge=union to avoid always having a merge conflict
  • Each check has file dependencies, listed with glob patterns in the respective scripts/proofs/*.sh script.
    • The "code" files (.yaml, .hs, .md) vs the "infrastructure" files (scripts/proofs/*.sh) are hashed separately, so that the latter can be a warning.
  • ci.yaml has a verify-proofs job on feature branches instead of running actual tests.
  • a bunch of tests (all?) still run in the merge queue to catch stuff that may have slipped through.
  • transcript tests don't get run on trunk, they become more about checking for output changes than testing; although it's debatable.

Interesting/controversial decisions

  • pre-commit caches results but doesn't abort on failure
  • pre-push aborts of tests or transcripts fail unless --no-verify
  • keep last 100 checks locally. using just one file would be pretty okay, but this catches some places where the cache would needlessly be invalidated otherwise
  • when do we check and update transcripts on non-FF merges? we just check them in merge queues; if they need updating, then you merge in trunk yourself into the PR and hope for the best?

Test coverage

tested these cases manually:

  • attestation in local file but not in shared file: skips tests and writes shared file
  • attestation in shared file but not in local file: adds it to local file
  • modifying a key file invalidates attestation
  • modifying a non-key file doesn't invalidate attestation
  • ci fails if key file modified

Loose ends

  • want to make transcripts faster to run in general, whether by consolidating them into fewer or what

Final checklist

@aryairani aryairani force-pushed the ci/transcripts-before-push branch 7 times, most recently from 9b7379f to b0c1bc1 Compare February 5, 2026 09:27
Add a local attestation system that records pass/fail results keyed by
source hash, allowing CI checks to be skipped when code hasn't changed.

Includes attestations for formatting, tests, transcripts, and weeds,
although checks for formatting and weeds are currently disabled.

- Add scripts/proofs/ with hash computation and run-and-record scripts
- Add scripts/hooks/ with git hooks (pre-commit, pre-push) to run checks
  and verify attestations
- Store attestations in .github/workflows/proofs/*.txt (tracked) and
  .local-proofs/ (local cache)
- Use .gitattributes merge=union to avoid conflicts on proof files

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@aryairani aryairani force-pushed the ci/transcripts-before-push branch from ca2691c to a056e25 Compare February 7, 2026 09:19
aryairani and others added 3 commits February 8, 2026 08:30
- Add merge_group trigger to ci.yaml
- Create test.yaml reusable workflow with configurable platform matrices
- Update release.yaml to run tests before bundling
- Remove redundant trunk-only jobs from ci.yaml (now handled by merge queue)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@aryairani aryairani marked this pull request as ready for review February 11, 2026 03:45
@aryairani aryairani requested a review from a team as a code owner February 11, 2026 03:45
@aryairani aryairani enabled auto-merge February 11, 2026 23:54
@aryairani aryairani added this pull request to the merge queue Feb 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 12, 2026
- excludes pushes to merge queue (dedicated merge queue job still exists)
- skip transcripts in merge queue test if already checked
@aryairani aryairani added this pull request to the merge queue Feb 12, 2026
@aryairani aryairani removed this pull request from the merge queue due to a manual request Feb 12, 2026
@aryairani aryairani added this pull request to the merge queue Feb 12, 2026
@aryairani aryairani removed this pull request from the merge queue due to a manual request Feb 12, 2026
@aryairani aryairani added this pull request to the merge queue Feb 12, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 12, 2026
@aryairani aryairani removed this pull request from the merge queue due to a manual request Feb 12, 2026
@aryairani aryairani added this pull request to the merge queue Feb 12, 2026
Merged via the queue into trunk with commit c78a0a7 Feb 12, 2026
6 checks passed
@aryairani aryairani deleted the ci/transcripts-before-push branch February 12, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants