Skip to content

meta: enforce that native-executing checks are opt-in - #17

Merged
daira merged 1 commit into
mainfrom
native-optin-guard
Jul 27, 2026
Merged

meta: enforce that native-executing checks are opt-in#17
daira merged 1 commit into
mainfrom
native-optin-guard

Conversation

@daira

@daira daira commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Plain lake build already builds and loads the FastFieldNative dylib: 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.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 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 from lakefile.lean's precompileModules libraries (fail-loud on parse failure), and check_native_lane.sh now consumes it via --print-lane — the lakefile is the only place the lane is stated.

🤖 Claude Fable 5

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
daira force-pushed the native-optin-guard branch from f01e880 to 7523679 Compare July 27, 2026 13:51
@daira
daira marked this pull request as ready for review July 27, 2026 13:57

@daira daira left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@daira
daira merged commit bfc94fb into main Jul 27, 2026
6 checks passed
@daira
daira deleted the native-optin-guard branch July 27, 2026 13:57
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.

1 participant