Repository navigation
CI: audit every declaration, broader source checks, pinned elan - #24
Merged
Merged
Conversation
The axiom audit now imports every module under src and checks every declaration, not only the
endpoints with a #print axioms line, so a sorry hidden by `set_option warn.sorry false`, an
axiom with attributes or modifiers, and `decide (config := { native := true })` all fail. The
four DSL diagnostics that check an elaboration error, and so contain sorryAx, are exempt by
name.
check-sources.sh also matches axioms after attributes, modifiers or a docstring, `native :=`,
`implemented_by`/`extern` in any attribute position, `csimp`, and options that switch off
kernel or sorry checks; a grep error now fails the check instead of passing it.
The workflow installs elan from a pinned release checked against its SHA-256 instead of
lean-action's download from elan's master branch, saves the build cache only from main so
pull requests do not evict it, and cancels superseded runs only on pull requests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7GPy1oUx164NSZsxJT3N9
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.
Follow-up to #23. Its review found that the gates let through constructs they were meant to reject; each of these compiled silently and passed CI on
main:sorryunderset_option warn.sorry false(or a#guard_msgsthat drops the warning);noncomputable axiom …and@[simp] axiom …;decide (config := { native := true }).Changes
Axiom audit of every declaration.
scripts/check-axioms.shnow runsscripts/AxiomAudit.lean, which imports every module undersrcand checks every declaration they define (9,973 today, in about 30 s) againstpropext,Classical.choiceandQuot.sound. It no longer depends on#print axiomslines, so nothing has to be listed and a swallowed message cannot lower a count. A module that is not built fails the import, so every file undersrcis covered.The only exemptions are the four DSL diagnostics that check an elaboration error with
#guard_msgs(Infinite,Growing,Uninitialized,WrongReplyinTests/DSL/Diagnostics.lean); after the error Lean still adds their generated declarations, withsorryAxin place of the part that failed. They are exempt by name, forsorryAxonly.Broader source check.
scripts/check-sources.shstays as a quick first check and now also matches:native :=,+native,reduceBool,trustCompiler;implemented_byandexternin any attribute position, andcsimp;warn.sorry,debug.skipKernelTC,addDeclCoreanddoCheck.A grep error now fails the check instead of passing it.
Workflow.
masterbranch.main. Pull requests restore it but no longer evict it.mainfinish.Checks
mainsorry, the#guard_msgs-droppedsorry,noncomputable axiomandnative := truecheck-sources.shonmaincheck-sources.shwith planted linesDependabot keeps the action pins current; the elan pin in
ci.ymlis updated by hand (noted in AGENTS.md).🤖 Generated with Claude Code
https://claude.ai/code/session_01E7GPy1oUx164NSZsxJT3N9