proof: package legacy compatibility for struct member2 writes - #2146
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_b0cc4c78-854f-47c5-9311-80f7cf103fe3) |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
OpenCodeReview first-pass reviewStatus: completed_with_errors · Mode: medium-lean · 0 finding(s) · 2 files · 471067 tokens · 37 tool calls Some files could not be reviewed due to errors. Warnings
OCR pilot metrics
Pilot mode: advisory only. Codex Review remains the merge gate. |
| \n### CI Failure Hints\n\nFailed jobs: `checks`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n``` |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Refs #2080
Base / dependency chain
Stacked on #2145 (
paloma/issue-2080-mapping2word-phase34, head03892e9bb00745c2c93a578c86b63ba1ea2c4dd5). Inherited stack:#2128 -> #2134 -> #2141 -> #2143 -> #2145 -> this PR
Live preflight before editing found #2145 open and healthy; its remaining foundry shard has since completed successfully.
Slice
Packages the next ordinary supported singleton after
setMapping2WordSingleinSupportedStmtList: unpackedsetStructMember2Single.Changes:
compileSetStructMember2_legacyCompatiblefor the compiler shape emitted bycompileSetStructMember2when the supported witness resolves an unpacked struct member.stmtList_setStructMember2Single_compiledLegacyCompatibleproducingStmtListCompiledLegacyCompatible fields scope [Stmt.setStructMember2 ...].PrintAxioms.leanfor the added theorem surface.Event heads were inspected but not selected for this #2080 no-events slice: event support is on the scalar-events proof tier, while the current #2080 legacy body bridge remains over
SupportedSpecwithnoEvents.Validation
git diff --checklean-slot lake build Compiler.Proofs.IRGeneration.Functionlean-slot lake build Compiler.Proofs.IRGeneration.Contractlean-slot lake build Compiler.Proofs.IRGeneration.Function Compiler.Proofs.IRGeneration.Contractpython3 scripts/generate_print_axioms.py --checkpython3 scripts/check_proof_length.pysorry,admit, oraxiomdeclarations in the diffRemaining #2080 gate
The whole-contract retarget still consumes per-body
StmtListCompiledLegacyCompatibleobligations and still ultimately depends on retiringSupportedStmtList.helperSurfaceClosed. This PR only closes one more singleton body-shape obligation.Recommended next slice
Package the next uncovered ordinary supported singleton in the same no-events storage tier, likely
setStructMemberSingleorsetMappingPackedWordSingleafter inspecting exact constructor order and compiler shape. Keep event heads for the scalar-events roadmap unless the #2080 bridge is explicitly widened beyondSupportedSpec.noEvents.Note
Low Risk
Proof-only changes in IR generation lemmas; no compiler runtime or code generation behavior is modified.
Overview
Extends the #2080 legacy Yul bridge with one more supported singleton: a single
Stmt.setStructMember2whose struct member is unpacked (no packed layout).Adds
compileSetStructMember2_legacyCompatible, showing the IR fromcompileSetStructMember2in that shape satisfiesLegacyCompatibleExternalStmtList—including nestedmappingSlotkeys andsstore/tstorechoice from field transience, reusing the same block-write helper pattern assetMapping2Word.Adds public
stmtList_setStructMember2Single_compiledLegacyCompatible, yieldingStmtListCompiledLegacyCompatiblefor that one-statement list under the usual compile-core and scope hypotheses.PrintAxioms.leanis regenerated (private helper listed; public theorem exported). Theorem count +2; no new axioms or sorries.Reviewed by Cursor Bugbot for commit 3d95803. Bugbot is set up for automated code reviews on this repo. Configure here.