Skip to content

proof: bridge compiled helper-body shape for rank-0 seam#2153

Merged
Th0rgal merged 14 commits into
mainfrom
paloma/issue-2080-helper-body-seam
Jul 14, 2026
Merged

proof: bridge compiled helper-body shape for rank-0 seam#2153
Th0rgal merged 14 commits into
mainfrom
paloma/issue-2080-helper-body-seam

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds Compiler/Proofs/IRGeneration/HelperBodyBridge.lean with conservative rank-0 helper-body predicates:
    • stmtUsesReturnFamily / stmtListUsesReturnFamily
    • stmtUsesStop / stmtListUsesStop
  • Proves internal/external compile-shape irrelevance for return-family-free bodies:
    • compileStmtWithFork_internal_shape_irrelevant_of_returnFree
    • compileStmtListWithFork_internal_shape_irrelevant_of_returnFree
  • Adds helper-body lookup and body-shape seams:
    • compileInternalFunction_body_eq_external_of_returnFree
    • findInternalFunction?_some_eq_compiledHelper_of_witness
    • findInternalFunction?_external_body_of_witness_returnFree
  • Adds a concrete void helper-body regression:
    • empty_void_helper_body_compile_shape_irrelevant_regression
  • Regenerates PrintAxioms.lean and keeps the existing proof-length allowlist current.

Refs #2080

Semantic Seam Status

This PR now consumes the existing exact helper lookup theorem findInternalFunction?_exact_of_compileInternalFunction_mem_unique through findInternalFunction?_some_eq_compiledHelper_of_witness, with the runtime-table uniqueness hypothesis explicit in the theorem signature. It also composes that lookup with the return-free body-shape lemma in findInternalFunction?_external_body_of_witness_returnFree.

The remaining blocker for the full public theorem execIRInternalFunctionWithInternals_obeys_internal_helper_summary is no longer helper-table lookup. It is the call-boundary semantic interface between execIRInternalFunctionWithInternals and the existing generic body theorem:

  • execIRInternalFunctionWithInternals enters through private interpreter boundary operations prepareInternalCalleeState, restoreCallerVars, and internalReturnValues in Compiler/Proofs/IRGeneration/IRInterpreter.lean:353-365.
  • The reusable generic theorem (supported_function_body_correct_from_exact_state_generic_with_helpers, Compiler/Proofs/IRGeneration/GenericInduction/Main.lean:1836) reasons about execStmtListWithHelpers versus execIRStmts, with an explicit source binding list and a caller-supplied IR state.
  • A final execution-summary theorem needs a small public boundary lemma that the prepared internal callee state corresponds to SourceSemantics.bindInternalArgs, and that restoring caller vars preserves the world relation while void return extraction yields [].

Recommended next consumption step: add that internal-call-boundary state lemma in IRInterpreter.lean or a nearby proof module, then compose it with findInternalFunction?_external_body_of_witness_returnFree and the existing generic body theorem to prove execIRInternalFunctionWithInternals_obeys_internal_helper_summary for void return-free/stop-free helpers. The remaining external obligation after that is discharging the explicit hunique runtime-table uniqueness hypothesis for compiled contracts.

Validation

  • git diff --check passed
  • lean-slot lake build Compiler.Proofs.IRGeneration.HelperBodyBridge passed
  • lean-slot lake build Compiler.Proofs.IRGeneration.HelperBodyBridge PrintAxioms passed
  • python3 scripts/generate_print_axioms.py --check passed
  • python3 scripts/check_proof_length.py passed
  • rg -n "\\b(sorry|admit|axiom)\\b" Compiler/Proofs/IRGeneration/HelperBodyBridge.lean || true produced no matches

Commit SHA: 2900c9ef


Note

Low Risk
Proof-only additions to the compiler verification layer with no runtime or compilation behavior changes; risk is limited to proof maintenance and axiom inventory accuracy.

Overview
Adds Compiler/Proofs/IRGeneration/HelperBodyBridge.lean with conservative syntactic predicates (stmtUsesReturnFamily, stmtUsesStop, and list forms) and proofs that internal-return compilation parameters do not change emitted Yul when helper bodies avoid return-family statements.

