Repository navigation
feat(edsl): a revert carries the payload the call returns on-chain - #2956
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
OpenCodeReview first-pass review
🟡 Scout triage + 0/4 paquet(s) reviewés sémantiquement. 8 finding(s) (8 high); les hunks hors paquets restent à couvrir par un humain ou Codex.
Paquets non couverts par la review sémantique
- Verity/Proofs/Stdlib/Automation.lean — timeout (spawnSync ocr ETIMEDOUT)
- Contracts/Common.lean — error (Command failed: ocr review --from 92e709b --to 08935f8 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Stdlib/Math.lean — error (Command failed: ocr review --from 92e709b --to 08935f8 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Core.lean — error (Command failed: ocr review --from 92e709b --to 08935f8 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
📝 3 groupe(s) de paquets au-delà du budget n'ont eu que le triage scout.
Large Lean diff routed to bounded packet review: 17 Lean file(s), 296 changed supported line(s). Scout triage fallback_deterministic; strong packet review required. Full-file OCR was not attempted.
✅ Posted 8 inline comment(s).
OCR pilot metrics & packet coverage
OCR pilot metrics
- Routing: large-lean-hotspots (router-v11)
- Changed files: 19 supported / 20 total; Lean 17, trust docs 0, workflow/scripts 1, contracts 0, docs 1
- Changed lines: 296 supported; thresholds large Lean >=3 files or >800 lines
- OCR: status scout_triage; comments 8; files 7; tokens 0; tool calls 0; warnings 1; duration 1228s
- Largest changed files: Contracts/Common.lean (+87/-31), Verity/Core.lean (+29/-14), Verity/Stdlib/Math.lean (+19/-17), Contracts/Interpreter.lean (+26/-4), Compiler/MacroCustomErrorFeatureTest.lean (+8/-4)
Packet coverage
- Packet review: enabled; selected 8/8 packet(s)
- Scout: configured; status fallback_deterministic; model reviewer_scout
- Scout lenses: provenance, verification-independence, environment-determinism, proof-soundness; rubric items checked 3
- Scout provider HTTP status: 502
- Scout provider error: <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>thomas.md | 502: Bad gateway</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="I
- Strong review: required; status blocked_packet_input
- Residual risk: Triaged top 8 deterministically ranked packet(s); remaining changed hunks/files require Codex or human proof review, and selected packets still need strong reviewer analysis.
- Strong packet-review blocker: Selected packets require semantic review; see packet review outcomes for actual coverage.
- Covered packets:
- Verity/Proofs/Stdlib/Automation.lean:317 score 156 — theorem statement changed/possibly weakened, theorem/public statement changed, public declaration/signature changed
- Contracts/Common.lean:224 score 95 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:253 score 92 — theorem/public statement changed, public declaration/signature changed
- Verity/Core.lean:2403 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:219 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/HopContextAndMutableTuples.lean:258 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/LinkedRuntimeTarget.lean:146 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Core/SafeArith.lean:240 score 91 — theorem/public statement changed, public declaration/signature changed
Pilot mode: advisory only. Codex Review remains the merge gate.
| \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``` |
08935f8 to
736f741
Compare
There was a problem hiding this comment.
OpenCodeReview first-pass review
🟡 Scout triage + 0/4 paquet(s) reviewés sémantiquement. 8 finding(s) (8 high); les hunks hors paquets restent à couvrir par un humain ou Codex.
Paquets non couverts par la review sémantique
- Verity/Proofs/Stdlib/Automation.lean — timeout (spawnSync ocr ETIMEDOUT)
- Contracts/Common.lean — error (Command failed: ocr review --from 92e709b --to 736f741 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Stdlib/Math.lean — timeout (spawnSync ocr ETIMEDOUT)
- Verity/Core.lean — timeout (spawnSync ocr ETIMEDOUT)
📝 3 groupe(s) de paquets au-delà du budget n'ont eu que le triage scout.
Large Lean diff routed to bounded packet review: 17 Lean file(s), 300 changed supported line(s). Scout triage fallback_deterministic; strong packet review required. Full-file OCR was not attempted.
✅ Posted 8 inline comment(s).
OCR pilot metrics & packet coverage
OCR pilot metrics
- Routing: large-lean-hotspots (router-v11)
- Changed files: 19 supported / 20 total; Lean 17, trust docs 0, workflow/scripts 1, contracts 0, docs 1
- Changed lines: 300 supported; thresholds large Lean >=3 files or >800 lines
- OCR: status scout_triage; comments 8; files 7; tokens 0; tool calls 0; warnings 1; duration 2401s
- Largest changed files: Contracts/Common.lean (+87/-31), Verity/Core.lean (+29/-14), Verity/Stdlib/Math.lean (+19/-17), Contracts/Interpreter.lean (+30/-4), Compiler/MacroCustomErrorFeatureTest.lean (+8/-4)
Packet coverage
- Packet review: enabled; selected 8/8 packet(s)
- Scout: configured; status fallback_deterministic; model reviewer_scout
- Scout lenses: provenance, verification-independence, environment-determinism, proof-soundness; rubric items checked 3
- Scout provider HTTP status: 502
- Scout provider error: <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>thomas.md | 502: Bad gateway</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="I
- Strong review: required; status blocked_packet_input
- Residual risk: Triaged top 8 deterministically ranked packet(s); remaining changed hunks/files require Codex or human proof review, and selected packets still need strong reviewer analysis.
- Strong packet-review blocker: Selected packets require semantic review; see packet review outcomes for actual coverage.
- Covered packets:
- Verity/Proofs/Stdlib/Automation.lean:317 score 156 — theorem statement changed/possibly weakened, theorem/public statement changed, public declaration/signature changed
- Contracts/Common.lean:224 score 95 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:253 score 92 — theorem/public statement changed, public declaration/signature changed
- Verity/Core.lean:2403 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:219 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/HopContextAndMutableTuples.lean:258 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/LinkedRuntimeTarget.lean:146 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Core/SafeArith.lean:240 score 91 — theorem/public statement changed, public declaration/signature changed
Pilot mode: advisory only. Codex Review remains the merge gate.
736f741 to
02fed44
Compare
There was a problem hiding this comment.
OpenCodeReview first-pass review
🟡 Scout triage + 0/4 paquet(s) reviewés sémantiquement. 8 finding(s) (8 high); les hunks hors paquets restent à couvrir par un humain ou Codex.
Paquets non couverts par la review sémantique
- Verity/Proofs/Stdlib/Automation.lean — error (Command failed: ocr review --from 2f421e6 --to 02fed44 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Contracts/Common.lean — error (Command failed: ocr review --from 2f421e6 --to 02fed44 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Stdlib/Math.lean — error (Command failed: ocr review --from 2f421e6 --to 02fed44 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Core.lean — error (Command failed: ocr review --from 2f421e6 --to 02fed44 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
📝 3 groupe(s) de paquets au-delà du budget n'ont eu que le triage scout.
Large Lean diff routed to bounded packet review: 17 Lean file(s), 298 changed supported line(s). Scout triage fallback_deterministic; strong packet review required. Full-file OCR was not attempted.
✅ Posted 8 inline comment(s).
OCR pilot metrics & packet coverage
OCR pilot metrics
- Routing: large-lean-hotspots (router-v11)
- Changed files: 19 supported / 20 total; Lean 17, trust docs 0, workflow/scripts 1, contracts 0, docs 1
- Changed lines: 298 supported; thresholds large Lean >=3 files or >800 lines
- OCR: status scout_triage; comments 8; files 7; tokens 0; tool calls 0; warnings 1; duration 120s
- Largest changed files: Contracts/Common.lean (+87/-31), Verity/Core.lean (+29/-14), Verity/Stdlib/Math.lean (+19/-17), Contracts/Interpreter.lean (+30/-4), Compiler/MacroCustomErrorFeatureTest.lean (+8/-4)
Packet coverage
- Packet review: enabled; selected 8/8 packet(s)
- Scout: configured; status fallback_deterministic; model reviewer_scout
- Scout lenses: provenance, verification-independence, environment-determinism, proof-soundness; rubric items checked 3
- Scout provider HTTP status: 502
- Scout provider error: <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>thomas.md | 502: Bad gateway</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="I
- Strong review: required; status blocked_packet_input
- Residual risk: Triaged top 8 deterministically ranked packet(s); remaining changed hunks/files require Codex or human proof review, and selected packets still need strong reviewer analysis.
- Strong packet-review blocker: Selected packets require semantic review; see packet review outcomes for actual coverage.
- Covered packets:
- Verity/Proofs/Stdlib/Automation.lean:317 score 156 — theorem statement changed/possibly weakened, theorem/public statement changed, public declaration/signature changed
- Contracts/Common.lean:224 score 95 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:253 score 92 — theorem/public statement changed, public declaration/signature changed
- Verity/Core.lean:2403 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:219 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/HopContextAndMutableTuples.lean:258 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/LinkedRuntimeTarget.lean:146 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Core/SafeArith.lean:240 score 91 — theorem/public statement changed, public declaration/signature changed
Pilot mode: advisory only. Codex Review remains the merge gate.
`ContractResult.revert` took a `String`; it now takes a
`Verity.Core.RevertPayload`, whose `encode` is the ABI bytes the compiled
contract reverts with. A `String` coerces to `.errorString`, so
`revert "msg"`, `require cond "msg"` and existing `.revert "msg" s`
statements keep their meaning.
Producers now emit the on-chain payload instead of a text rendering:
- `require cond msg`: `Error(string)` (`.errorString msg`).
- Checked arithmetic (`addPanic`/`subPanic`/`mulPanic`/`divPanic` on
Uint256/Int256, the narrow `narrow*Panic`, `panic(c)` via
`revertPanic`/`revertPanicAs`): `Panic(uint256)` (`.panic 0x11`,
`0x12`, `c`), as the macro already lowers them (`Stmt.panic`). Before,
they reverted with strings such as "Panic(0x11): arithmetic overflow".
- Custom errors (`revert E(args)`, `revertError`, `requireError`,
`requireSomeUintError`): `.custom selector words`, the selector
`keccak256("E(type,…)")[:4]` (`Compiler.keccak256_first_4_bytes`, checked
against `solc --hashes`) and each argument's ABI word.
`CustomErrorArg` gains `abiType` and `abiWord`. An error with a dynamic
argument (string, bytes, arrays, tuples) keeps its text rendering,
which is not the on-chain payload (the model does not encode those
either).
- `revertReturndata`: the last call's returndata bytes
(`.raw (Denote.returndataRevertBytes returndata)`), replacing the
`revertReturndataReason` marker.
New `revertWith payload` / `requireWith cond payload`; `requireSome`,
`requireSomeUint` and `requireSomeInt` take a payload (strings coerce).
`tryCatch` / `tryWith` handlers receive the `RevertPayload` (a breaking
change for `catch msg =>` handlers that used `msg` as a `String`).
Lemmas that quantified over a revert message as a `String` would still
typecheck through the coercion while covering only `Error(string)`
reverts; they now quantify over `RevertPayload` (`bind_run_revert`,
`Contract.run_bind_revert`, the external-call and callback revert
lemmas, the try/catch lemmas, `requireSome*_none`, …). Lemmas about
`require` keep its `String`.
The difftest interpreter reports `revertData` (the encoded bytes, hex in
the JSON) beside a `revertReason` rendered from the payload; its
revert-case `returnValue` is the first word of those bytes (the
`Error(string)` selector word, as before, for messages).
There is no semantic EDSL-to-model theorem in Layer 1 (the generated
bridges are syntactic), so no theorem changes; this makes the EDSL's
revert observable agree with the model's and the compiled code's.
Docs: docs-site core.mdx describes the payload; INTERPRETER_FEATURE_MATRIX
(and its docsync source) describes `revertReturndata`'s bytes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016xNEyrBVhLsVpWGJc5NyNq
02fed44 to
6b34417
Compare
There was a problem hiding this comment.
OpenCodeReview first-pass review
🟡 Scout triage + 0/4 paquet(s) reviewés sémantiquement. 8 finding(s) (8 high); les hunks hors paquets restent à couvrir par un humain ou Codex.
Paquets non couverts par la review sémantique
- Verity/Proofs/Stdlib/Automation.lean — error (Command failed: ocr review --from 2f421e6 --to 6b34417 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Contracts/Common.lean — error (Command failed: ocr review --from 2f421e6 --to 6b34417 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Stdlib/Math.lean — error (Command failed: ocr review --from 2f421e6 --to 6b34417 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
- Verity/Core.lean — timeout (spawnSync ocr ETIMEDOUT)
📝 3 groupe(s) de paquets au-delà du budget n'ont eu que le triage scout.
Large Lean diff routed to bounded packet review: 17 Lean file(s), 308 changed supported line(s). Scout triage fallback_deterministic; strong packet review required. Full-file OCR was not attempted.
✅ Posted 8 inline comment(s).
OCR pilot metrics & packet coverage
OCR pilot metrics
- Routing: large-lean-hotspots (router-v11)
- Changed files: 21 supported / 23 total; Lean 17, trust docs 1, workflow/scripts 1, contracts 0, docs 2
- Changed lines: 308 supported; thresholds large Lean >=3 files or >800 lines
- OCR: status scout_triage; comments 8; files 7; tokens 0; tool calls 0; warnings 1; duration 885s
- Largest changed files: Contracts/Common.lean (+87/-31), Verity/Core.lean (+29/-14), Verity/Stdlib/Math.lean (+19/-17), Contracts/Interpreter.lean (+30/-4), Compiler/MacroCustomErrorFeatureTest.lean (+8/-4)
Packet coverage
- Packet review: enabled; selected 8/8 packet(s)
- Scout: configured; status fallback_deterministic; model reviewer_scout
- Scout lenses: provenance, verification-independence, environment-determinism, proof-soundness; rubric items checked 3
- Scout provider HTTP status: 502
- Scout provider error: <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>thomas.md | 502: Bad gateway</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="I
- Strong review: required; status blocked_packet_input
- Residual risk: Triaged top 8 deterministically ranked packet(s); remaining changed hunks/files require Codex or human proof review, and selected packets still need strong reviewer analysis.
- Strong packet-review blocker: Selected packets require semantic review; see packet review outcomes for actual coverage.
- Covered packets:
- Verity/Proofs/Stdlib/Automation.lean:317 score 156 — theorem statement changed/possibly weakened, theorem/public statement changed, public declaration/signature changed
- Contracts/Common.lean:224 score 95 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:253 score 92 — theorem/public statement changed, public declaration/signature changed
- Verity/Core.lean:2403 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Stdlib/Math.lean:219 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/HopContextAndMutableTuples.lean:258 score 91 — theorem/public statement changed, public declaration/signature changed
- Contracts/Smoke/LinkedRuntimeTarget.lean:146 score 91 — theorem/public statement changed, public declaration/signature changed
- Verity/Core/SafeArith.lean:240 score 91 — theorem/public statement changed, public declaration/signature changed
Pilot mode: advisory only. Codex Review remains the merge gate.
ContractResult.reverttook aString; it now takes aVerity.Core.RevertPayload, whoseencodeis the ABI bytes the compiledcontract reverts with. A
Stringcoerces to.errorString, sorevert "msg",require cond "msg"and existing.revert "msg" sstatements keep their meaning.
Producers now emit the on-chain payload instead of a text rendering:
require cond msg:Error(string)(.errorString msg).addPanic/subPanic/mulPanic/divPaniconUint256/Int256, the narrow
narrow*Panic,panic(c)viarevertPanic/revertPanicAs):Panic(uint256)(.panic 0x11,0x12,c), as the macro already lowers them (Stmt.panic). Before,they reverted with strings such as "Panic(0x11): arithmetic overflow".
revert E(args),revertError,requireError,requireSomeUintError):.custom selector words, the selectorkeccak256("E(type,…)")[:4](Compiler.keccak256_first_4_bytes, checkedagainst
solc --hashes) and each argument's ABI word.CustomErrorArggainsabiTypeandabiWord. An error with a dynamicargument (string, bytes, arrays, tuples) keeps its text rendering,
which is not the on-chain payload (the model does not encode those
either).
revertReturndata: the last call's returndata bytes(
.raw (Denote.returndataRevertBytes returndata)), replacing therevertReturndataReasonmarker.New
revertWith payload/requireWith cond payload;requireSome,requireSomeUintandrequireSomeInttake a payload (strings coerce).tryCatch/tryWithhandlers receive theRevertPayload(a breakingchange for
catch msg =>handlers that usedmsgas aString).Lemmas that quantified over a revert message as a
Stringwould stilltypecheck through the coercion while covering only
Error(string)reverts; they now quantify over
RevertPayload(bind_run_revert,Contract.run_bind_revert, the external-call and callback revertlemmas, the try/catch lemmas,
requireSome*_none, …). Lemmas aboutrequirekeep itsString.The difftest interpreter reports
revertData(the encoded bytes, hex inthe JSON) beside a
revertReasonrendered from the payload; itsrevert-case
returnValueis the first word of those bytes (theError(string)selector word, as before, for messages).There is no semantic EDSL-to-model theorem in Layer 1 (the generated
bridges are syntactic), so no theorem changes; this makes the EDSL's
revert observable agree with the model's and the compiled code's.
Docs: docs-site core.mdx describes the payload; INTERPRETER_FEATURE_MATRIX
(and its docsync source) describes
revertReturndata's bytes.Full
lake build,check_proof_length.pyandmake checkpass.🤖 Generated with Claude Code
https://claude.ai/code/session_016xNEyrBVhLsVpWGJc5NyNq