Skip to content

feat(solidity-import): value calls, try/catch, self-delegatecall, boolean while, dynamic selector encoding, and Struct[] enum ABI - #2942

Open
Th0rgal wants to merge 6 commits into
feat/solidity-import-storage-layout-loops-and-staticcallsfrom
feat/solidity-import-calls-try-catch-and-dynamic-abi
Open

Th0rgal wants to merge 6 commits into
feat/solidity-import-storage-layout-loops-and-staticcallsfrom
feat/solidity-import-calls-try-catch-and-dynamic-abi

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Nov 24, 2026

Copy link
Copy Markdown
Member

Summary

Stacked PR: Base branch is feat/solidity-import-storage-layout-loops-and-staticcalls (#2941) because the general helper-loop early return, dynamic abi.encodeWithSelector, named external/try arguments, and Struct[] enum ABI schema extensions build directly on #2941's helper-loop, checked-argument, and enum-struct foundations. Once #2941 merges to main, retarget this PR to main.

  • Value low-level calls & external try/catch (#2703, #2700, #2841 partial):
    • Add closed YulMemoryValueCall transport (Verity/Core/Model/ECM.lean, Verity/Core/Model/Denote.lean) for (bool ok, bytes memory ret) = target.call{value: v}(data); with balance debit/refund and extract_returndata.
    • Admit single scalar return values and catch (bytes memory reason) on external interface try calls, plus revert(add(b, 32), mload(b)) over bytes memory locals.
    • Report actual type names (enum / UDVT / contract) for unsupported struct fields in AbiSchema.lean.
  • Self-delegatecall, fixed-bytes constants, general while, bytes4 selectors, & raw-slot bytes:
    • Add closed YulMemoryDelegateCall transport (Verity/Core/Model/ECM.lean, Verity/Core/Model/Denote.lean) for address(this).delegatecall(data).
    • Support fixed-bytes constants (bytes16, etc.), general while loop conditions (division, bit-shift, linear), bytes4 selector expressions, and raw-slot bytes/string struct members.
  • Helper loops, boolean while helpers, dynamic selector ABI encoding, named external/try args, & Struct[] enum ABI:
    • General uint256 bounds, non-zero starts, multi-return/void helpers, and unchecked body increments in helper for-loop early returns.
    • General boolean helper/iterator calls in while conditions and unchecked prefix/postfix ++/-- steps inside while bodies.
    • abi.encodeWithSelector / abi.encodeWithSignature with dynamic bytes/string/array arguments (exact Solidity ABI head/tail layout).
    • Named arguments on typed external calls and external try calls with parameter reordering and competing-panic evaluation-order guard.
    • new bytes(0) / new string(0) empty allocations and enum fields inside Struct[] ABI schemas (SolidityAbi.lean, AbiSchema.lean, AbiLowering.lean).

Scope

  • Base: feat/solidity-import-storage-layout-loops-and-staticcalls (#2941).
  • Synthetic fixtures only (ValueCall*, TryCatch*, StructFieldTypeSurvey*, FixedBytesConstWhileSelectorSequence*, SelfDelegateAndRawSlotEip712Checks*, HelperLoopAndWhileExt*, DynamicSelectorNamedTryEnumArray*).
  • Documented trust-surface additions in docs/TRUST_ASSUMPTIONS.md and docs/SOLIDITY_IMPORT.md.

Verification Receipts (Head 4b617dd03bb643e47d592450ca3e70969a5cf981)

  • lake build of Verity.Core.Model.{ECM,Denote}, Compiler.SolidityImport.{SolidityAbi,AbiSchema,AbiLowering,Coverage,Quote,StorageLayout,TransactionAccess,TransportBarriers,TypesAndRecords,Import}, and all 8 smoke suites (CollectUnsupportedSurveyChecks, StructFieldTypeSurveyChecks, TryCatchChecks, ValueCallChecks, FixedBytesConstWhileSelectorSequenceModel, SelfDelegateAndRawSlotEip712Checks, HelperLoopAndWhileExtChecks, DynamicSelectorNamedTryEnumArrayChecks): PASS (0 sorry / 0 axiom / 0 native_decide in diff).
  • python3 scripts/check_proof_length.py: PASS (0 proofs over 50 lines).
  • make check (all lints, axioms, trust-surface registry, docs sync, macro health, storage layout, and python3 -m unittest discover -s scripts -p 'test_*.py'): PASS (1025 tests OK).
  • python3 scripts/check_importer_name_selection.py: PASS (48 importer files).
  • Mutation anchor preflight: PASS (477 storage + 21 memory-call anchors).

…ts/reasons, struct field diagnostics

- Closed YulMemoryValueCall transport (Verity/Core/Model/ECM.lean & Denote.lean)
  for (bool ok, bytes memory ret) = target.call{value: v}(data);
- Interface try/catch with single scalar return value and catch (bytes memory reason),
  plus revert(add(b, 32), mload(b)) over bytes memory locals.
- Report actual type name for unsupported struct fields (enum/UDVT/contract) in AbiSchema.
- Synthetic smoke checks (ValueCallChecks, TryCatchChecks, StructFieldTypeSurveyChecks),
  updated rejection controls, mutation anchors, and TRUST_ASSUMPTIONS.md.
…s, bytes4 selectors, self-delegatecall and raw-slot bytes

- Closed YulMemoryDelegateCall transport (Verity/Core/Model/ECM.lean & Denote.lean)
  for address(this).delegatecall(data) self-delegatecalls.
- Fixed-bytes constants (bytes16 etc.), general while loop conditions
  (division, bit-shift, linear), bytes4 selector expressions, and
  raw-slot bytes/string members.
- Synthetic smoke fixtures (FixedBytesConstWhileSelectorSequence,
  SelfDelegateAndRawSlotEip712Checks).
….encodeWithSelector, boolean while helpers, named external/try args, and Struct[] enum ABI

- Helper for-loop early return with general uint256 bounds, non-zero
  starts, multi-return/void helpers, and unchecked body increments.
- abi.encodeWithSelector/Signature with dynamic bytes/string/array
  arguments using exact Solidity ABI head/tail encoding.
- General boolean helper/iterator calls in while conditions and
  unchecked prefix/postfix inc/dec statements inside while bodies.
- Named arguments on typed external calls and external try calls with
  parameter reordering and competing-panic evaluation-order guard.
- new bytes(0) / new string(0) empty allocations and enum fields
  inside Struct[] ABI schemas with uint8 variant bounds checks.
- Synthetic smoke fixtures (HelperLoopAndWhileExt,
  DynamicSelectorNamedTryEnumArray), updated rejection controls,
  and re-pinned mutation anchors.
…rite smoke checks independent of post-CALL state access
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
veritylang.com Ready Ready Preview Nov 25, 2026 8:03pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor
\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```

…legateLoopCEIClean

Match onlyClosedTransportCEIBarriers and onlyStaticCallCEIBarriers by
requiring (stmtListCEIViolation body false).isSome before enabling
allowPostInteractionWrites, so CEI-clean trailing-call functions such as
InterfaceVoidCallSequence.signalWord do not spuriously set the opt-out.
@fricoben

Copy link
Copy Markdown
Member

Needs changes.

Review of #2942 (Th0rgal, draft) at head 7400a6b169e0ee0fbf5b453327942dfb05580e16, stacked on #2941 (4e6e87b30). Scope: the 5 commits b93703295..7400a6b16, git diff refs/remotes/pr/2941...refs/remotes/pr/2942 (36 files, +3750/−272).

Summary

Most of the new lowerings are careful and match solc where I checked them:

  • the value-call balance check, debit and refund
  • the extract_returndata materialization
  • the try scalar-return guard
  • linear and boolean-helper while bounds via implied comparisons
  • evaluation order of {value: ..} against the payload

The diff adds no axiom, sorry, native_decide, heartbeat bump or unsafe, and no theorem statements change. CI is green.

There are three problems.

  1. Helper-loop early returns lost their iteration cap. The ≤256 cap was removed with nothing to replace it. After a return, the lowered loop keeps running every remaining iteration as a no-op. The result is still state-exact, but the cost is not: the model (and compiled code) does work up to the full uint256 bound where solc returns at once. The same PR keeps the ≤256 cap for break, for exactly this reason.
  2. The new YulMemoryDelegateCall closed transport is undocumented and unobserved. It has no TRUST_ASSUMPTIONS.md entry, no Denote observation and no A/B/C campaign. Its request also misstates EVM delegatecall context: caller := this, value := 0, where the EVM keeps the outer msg.sender and msg.value.
  3. Neither new transport has differential evidence. YulMemoryValueCall is documented, but the doc itself says no A/B/C campaign exists yet. That is fine for a draft, but both transports widen the .assumed surface with only smoke-level evidence. For delegatecall, not even smoke-level evidence exists.

Findings (severity-ordered)

  1. [High] An early return in a helper for or while with a general uint256 bound runs every remaining iteration. Compiler/SolidityImport/Import.lean:14954-14966 (the lowerHelperFrom ForStatement arm) and :14849-14857 (nested loops).

    • The PR deletes the isTailWindowFor || smallHelperForBound guard. Its own comment said why the guard existed: "Stmt.forEach reads its count once and cannot stop early, so outside a tail window … the bound must be small, as for break".
    • The retFlag guards make the result state-exact. Side effects after the return point are skipped in the rest of the iteration, in later iterations and in the continuation.
    • But forEach still runs bound - start guarded no-op iterations.
    • Ran: scanDivisible(0, B, 1) returns at i = 0 in source. In Denote it took 2.8s with B = 10 and 86s with B = 3_000_000. With B = 2^256-1 it never finishes in practice, and the compiled loop would run out of gas where solc succeeds cheaply.
    • break keeps the ≤256 cap (Import.lean:14647), so the PR is internally inconsistent. The flipped rejection rows (helper-for-return, helper-for-uint16-bound-return, helper-for-literal-bound-return-over, void-helper-loop-return-*) are exactly this shape.
    • Fix: restore the cap for early returns, or land a real early-exit loop (our parked [Compiler Enhancement] solidity_import: loops in inlined helpers: early return, non-zero start, countdown while, memory-struct cursors (Return: return inside an inlined helper loop …) #2916 Stmt.forEachWhile) first and lower to it.
    • The same no-op-tail cost applies to the new lowerGeneralBoolWhile? doneVar loops (the count comes from an implied comparison, up to 2^256). It is less acute there, because the source loop also runs that many iterations when the condition stays true.
  2. [High] YulMemoryDelegateCall is a new closed transport with no trust entry and no behavioral evidence. Verity/Core/Model/ECM.lean:927-954, Verity/Core/Model/Denote.lean:1770-1778.

    • docs/TRUST_ASSUMPTIONS.md gains sections for try and for value calls, but nothing for delegatecall. The PR body claims "documented trust-surface additions" anyway.
    • proofStatus := .assumed, and no A/B/C differential exists (compare check_yul_memory_call).
    • SelfDelegateAndRawSlotEip712Checks.lean imports multicall and selfDispatchSingle but never runs them. It has no #guard on success, revert bubbling (revert(add(result,32), mload(result))) or the returned bytes. Only domainSeparator is observed.
    • It does have three good negative controls: an external target, {gas:}, and a storage write after the loop.
    • Fix: add a trust section, Denote observations (success, adversary revert with data bubbling, empty revert), and ideally a recording-responder A/B/C.
  3. [Medium] The delegatecall request misstates its EVM context. Denote.lean:1747 (shared executeByteYulMemoryCallWithKind).

    • The request is built with caller := thisAddress, value := 0. On the EVM, DELEGATECALL keeps the outer CALLER and CALLVALUE. Ran (forge, solc 0.8.34): after multicall, record() sees msg.sender == outer caller, and msg.value is reused on every sub-call (lastValue == 7 on a 2-call batch).
    • This is harmless for universally quantified adversaries. It is wrong for any configured responder that reads caller/value, such as replaying our own model. It also hides the classic multicall msg.value-reuse hazard in a payable multicall.
    • Fix: pass state.world.sender and the call value, or document why it is irrelevant. Either way, check whether payable self-delegatecall callers are admitted.
  4. [Medium] YulMemoryValueCall relies on smoke tests only. docs/TRUST_ASSUMPTIONS.md ("Imported low-level calls with a value").

    • The documentation is honest, and the semantics I checked are right. Ran: an underfunded call returns false with empty returndata, matching Denote.lean (rawReturndata := some []). A self-call doesn't debit. A failed call refunds through the pre-call world.
    • But compile → bytecode has no A/B/C (check_yul_memory_call has no value variant), and check_memory_call_mutations.py has no mutation anchor for the value transport, only the try rewiring.
    • Fix: before ready, add a value variant to the yul-memory-call campaign and one mutant (for example, drop the debit or swap value and target).
  5. [Low] Post-call statements were widened. Compiler/SolidityImport/TransportBarriers.lean:243-270.

    • stmtAfterTrailingCall now admits .forEach bodies of further closed calls (including value calls), plus returnBytes _ => true, isClosedReturnMemory and isClosedRevertMemory.
    • This is sound as stated: storage-free, and a second CALL still fails CEI. But it has no located negative control. Add a row with a value-call loop after a trailing call, and one with a storage read inside a post-call forEach.
  6. [Low] Loop invariance is checked syntactically. Import.lean (exprIsLoopInvariant, exprIsLoopInvariantOut).

    • Bounds are trusted when every identifier is in env.values and not in bodyAssignedIds. This relies on helpers never mutating caller locals or memory-array lengths. That holds in Solidity, but it needs a comment.
    • member == "max" || "min" accepts any FunctionCall base. That is fine for type(T).max, but it is broader than needed; restrict it to type(...).
  7. [Info] Test matrix. The new negative rows are good:

    • call-value-and-gas, call-value-stateful-operand, call-value-then-write
    • try-catch-two-returns, try-catch-narrow-signed, try-void-named-competing-panics
    • while-non-decreasing-step-rejected (kept, now with +=)

    Every flipped rejection row I checked has a matching positive Denote #guard, except the self-delegatecall ones (finding 2). No golden or expectation was loosened otherwise. The CollectUnsupportedSurvey change moves its fixture to catch Error(...) so it stays a rejection.

Related work

CI (gh pr checks 2942)

The checks that ran are green: build, checks, build-audits, compiler-audits, importer-differential, build-compiler-binaries, Turbo-Lean CAS. These were skipped by the path routing: foundry*, import-mutations, compiler-regressions, lean-profile, Proof. Because import-mutations was skipped, the PR's mutation preflight claim isn't confirmed by CI.

What I ran vs only read

Ran

  • lake build of all 8 smoke suites at 7400a6b16 (via lean-job): PASS.
  • A Denote timing probe of scanDivisible early return (bound 10: 2.8s; bound 3,000,000: 86s; both return [0]).
  • Forge with pinned solc 0.8.34:
    • self-delegatecall keeps msg.sender and msg.value (multicall value reuse)
    • an underfunded call{value} returns false with empty returndata
    • a dirty uint8 try return reverts without being caught
    • call{value: a-b}(abi.encode(1/x)) raises Panic 0x11 first under both legacy and via-IR, matching the model's value-then-payload order

Only read

  • The trust diff (ECM.lean, Denote.lean, Coverage.lean, TRUST_ASSUMPTIONS.md), TransportBarriers.lean, and the lowerings: value calls, self-delegatecall, try, linear, division and boolean while, helper for without a loopExpression, multi-return helper loops.
  • The script diffs.

Not done

@fricoben

Copy link
Copy Markdown
Member

Hi @Th0rgal, Ben asked us to help land this one, so we'll push fix commits for the review findings above directly on top of your branch (our own commits only: nothing of yours is rewritten or force-pushed). Each push gets a fresh review and a verdict on its exact head. If you're pushing too, just let us know and we'll rebase our part.

@Th0rgal

Th0rgal commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Thanks @fricoben! We're actively addressing all review findings from your review and will push fix commits directly on top of this branch (no force-push / no history rewrite, unless a clean rebase is needed after an earlier PR in the stack merges). Let's coordinate here so we don't duplicate effort.

…all, value-call A/B/C, and controls

Address all review findings on #2942:
- [High] Restore the <= 256 iteration cap on early returns in helper for/while loops
  (lowerHelperFrom, lowerVoidHelperFrom, lowerHelperLoopStmtsWithReturn, lowerLinearWhile?,
  lowerGeneralBoolWhile?, and isTailWindowFor), restore the flipped helper-for-return
  rejection rows in check_storage_rejections.py, add a helper-while-uint256-return-over
  rejection row, and update HelperLoopAndWhileExt fixtures with bounded positive tests
  plus unbounded negative controls.
- [High] Document YulMemoryDelegateCall in docs/TRUST_ASSUMPTIONS.md, add Denote
  observations in SelfDelegateAndRawSlotEip712Checks (success, outer sender/value
  preservation, custom-error revert bubbling, empty revert, and batch rollback), and
  add an A/B/C differential campaign (check_self_delegate_call + imported-model-self-delegate-v1
  wired into suite.py).
- [Medium] Fix executeByteYulMemoryCallWithKind delegatecall EVM context to preserve
  outer state.world.sender and state.world.msgValue, and reject payable self-delegatecall
  callers with a located negative control.
- [Medium] Add --variant value A/B/C campaign to check_yul_memory_call (using
  RecordingValueCallResponder, recording-value-call-responder-v1, and optional selfBalance
  seeding in SequenceRunner/denote/anvil), wire yul-memory-value-call into suite.py, and
  add value-call mutation anchors (denote-yul-value-call-debit, ecm-yul-value-call-swap)
  in check_memory_call_mutations.py.
- [Low] Add located negative controls for widened stmtAfterTrailingCall (post-call forEach
  storage read and post-call value-call loop), tighten exprIsLoopInvariant / exprIsLoopInvariantOut
  max/min base check to type(...), and document reliance on Solidity local/memory-array
  immutability across helpers.
@Th0rgal
Th0rgal marked this pull request as ready for review November 25, 2026 22:10
@Th0rgal

Th0rgal commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

All review findings from @fricoben are addressed and non-draft Verify proofs (ci-gate, checks, build, build-audits, import-mutations) + Turbo-Lean are 100% green on exact head f52d065a46. Ready for re-review & approval (to merge after #2940 and #2941)!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OpenCodeReview first-pass review

🟡 Scout triage + 0/4 paquet(s) reviewés sémantiquement. 8 finding(s) (2 high / 6 medium); les hunks hors paquets restent à couvrir par un humain ou Codex.

Paquets non couverts par la review sémantique

  • Compiler/SolidityImport/AbiSchema.lean — timeout (spawnSync ocr ETIMEDOUT)
  • Verity/Core/Model/Denote.lean — timeout (spawnSync ocr ETIMEDOUT)
  • Contracts/SolidityImportSmoke/FixedBytesConstWhileSelectorSequenceModel.lean — timeout (spawnSync ocr ETIMEDOUT)
  • Contracts/SolidityImportSmoke/SelfDelegateCallSequenceModel.lean — error (Command failed: ocr review --from 4e6e87b --to f52d065 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)

📝 4 groupe(s) de paquets au-delà du budget n'ont eu que le triage scout.

Large Lean diff routed to bounded packet review: 25 Lean file(s), 4966 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: 49 supported / 49 total; Lean 25, trust docs 1, workflow/scripts 12, contracts 10, docs 1
  • Changed lines: 4966 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status scout_triage; comments 8; files 8; tokens 0; tool calls 0; warnings 1; duration 2435s
  • Largest changed files: Compiler/SolidityImport/Import.lean (+1685/-197), Contracts/SolidityImportSmoke/HelperLoopAndWhileExt.sol (+282/-0), scripts/solidity_differential/check_self_delegate_call.py (+200/-0), Contracts/SolidityImportSmoke/DynamicSelectorNamedTryEnumArray.sol (+190/-0), Contracts/SolidityImportSmoke/SelfDelegateAndRawSlotEip712Checks.lean (+184/-0)

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:
    • Compiler/SolidityImport/AbiSchema.lean:55 score 106 — theorem/public statement changed, public declaration/signature changed
    • Verity/Core/Model/Denote.lean:1729 score 95 — theorem/public statement changed, public declaration/signature changed
    • Contracts/SolidityImportSmoke/FixedBytesConstWhileSelectorSequenceModel.lean:1 score 80 — public declaration/signature changed, changed imports
    • Contracts/SolidityImportSmoke/SelfDelegateCallSequenceModel.lean:1 score 77 — public declaration/signature changed, changed imports
    • Contracts/SolidityImportSmoke/ValueCallSequenceModel.lean:1 score 77 — public declaration/signature changed, changed imports
    • scripts/solidity_differential/check_self_delegate_call.py:1 score 74 — public declaration/signature changed, changed imports
    • docs/TRUST_ASSUMPTIONS.md:2195 score 66 — trust-boundary docs drift
    • Compiler/SolidityImport/TransportBarriers.lean:244 score 63 — public declaration/signature changed

Pilot mode: advisory only. Codex Review remains the merge gate.

| .address => .address
| .bool => .bool
| .bytes32 => .bytes32
| .enum _ => .uintN 8

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [high]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: theorem/public statement changed, public declaration/signature changed; 58 changed line(s) near Compiler/SolidityImport/AbiSchema.lean:55. Signals: theorem/public statement changed, public declaration/signature changed.
Added-line sample:

  • L55: /-- The diagnostic for a user-defined type name ′ty′ that does not resolve to a struct
  • L56: declaration: it names the field's actual type (an ′enum′, a user-defined value type or a
  • L57: contract type, from solc's type descriptions) rather than reporting an unresolved struct.
  • L58: Such fields need their own ABI semantics (an enum's range check, a value type's underlying
  • L59: type) before admission. -/

world
bindings := bindValue state.bindings resultVar (if observed.success then 1 else 0)
rawReturndata := Option.some observed.returndata
byteCallAccesses := state.byteCallAccesses ++ observed.touched }, observed.touched)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [high]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: theorem/public statement changed, public declaration/signature changed; 89 changed line(s) near Verity/Core/Model/Denote.lean:1729. Signals: theorem/public statement changed, public declaration/signature changed.
Added-line sample:

  • L1729: /-- Inline-assembly ′call′ / ′staticcall′ / ′delegatecall′ over physical memory. The calldata is
  • L1730: the ′[inOffset, inOffset + inSize)′ bytes and the gas is the call boundary's allowance. For
  • L1731: ′call′ and ′staticcall′, the request carries ′caller := thisAddress′ and ′value := 0′; for
  • L1732: ′delegatecall′, the EVM preserves the outer frame's ′CALLER′ (′state.world.sender′) and
  • L1733: ′CALLVALUE′ (′state.world.msgValue′). As on the EVM, the first ′min(outSize, returndatasize)′

| _ =>
Compiler.CompilationModel.SolidityImport.SequenceRunner.run
SolidityImportSmoke.FixedBytesConstWhileSelectorSequenceModel.model
SolidityImportSmoke.FixedBytesConstWhileSelectorSequenceModel.oracle args

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 90 changed line(s) near Contracts/SolidityImportSmoke/FixedBytesConstWhileSelectorSequenceModel.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Compiler.SolidityImport.Import
  • L2: import Compiler.SolidityImport.Differential
  • L3: import Compiler.SolidityImport.SequenceRunner
  • L4: import Compiler.CompilationModel
  • L5: import Compiler.Codegen

SolidityImportSmoke.SelfDelegateCallSequenceModel.oracle args
(configure := Compiler.CompilationModel.SolidityImport.ModelResponders.configureSelfDelegate
SolidityImportSmoke.SelfDelegateCallSequenceModel.oracle
SolidityImportSmoke.SelfDelegateCallSequenceModel.model)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 39 changed line(s) near Contracts/SolidityImportSmoke/SelfDelegateCallSequenceModel.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Compiler.SolidityImport.Import
  • L2: import Compiler.SolidityImport.Differential
  • L3: import Compiler.SolidityImport.SequenceRunner
  • L4: import Compiler.SolidityImport.ModelResponders
  • L5: import Compiler.CompilationModel

Compiler.CompilationModel.SolidityImport.SequenceRunner.run
SolidityImportSmoke.ValueCallSequenceModel.model
SolidityImportSmoke.ValueCallSequenceModel.oracle args
(configure := Compiler.CompilationModel.SolidityImport.CallResponderMocks.configure)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 39 changed line(s) near Contracts/SolidityImportSmoke/ValueCallSequenceModel.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Compiler.SolidityImport.Import
  • L2: import Compiler.SolidityImport.Differential
  • L3: import Compiler.SolidityImport.SequenceRunner
  • L4: import Compiler.SolidityImport.CallResponderMocks
  • L5: import Compiler.CompilationModel



if __name__ == '__main__':
sys.exit(main())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 200 changed line(s) near scripts/solidity_differential/check_self_delegate_call.py:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: """Imported self-dispatch ′address(this).delegatecall(...)′ through source EVM, Denote and compiled model.
  • L2: (empty)
  • L3: The fixture runs ′multicall(bytes[])′ and ′selfDispatchSingle(bytes)′ against its own
  • L4: external entry points (′addAmount(uint256)′ and ′failEmpty()′). Route B configures
  • L5: ′imported-model-self-delegate-v1′ so Denote replays the imported model's own functions in

Comment thread docs/TRUST_ASSUMPTIONS.md
controls for external targets, `{gas: ...}`, post-loop writes, and `payable` callers, and
the A/B/C differential campaign `check_self_delegate_call` (`SelfDelegateCallSequence`
against `imported-model-self-delegate-v1`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: trust-boundary docs drift; 85 changed line(s) near docs/TRUST_ASSUMPTIONS.md:2195. Signals: trust-boundary docs drift.
Added-line sample:

  • L2195: ### Imported external ′try′ with a return value or a revert-data catch clause
  • L2196: (empty)
  • L2197: ′solidity_import′ also admits ′try I(a).f(args...) returns (T v) { A } catch { B }′ for an
  • L2198: interface function with one return value ′T′ among ′uint*′, ′int256′, ′bool′, ′address′,
  • L2199: contract types, ′bytes1′, ′bytes4′ and ′bytes32′ (as a ′staticcall′ when ′f′ is ′view′ or

(Compiler.CompilationModel.stmtListCEIViolation body false).isSome &&
onlyTrailingCallReentrancyWindows body &&
(Compiler.CompilationModel.stmtListCEIViolation (body.map eraseClosedSelfDelegateCalls) false).isNone

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed; 87 changed line(s) near Compiler/SolidityImport/TransportBarriers.lean:244. Signals: public declaration/signature changed.
Added-line sample:

  • L244: local bindings, memory writes (including copies of the call's return data), checks,
  • L245: returns, memory reverts, reverts (including panics of checked arithmetic and forwarding
  • L246: the call's return data) and further closed low-level calls, none of which reads or writes
  • L247: storage or logs. (A second CALL after the first still fails the separate CEI check, since
  • L248: the first CALL is not erased.) A code-hash read is not admitted: the call can change the

This branch was successfully deployed

1 active deployment
Preview — f52d065a Deployed Nov 25, 2026 by vercel[bot]
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.

2 participants