The main lemmas show successful compileInternalFunction bodies match compileStmtListWithFork with [] false, and that findInternalFunction? on a SupportedCompiledInternalHelperWitness agrees with that external body shape (via the existing findInternalFunction?_exact_of_compileInternalFunction_mem_unique, with an explicit runtime-table hunique premise). A small void-helper regression instantiates the list irrelevance theorem for empty bodies.

PrintAxioms.lean imports the module and registers six new public theorems; scripts/check_proof_length.py allowlists compileInternalFunction_body_eq_external_of_returnFree.

Reviewed by Cursor Bugbot for commit b2a1826. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
verity Ready Ready Preview, Comment Jul 14, 2026 3:28pm

Request Review

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_e13eaa1f-08c2-473c-9ef4-452499a8611d)

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: scout_triage · Mode: large-lean-hotspots · 4 finding(s) · 3 files · 0 tokens · 0 tool calls

Large Lean diff routed to bounded packet review: 3 Lean file(s), 302 changed supported line(s). Scout model ranked 4/7 packet(s) for stronger review. Scout triage success; strong packet review required. Full-file OCR was not attempted.

⚠️ Large Lean scout mode covers ranked packets/checklists only; it is not a full-file OCR review and must not be read as LGTM.
✅ Posted 4 inline comment(s).
⚠️ 1 OCR warning(s) reported.

Warnings

  • coverage : Large Lean scout mode covers ranked hotspots only. Codex/human review must cover skipped hunks and proof obligations; OCR strong packet review is not wired yet.

OCR pilot metrics

  • Routing: large-lean-hotspots (router-v8)
  • Changed files: 4 supported / 4 total; Lean 3, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 302 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status scout_triage; comments 4; files 3; tokens 0; tool calls 0; warnings 1; duration 23s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+208/-0), Compiler/Proofs/IRGeneration/Function.lean (+0/-78), PrintAxioms.lean (+8/-3), scripts/check_proof_length.py (+5/-0)

Packet coverage

  • Packet review: enabled; selected 4/8 packet(s)
  • Scout: configured; status success; model reviewer_scout
  • Strong review: required; status blocked_packet_input
  • Residual risk: Triaged top 4 scout-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: OpenCodeReview 1.7.5 supports --from/--to full diff ranges, but this workflow does not have a safe packet/window input bridge for Lean hunks yet.
  • Covered packets:
    • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:1 score 104 — public declaration/signature changed, changed imports; ask: Is stmtUsesReturnFamily / stmtListUsesReturnFamily provably the dual/negation surface used by stmtTouchesUnsupportedHelperSurface, and is every consumer of the new bridge lemmas (the four _of_returnFree / _regression theorems listed in PrintAxioms pkt-5) sound? Specifically verify that no Stmt constructor was silently added to or removed from the supported surface, and that the mutual block terminates.
    • PrintAxioms.lean:3160 score 12 — hotspot path/churn; ask: Read the proofs of compileStmtWithFork_internal_shape_irrelevant_of_returnFree, compileStmtListWithFork_internal_shape_irrelevant_of_returnFree, compileInternalFunction_body_eq_external_of_returnFree, and empty_void_helper_body_compile_shape_irrelevant_regression. Are the equivalence hypotheses (returnFree) actually achievable for every code path that consumes them, and does 'shape irrelevant' mean semantic equivalence (denote/exec equivalence) or merely structural equality that could hide gas/o
    • Compiler/Proofs/IRGeneration/Function.lean:3489 score 65 — public declaration/signature changed; ask: Is stmtList_setStructMember2Single_compiledLegacyCompatible provable anywhere else, or is its loss compensated by the new HelperBodyBridge shape-irrelevance theorems? If the latter, is the compensation logically justified for the setStructMember2 case in particular (not just for return-free void helpers)?
    • Compiler/Proofs/IRGeneration/Function.lean:3355 score 32 — hotspot path/churn; ask: Is the chain compileSetStructMember2_legacyCompatible -> stmtList_setStructMember2Single_compiledLegacyCompatible still reconstructable, or has the setStructMember2 dynamic-source legacy-compatibility result been silently dropped from the proof tree? If dropped, what currently guarantees legacy compatibility for that path?

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

⚠️ Inline publication failed, so OCR findings are summarized here instead.

