Draft
Conversation
9b7379f to
b0c1bc1
Compare
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 <noreply@anthropic.com>
ca2691c to
a056e25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a attestation-based CI system moves a bunch of the work to before you
git pushand 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.
pre-commitjust warns if there are failures,pre-pushwill 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.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
./scripts/check.sh(because it runs the tests and the transcripts) or the individual./scripts/proofs/*.sh.github/workflows/proofs/*Implementation approach and notes
.local-proofs) keep the last 100 checks around for reuse; dropping the least recently added.merge=unionto avoid always having a merge conflictscripts/proofs/*.shscriptscripts/proofs/*.sh) are hashed separately, so that the latter can be a warning.ci.yamlhas averify-proofsjob on feature branches instead of running actual tests.stack testand interpreter tests still run ontrunkto catch any issues that slip through..gitattributeswithmerge=unionto auto-merge proof files and avoid conflictsInteresting/controversial decisions
Test coverage
tested these cases manually:
Loose ends
Final checklist