Support constructorArg in core proof surface#2149
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| \n### CI Failure Hints\n\nFailed jobs: `build`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n``` |
|
CI correction needed for head The branch-head This is not a runner flake. The audit import closure exposes stale constructor-body scope consumers after this PR changed constructor bodies to compile/support under
Suggested bounded correction scope:
lean-slot lake build PrintAxioms
python3 scripts/lean_lint.py --only proof_length
rg -n "sorry|admit|axiom |unsafe|allowlist" Compiler/Proofs/IRGeneration/ContractFeatureTest.lean Compiler/Proofs/EndToEnd/Base.lean Compiler/Proofs/IRGeneration/Function.lean Compiler/Proofs/IRGeneration/SupportedSpec.leanThe narrower local build already passed; this failure is specifically from the audit/ |
|
Follow-up with local reproduction details for head I reproduced the audit failure locally with: lean-slot lake build PrintAxioms
lean-slot lake build Compiler.Proofs.EndToEnd.Base
lean-slot lake build Compiler.Proofs.IRGeneration.ContractFeatureTest
Concrete failures:
The proof still expects: SupportedStmtList spec.fields (ctor.params.map (·.name)) ctor.bodybut SupportedStmtList spec.fields ((constructorAsFunctionSpec ctor).params.map (·.name)) (constructorAsFunctionSpec ctor).bodyThis needs the same
Both ctor.params.map (·.name)but constructorBodyScope ctor.paramsSo the local fix should update those body compile witnesses and the nearby Please keep the correction scoped to these stale consumers, then re-run: lean-slot lake build Compiler.Proofs.EndToEnd.Base
lean-slot lake build Compiler.Proofs.IRGeneration.ContractFeatureTest
lean-slot lake build PrintAxioms
python3 scripts/lean_lint.py --only proof_length
rg -n "sorry|admit|axiom |unsafe|allowlist" Compiler/Proofs/IRGeneration/ContractFeatureTest.lean Compiler/Proofs/EndToEnd/Base.lean Compiler/Proofs/IRGeneration/Function.lean Compiler/Proofs/IRGeneration/SupportedSpec.lean |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d260c4c53
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a05390a9c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1056f078a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| private def validateConstructorArgAliasNameCollisions (params : List Param) : | ||
| Except String Unit := do | ||
| let generated := constructorArgAliasNames params | ||
| match params.find? (fun param => generated.contains param.name) with |
There was a problem hiding this comment.
Reject locals that shadow constructor arg aliases
For constructors that declare a local/binder named arg<i> (for example Stmt.letVar "arg0" ...) this check still passes because it only scans formal parameter names, while genConstructorArgLoads now reserves those same arg<i> identifiers and Expr.constructorArg i lowers to them. That lets a constructor body shadow the generated alias (or emit duplicate Yul let declarations) so later constructorArg reads the local instead of the deploy argument; mirror the ADT collision check by including collectStmtListBindNames body or pass the alias names into constructor scope validation.
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
Summary
Validation