Inline findings that could not be posted

  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:208 — Large Lean packet selected for stronger review: public declaration/signature changed, changed imports; 208 changed line(s) near Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:1.
  • PrintAxioms.lean:3165 — Large Lean packet selected for stronger review: hotspot path/churn; 6 changed line(s) near PrintAxioms.lean:3160.
  • Compiler/Proofs/IRGeneration/Function.lean:3489 — Large Lean packet selected for stronger review: public declaration/signature changed; 28 changed line(s) near Compiler/Proofs/IRGeneration/Function.lean:3489.
  • Compiler/Proofs/IRGeneration/Function.lean:3355 — Large Lean packet selected for stronger review: hotspot path/churn; 50 changed line(s) near Compiler/Proofs/IRGeneration/Function.lean:3355.
Unprocessable Entity: "Path could not be resolved and Path could not be resolved"

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_175fbe0f-5a32-4786-8dd0-679251f74b83)

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: scout_triage · Mode: large-lean-hotspots · 4 finding(s) · 3 files · 0 tokens · 0 tool calls

Large Lean diff routed to bounded packet review: 3 Lean file(s), 392 changed supported line(s). Scout model ranked 4/7 packet(s) for stronger review. Scout triage success; strong packet review required. Full-file OCR was not attempted.

⚠️ Large Lean scout mode covers ranked packets/checklists only; it is not a full-file OCR review and must not be read as LGTM.
✅ Posted 4 inline comment(s).
⚠️ 1 OCR warning(s) reported.

Warnings

  • coverage : Large Lean scout mode covers ranked hotspots only. Codex/human review must cover skipped hunks and proof obligations; OCR strong packet review is not wired yet.

OCR pilot metrics

  • Routing: large-lean-hotspots (router-v8)
  • Changed files: 4 supported / 4 total; Lean 3, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 392 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status scout_triage; comments 4; files 3; tokens 0; tool calls 0; warnings 1; duration 29s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+298/-0), Compiler/Proofs/IRGeneration/Function.lean (+0/-78), PrintAxioms.lean (+8/-3), scripts/check_proof_length.py (+5/-0)

Packet coverage

  • Packet review: enabled; selected 4/8 packet(s)
  • Scout: configured; status success; model reviewer_scout
  • Strong review: required; status blocked_packet_input
  • Residual risk: Triaged top 4 scout-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: OpenCodeReview 1.7.5 supports --from/--to full diff ranges, but this workflow does not have a safe packet/window input bridge for Lean hunks yet.
  • Covered packets:
    • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:1 score 104 — public declaration/signature changed, changed imports; ask: Are stmtUsesReturnFamily / stmtListUsesReturnFamily exhaustive over every Stmt / StmtList head in the project (in particular, do they cover all statement constructors used by real Yul/IR emission paths, and do they correctly distinguish internal-return .unsafeBlock/.unsafeYul/.matchAdt uses from ordinary expressions)? Do the four new public theorems compileStmtWithFork_internal_shape_irrelevant_of_returnFree, compileStmtListWithFork_internal_shape_irrelevant_of_returnFree, `com
    • Compiler/Proofs/IRGeneration/Function.lean:3489 score 65 — public declaration/signature changed; ask: Has stmtList_setStructMember2Single_compiledLegacyCompatible been migrated verbatim (or strengthened) into Compiler/Proofs/IRGeneration/HelperBodyBridge.lean or elsewhere, or is it genuinely deleted? If deleted, what now provides the legacy-compatible bridge for Stmt.setStructMember2 in the singleton case — is the gap covered by the new compileStmtWithFork_internal_shape_irrelevant_of_returnFree family, and is that coverage actually valid for the setStructMember2 compilation path (which
    • Compiler/Proofs/IRGeneration/Function.lean:3355 score 32 — hotspot path/churn; ask: Is compileSetStructMember2_legacyCompatible moved (not deleted) into HelperBodyBridge.lean, and does its new statement retain the same findStructMembers / findStructMember hypotheses and the same LegacyCompatibleExternalStmtList conclusion? If it has been replaced by a returnFree-flavored lemma, is that replacement actually sufficient for all callers (including any remaining legacy-compatibility theorem that does not assume return-free bodies)?
    • PrintAxioms.lean:3160 score 12 — hotspot path/churn; ask: Do the four theorems listed in PrintAxioms.lean lines 3160–3164 exist verbatim in HelperBodyBridge.lean with exactly these names, and are their conclusions strictly about external-observable behavior (no silently added True, no Classical.choice, no decide, no sorry)? In particular, does compileInternalFunction_body_eq_external_of_returnFree actually equate the internal-helper body to the external body under the returnFree predicate from pkt-1, and does `empty_void_helper_body_compile

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

