Repository navigation
Conversation
Split the monolithic Pass 1 and Pass 2 MIR Lean modules in anneal/ into
topic submodules—preserving an exact 1:1 declaration and body bijection
across trusted/lean/ and trusted/correspondence/—and replace the manual
25-entry M_ref evaluator denylist in TrustedBoundary.lean with a closed
Trusted module-origin allowlist.
Why:
- Extending Anneal toward complete Rust MIR operational semantics would
push the single-file MIR AST, semantics, WP, correspondence adapter,
and correspondence proof modules past maintainable review and Lean
memory limits (especially Pass 2's -M4096 compilation ceiling).
- The prior 25-entry forbiddenAnneal list in
verifyRefEvaluatorIndependence had to be updated manually whenever
M_anneal gained a new operational helper, creating a maintenance and
soundness hazard.
What changed (paths relative to anneal/):
- trusted/lean/Trusted/MirAst.lean + Trusted/MirAst/{Types,Places,
Rvalues,Statements,Terminators,Body}.lean: Pure 1:1 split into an
acyclic DAG under the existing candidate:mir_ast tier.
- trusted/lean/Trusted/MirModel.lean: Pure extraction of the 13 shared
boundary data types (FaultKind, StepResult, ScalarVal, PtrVal,
AllocByte, Val, Allocation, CallerMemory, Query, Out, TerminalOut,
LocalSlot, Choice) and total list helpers (getElem?, setElem?) into
an operational-rule-free module (candidate:mir_semantics).
- trusted/lean/Trusted/MirSemantics.lean + Trusted/MirSemantics/{Ops,
Enum,State,Step,Boundary,CanaryFixtures}.lean: Pure 1:1 split keeping
all 21 locked Pass 1 *Claim definitions and Trusted.{Crate,
CrateTheorem,UnitTheorem} directly in Trusted.MirSemantics.
- trusted/correspondence/Trusted/Correspondence.lean +
Trusted/Correspondence/{Codec,State,Eval,Simulation,
CanaryFixtures}.lean: Pure 1:1 split so Codec, State, and Eval import
only Trusted.MirAst and Trusted.MirModel (never
Trusted.MirSemantics), keeping all 30 locked Pass 2 *Claim
definitions directly in Trusted.Correspondence.
- theory/Anneal/MirWp.lean + theory/Anneal/MirWp/{Core,Scalars,
Reflection,Execution,Canaries}.lean: Split the 100%-computable Pass 1
WP proofs into submodules behind 21 *_base theorems, with thin
forwarding wrappers keeping all 21 locked theorems directly in
Anneal.MirWp (updating internal callers to *_base).
- correspondence/Anneal/MirCorrespondenceProof.lean +
correspondence/Anneal/MirCorrespondence/{Codec,SimHelpers,
ScalarEquiv,EnumEquiv,RvalueStep,StmtTermStep,InitAndSim,
Canaries}.lean: Split Pass 2 proofs, retiring MirCorrespondenceBase
(renamespaced to Anneal.MirCorrespondence), moving 20 additional
locked witnesses behind *_base lemmas with thin forwarding wrappers
in Anneal.MirCorrespondenceProof (all 30 locked witnesses preserved
with unchanged claim types), making readRefPrimitiveSlot_eq public
for cross-module use, and adjusting refEnumDiscrInBounds_eq's tactic
proof for cross-module match_N elaboration.
- trusted/audit/TrustedBoundary.lean: Tightened
verifyRefEvaluatorIndependence with isAllowedRefTrustedModule,
restricting every Trusted constant in the transitive cone of
[evalRefStep, initRefState] to Trusted.MirAst*, Trusted.MirModel, or
Trusted.Correspondence* (rejecting Trusted.MirSemantics,
Trusted.MirSemantics.*, and any other sibling Trusted.* module).
- trusted/audit/tests/boundary_audit.rs,
trusted/cargo-anneal/tests/installed_smoke.rs,
trusted/audit/src/lib.rs, and docs/{trust-model,architecture,
mir-correspondence-design}.md: Updated Pass 2 preflight/non-
backsliding tests (adding submodule, sibling-module, initRefState,
and transitive negative tests plus positive Trusted.MirModel
admission), installed smoke fixture copying, and TCB/governing docs
to match the modular layout and tightened allowlist.
Agent-authored-by: AI agent acting on joshlf's behalf
|
Authored by an AI agent acting on joshlf's behalf. Review Receipt (Gate 1)
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3971 +/- ##
=======================================
Coverage 92.99% 92.99%
=======================================
Files 16 16
Lines 2469 2469
=======================================
Hits 2296 2296
Misses 173 173 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Authored by an AI agent acting on joshlf's behalf.
Human review surface
anneal/trusted/lean/Trusted/{MirAst*,MirModel,MirSemantics*}.lean):Trusted.MirAst(into an acyclic DAG undercandidate:mir_ast) andTrusted.MirSemantics(extracting the 13 operational-rule-free boundary data types and total list helpers intoTrusted.MirModel, keeping all 21 locked Pass 1*Claimdefinitions andTrusted.{Crate,CrateTheorem,UnitTheorem}directly inTrusted.MirSemantics). Exact 1:1 declaration and body bijection preserved.anneal/trusted/correspondence/Trusted/Correspondence*.lean):Codec,State,Eval,Simulation,CanaryFixtures, and umbrellaTrusted.Correspondence(keeping all 30 locked Pass 2*Claimdefinitions directly inTrusted.Correspondence, withCodec,State, andEvalimporting onlyTrusted.MirAstandTrusted.MirModel, neverTrusted.MirSemantics).anneal/trusted/audit/{TrustedBoundary.lean,src/lib.rs,tests/boundary_audit.rs},anneal/trusted/cargo-anneal/tests/installed_smoke.rs):forbiddenAnnealdenylist inverifyRefEvaluatorIndependencewith a closedTrustedmodule-origin allowlist (isAllowedRefTrustedModule), restricting everyTrustedconstant in the transitive cone of[evalRefStep, initRefState]toTrusted.MirAst*,Trusted.MirModel, orTrusted.Correspondence*.initRefState, and transitive negative tests plus positiveTrusted.MirModeladmission) and installed-smoke fixture copying.anneal/docs/{trust-model,architecture,mir-correspondence-design}.md):verifyRefEvaluatorIndependenceallowlist descriptions.none(all TCB and auditor invariants are strictly preserved or strengthened).Summary
PR 1 of the Anneal MIR operational semantics completeness stack ($M_{\text{ref}}$ evaluator denylist in
google/zerocopyunderanneal/). Splits the monolithic Pass 1 and Pass 2 MIR Lean modules into maintainable topic submodules—preserving an exact 1:1 declaration and body bijection acrosstrusted/lean/andtrusted/correspondence/—and replaces the manual 25-entryTrustedBoundary.leanwith a closedTrustedmodule-origin allowlist.