Repository navigation
Ignore raw string contents when collecting Lean axiom queries - #3602
Merged
Mister-Meeseeks merged 1 commit intoOct 20, 2026
Merged
Conversation
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.
Change and mathematical scope
The Lean axiom helper can print
PASS 1 declarationswithout executing any real#print axiomsquery: a raw string containing interior quotes exposes a fake query to the source scanner, and anIO.printlnsupplies the corresponding report. Conversely, raw-string documentation can cause a valid audit to fail.Mask Lean raw strings through the matching quote/hash delimiter before collecting queries. Cover zero and multiple hashes, literal backslashes, shorter nonclosing delimiters, unterminated strings, and adjacent ASCII/Unicode identifier tokens. Keep the existing report/axiom checks and the three existing
AuditAll.leanquery inventories unchanged.This is a bounded verification-tool repair. It changes no theorem, frozen input, certificate, selected result or κ. The helper is still not a complete Lean parser or authentication against arbitrary hostile elaborators/loggers; Lean compilation and source review remain trust boundaries.
Task and overlap
20ecf2891d80b5acf18d980b2164fb44ea7faa90; priority revision 6.portable-replay, scope key831cc1a3c8f9ff01b197. Scope changed from environment/artifact comparisons to a concrete source-scanner failure in the live Lean verification path. Reliable audit results are the connection to the verifier-engineering track; no mechanism improvement is claimed.f839ed0aca28280aea47c724937a2da04e5b7bcd, which handles comments and ordinary strings. This patch adds raw-string coverage to that implementation.raw string/check_lean_axiomshad no matches. Separate all-state PR searches found Count actual Lean axiom queries outside comments and strings #2523 and no equivalent follow-up. These checks do not establish universal novelty.Validation
Environment: macOS arm64, Python 3.11.6, Lean 4.21.0 (
6741444a63ee, the historical formal package's pinned version).PASS 1 declarations; the fixed helper exits 1 because there are no real queries.sorryAxrejection.python3 -B scripts/research_baseline.pyreportsPASS_RESEARCH_BASELINE_BINDINGS_ONLY(orientation/source bindings only).git diff --check.Reproduce the focused suite:
Without
LEAN_AUDIT_BIN, the pure scanner/report/inventory checks run and the live test is explicitly skipped. Full formal-project builds, the selected mathematical replay, other OS runtimes and hosted CI have not been run for this scoped change.Credit
Retain the existing helper authors and @ywz65's #2523 source-scanner work. Prepared for @roger-sato with substantial OpenAI Codex assistance. Apache-2.0.