⚠️ Inline publication failed, so OCR findings are summarized here instead.

Inline findings that could not be posted

  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:298 — Large Lean packet selected for stronger review: public declaration/signature changed, changed imports; 298 changed line(s) near Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:1.
  • Compiler/Proofs/IRGeneration/Function.lean:3489 — Large Lean packet selected for stronger review: public declaration/signature changed; 28 changed line(s) near Compiler/Proofs/IRGeneration/Function.lean:3489.
  • Compiler/Proofs/IRGeneration/Function.lean:3355 — Large Lean packet selected for stronger review: hotspot path/churn; 50 changed line(s) near Compiler/Proofs/IRGeneration/Function.lean:3355.
  • PrintAxioms.lean:3165 — Large Lean packet selected for stronger review: hotspot path/churn; 6 changed line(s) near PrintAxioms.lean:3160.
Unprocessable Entity: "Path could not be resolved and Path could not be resolved"

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd75517bc2

ℹ️ 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".

Comment thread PrintAxioms.lean
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_b55f011b-c53e-4cb1-b192-e228fc41ef42)

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: scout_triage · Mode: large-lean-hotspots · 6 finding(s) · 3 files · 0 tokens · 0 tool calls

Large Lean diff routed to bounded packet review: 3 Lean file(s), 394 changed supported line(s). Scout model ranked 6/7 packet(s) for stronger review. Scout triage success; strong packet review required. Full-file OCR was not attempted.

⚠️ Large Lean scout mode covers ranked packets/checklists only; it is not a full-file OCR review and must not be read as LGTM.
✅ Posted 6 inline comment(s).
⚠️ 1 OCR warning(s) reported.

Warnings

  • coverage : Large Lean scout mode covers ranked hotspots only. Codex/human review must cover skipped hunks and proof obligations; OCR strong packet review is not wired yet.

OCR pilot metrics

  • Routing: large-lean-hotspots (router-v8)
  • Changed files: 4 supported / 4 total; Lean 3, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 394 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status scout_triage; comments 6; files 3; tokens 0; tool calls 0; warnings 1; duration 44s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+298/-0), Compiler/Proofs/IRGeneration/Function.lean (+0/-78), PrintAxioms.lean (+10/-3), scripts/check_proof_length.py (+5/-0)

Packet coverage

  • Packet review: enabled; selected 6/8 packet(s)
  • Scout: configured; status success; model reviewer_scout
  • Strong review: required; status blocked_packet_input
  • Residual risk: Triaged top 6 scout-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: OpenCodeReview 1.7.5 supports --from/--to full diff ranges, but this workflow does not have a safe packet/window input bridge for Lean hunks yet.
  • Covered packets:
    • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:1 score 104 — public declaration/signature changed, changed imports; ask: For each of the 6 new public theorems in HelperBodyBridge, verify the hypotheses actually capture the intended 'return-free / no-ADT-match' syntactic class, and confirm the conclusions (external body equality, compileShape irrelevant, findInternalFunction? witness agreement) are exactly the bridge invariants the rest of the IR generation soundness proof depends on. In particular, check that stmtUsesReturnFamily correctly excludes every statement form whose internal-return target could affect com
    • Compiler/Proofs/IRGeneration/Function.lean:3489 score 65 — public declaration/signature changed; ask: Identify every remaining caller of stmtList_setStructMember2Single_compiledLegacyCompatible in the codebase. Is the deletion compensated by an equivalent lemma in HelperBodyBridge, or is legacyCompatibility coverage for the unpacked setStructMember2 path now only reachable transitively (and therefore harder to audit)? Also confirm that removing the theorem did not orphan a dependent have/exact in any sibling proof in Function.lean.
    • Compiler/Proofs/IRGeneration/Function.lean:3355 score 32 — hotspot path/churn; ask: Cross-reference compileSetStructMember2_legacyCompatible and stmtList_setStructMember2Single_compiledLegacyCompatible: is there a single replacement lemma (likely in HelperBodyBridge) that subsumes both, or has the unpacked-structMember-2 legacyCompatibility case been weakened/regressed? Confirm compileSetStructMember2 itself still produces LegacyCompatibleExternalStmtList for the unpacked case under the same hypotheses.
    • PrintAxioms.lean:3160 score 12 — hotspot path/churn; ask: Verify each of the 6 listed HelperBodyBridge theorem names actually exists in HelperBodyBridge.lean with the exact public signature implied here (no private masking, no extra arguments, no sorry). Pay special attention to empty_void_helper_body_compile_shape_irrelevant_regression: what regression is it patching, and is the fix unconditional or guarded by additional hypotheses not visible in the name?
    • PrintAxioms.lean:2144 score 12 — hotspot path/churn; ask: Sweep the entire PrintAxioms.lean file (not just the visible hunk) for any residual mentions of compileSetStructMember2_legacyCompatible or stmtList_setStructMember2Single_compiledLegacyCompatible, including in commented-out lines or alternative naming aliases. Also confirm the surrounding private/public comment pattern is consistent (the deleted entries are flanked by -- ... -- private comments, so verify no such comment is now orphaned or incorrectly labeled).
    • PrintAxioms.lean:67 score 42 — changed imports; ask: Confirm that importing HelperBodyBridge into PrintAxioms does not transitively pull in any new sorry/axiom via HelperBodyBridge's own imports (Compiler.Proofs.IRGeneration.IRInterpreter, Compiler.CompilationModel.Compile, Compiler.Proofs.IRGeneration.SupportedSpec). Also verify the import is in the correct alphabetical/structural position relative to the surrounding IRGeneration module list.

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

