meta: enforce that native-executing checks are opt-in - #17
Merged
Conversation
Plain lake build already builds and loads the FastFieldNative dylib: the lane's proof modules import its definition modules, and neither declaration order nor glob overlap prevents the shared facet from being built for their elaboration (tested and refuted on Lean/Lake v4.30.0). Since loading is inseparable from the lane's kernel-verified proofs, the enforceable opt-in boundary is one level up: scripts/check_native_optin.py fails the build if any module whose import closure reaches a lane module contains an evaluation-based check (#eval, #guard, native_decide) without an explicit opt-in entry. Documents the observed Lake behaviour in the research doc (Appendix C), the lakefile, and the README. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daira
force-pushed
the
native-optin-guard
branch
from
July 27, 2026 13:51
f01e880 to
7523679
Compare
daira
marked this pull request as ready for review
July 27, 2026 13:57
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.
Plain
lake buildalready builds and loads theFastFieldNativedylib: the lane's proof modules import its definition modules, and neither library declaration order nor glob overlap prevents the shared facet from being built for their elaboration (tested on Lean/Lake v4.30.0).Since loading is inseparable from the lane's kernel-verified proofs, the enforceable opt-in boundary is one level up, at checks:
scripts/check_native_optin.pyfails the build if any module whose import closure reaches a lane module contains an evaluation-based check (#eval,#guard,native_decide) without an explicit opt-in entry carrying a rationale. Currently: six modules in the lane import cone, none opted in, no violations.Documents the observed Lake behaviour in
design/lean-native-trust-research.md(new Appendix C: default-build dylib emission, the refuted ownership-order hypothesis, the loading-vs-executing distinction, and the silent dylib-name-collision hazard), in the lakefile's lane comment, and in the README's trust discussion. Same non-adversarial scope as the other guards. The lane list is parsed fromlakefile.lean'sprecompileModuleslibraries (fail-loud on parse failure), andcheck_native_lane.shnow consumes it via--print-lane— the lakefile is the only place the lane is stated.🤖 Claude Fable 5