⚠️ Inline publication failed, so OCR findings are summarized here instead.

Inline findings that could not be posted

  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:298 — Large Lean packet selected for stronger review: public declaration/signature changed, changed imports; 298 changed line(s) near Compiler/Proofs/IRGeneration/HelperBodyBridge.lean:1.
  • Compiler/Proofs/IRGeneration/Function.lean:3489 — Large Lean packet selected for stronger review: public declaration/signature changed; 28 changed line(s) near Compiler/Proofs/IRGeneration/Function.lean:3489.
  • Compiler/Proofs/IRGeneration/Function.lean:3355 — Large Lean packet selected for stronger review: hotspot path/churn; 50 changed line(s) near Compiler/Proofs/IRGeneration/Function.lean:3355.
  • PrintAxioms.lean:3167 — Large Lean packet selected for stronger review: hotspot path/churn; 8 changed line(s) near PrintAxioms.lean:3160.
  • PrintAxioms.lean:2144 — Large Lean packet selected for stronger review: hotspot path/churn; 2 changed line(s) near PrintAxioms.lean:2144.
  • PrintAxioms.lean:67 — Large Lean packet selected for stronger review: changed imports; 1 changed line(s) near PrintAxioms.lean:67.
Unprocessable Entity: "Path could not be resolved, Path could not be resolved, and Line could not be resolved"

# Conflicts:
#	PrintAxioms.lean
@Th0rgal

Th0rgal commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

@codex review

@cursor

cursor Bot commented Jul 11, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_d3f13219-a908-4bdb-9b62-c88a1fada768)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: f0a7ecb430

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: completed_with_errors · Mode: medium-lean · 1 finding(s) · 3 files · 1114554 tokens · 60 tool calls

📝 1 additional positioned finding(s) omitted from inline comments to avoid spam.
⚠️ 1 OCR warning(s) reported.

Summary-only findings

  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean [maintainability · medium] — stmtUsesStop and stmtListUsesStop are defined but never referenced by any theorem in this file or elsewhere in the codebase. They appear intended as additional guard predicates, but the return-free irrelevance theorems only guard with `

Warnings

  • subtask_error PrintAxioms.lean: LLM completion error: context deadline exceeded

OCR pilot metrics

  • Routing: medium-lean (router-v8)
  • Changed files: 3 supported / 3 total; Lean 2, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 314 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status completed_with_errors; comments 1; files 3; tokens 1114554; tool calls 60; warnings 1; duration 1201s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+298/-0), PrintAxioms.lean (+10/-1), scripts/check_proof_length.py (+5/-0)

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

⚠️ OCR did not complete successfully; this run is intentionally retryable for the same commit.

@Th0rgal

Th0rgal commented Jul 11, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: f0a7ecb430

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor
\n### CI Failure Hints\n\nFailed jobs: `build-compiler-binaries`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n```

…per-body-seam

# Conflicts:
#	PrintAxioms.lean
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_34def95b-0bdf-4df6-8eb7-e5faa8645877)

@Th0rgal

Th0rgal commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 438c136091

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: completed_with_errors · Mode: medium-lean · 3 finding(s) · 3 files · 753585 tokens · 46 tool calls

📝 3 additional positioned finding(s) omitted from inline comments to avoid spam.
⚠️ 1 OCR warning(s) reported.

Summary-only findings

  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean [maintainability · medium] — stmtUsesStop and stmtListUsesStop are defined but never referenced by any theorem or definition anywhere in the codebase. In a verified compiler, unused proof infrastructure predicates can mislead future maintainers into believing stop-
  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean [maintainability · medium] — The catch-all | _ => false silently classifies ALL unlisted Stmt constructors as return-free. The current Stmt inductive type (Verity/Core/Model/Types.lean) has ~45 constructors, and the listed return-family variants happen to be complete
  • Compiler/Proofs/IRGeneration/HelperBodyBridge.lean [maintainability · low] — Hardcoding .cancun couples this theorem to the default value of compileInternalFunction's targetFork parameter (Dispatch.lean:42). The SupportedCompiledInternalHelperWitness.compileOk field also relies on this default (no explicit `

Warnings

  • subtask_error PrintAxioms.lean: LLM completion error: context deadline exceeded

OCR pilot metrics

  • Routing: medium-lean (router-v8)
  • Changed files: 3 supported / 3 total; Lean 2, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 314 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status completed_with_errors; comments 3; files 3; tokens 753585; tool calls 46; warnings 1; duration 1267s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+298/-0), PrintAxioms.lean (+10/-1), scripts/check_proof_length.py (+5/-0)

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

⚠️ OCR did not complete successfully; this run is intentionally retryable for the same commit.

…per-body-seam

# Conflicts:
#	PrintAxioms.lean
@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_b1e1e959-4da1-42d9-b8fb-e2ab4a05e790)

@Th0rgal

Th0rgal commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 00e9c23530

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: completed_with_errors · Mode: medium-lean · 0 finding(s) · 3 files · 425983 tokens · 50 tool calls

Some files could not be reviewed due to errors.

⚠️ 2 OCR warning(s) reported.

Warnings

  • subtask_error Compiler/Proofs/IRGeneration/HelperBodyBridge.lean: LLM completion error: context deadline exceeded
  • subtask_error PrintAxioms.lean: LLM completion error: context deadline exceeded

OCR pilot metrics

  • Routing: medium-lean (router-v8)
  • Changed files: 3 supported / 3 total; Lean 2, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 312 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status completed_with_errors; comments 0; files 3; tokens 425983; tool calls 50; warnings 2; duration 1740s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+298/-0), PrintAxioms.lean (+9/-0), scripts/check_proof_length.py (+5/-0)

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

⚠️ OCR did not complete successfully; this run is intentionally retryable for the same commit.

@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_ffc37ecf-da9e-4326-aa5f-e5f8c0c7cbc1)

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview first-pass review

Status: completed_with_errors · Mode: medium-lean · 0 finding(s) · 3 files · 399567 tokens · 34 tool calls

Some files could not be reviewed due to errors.

⚠️ 2 OCR warning(s) reported.

Warnings

  • subtask_error Compiler/Proofs/IRGeneration/HelperBodyBridge.lean: LLM completion error: context deadline exceeded
  • subtask_error PrintAxioms.lean: LLM completion error: context deadline exceeded

OCR pilot metrics

  • Routing: medium-lean (router-v8)
  • Changed files: 3 supported / 3 total; Lean 2, trust docs 0, workflow/scripts 1, contracts 0, docs 0
  • Changed lines: 314 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status completed_with_errors; comments 0; files 3; tokens 399567; tool calls 34; warnings 2; duration 1468s
  • Largest changed files: Compiler/Proofs/IRGeneration/HelperBodyBridge.lean (+298/-0), PrintAxioms.lean (+10/-1), scripts/check_proof_length.py (+5/-0)

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

⚠️ OCR did not complete successfully; this run is intentionally retryable for the same commit.

@Th0rgal
Th0rgal merged commit ba61345 into main Jul 14, 2026
17 of 21 checks passed
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.

1 participant