Conversation
…d-with-reason synth verify previously reported only the rules it verified; declined kinds (Const/Local/shifts/unmodeled) were skipped WITHOUT reporting, so 'N verified, 0 failed, 0 unknown' read as complete while e.g. 29 i32.const went unmentioned and no coverage denominator was computable. - run_verification now returns the FULL per-function inventory: every applied op kind as verified/failed/unknown/declined, with occurrence counts, machine decline reasons (register-operation / immediate-shift-encoding / unmodeled-op), and the Rocq theorem a decline defers to (the #933 join key) - per-function and module summaries carry the decline half of the denominator - --emit-verify-report writes a synth-verify-v1 JSON sidecar (the wcet-sidecar precedent, #921/#922) for mechanical CI gating - rule ids are Debug-derived WasmOp variant names (no hand table to drift) - non-vacuity gate: verify_report_935 test builds a fixture with KNOWN declines and asserts they appear with real counts + that applied_rule_kinds equals the sum over all four statuses; wired into the fact-spec CI job Refs #935 #933 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
… model boundary (592 Qed / 2 Admitted) The theorem was Admitted because it was FALSE AS STATED: it quantified over raw un-normalized Z representatives (exec_wasm_instr (I32Const n) pushed VI32 n raw) while the shipped MOVW+MOVT path necessarily produces the register-normalized I32.repr (I32.unsigned n) (counterexample: n = 2^32 + 0x10000). Closed via contract (a) of the documented T3 note — argued, not silent, per the #166 no-weakening gate: - WasmSemantics.v: I32Const pushes VI32 (I32.repr n). A wasm i32.const immediate IS a value of type i32 (the binary format decodes exactly 32 bits — no real module carries a junk representative); the shallow I32.int := Z embedding admitted junk syntactically and the raw const push was the ONE remaining un-normalized injection point (every arithmetic op already quotients through repr/unsigned). In the Rust half normalization is inherent in the i32 type, so the model now matches what ships. - Compilation.v: small-branch MOVW immediate is the value's bits I32.repr (I32.unsigned n) — harmonizing with the large branch (always value-derived) and with the shipped encoder (imm16 = value low bits, hardware zero-extends). Identity for every in-range n. - CorrectnessSimple.v: i32_const_correct restated over the value the WASM machine actually pushes (I32.repr n) and QED — small branch via I32.repr_unsigned, large branch via the already-proven i32_const_large_reconstruct. Both changes are identities on the reachable domain, so no existing Qed about real programs weakens. bazel test //coq:verify_proofs PASSES. Ledger + docs bumped together: claims.yaml 592 Qed / 2 Admitted, CorrectnessSimple.v admits 1 -> 0; coq/STATUS.md recount + T3 table row moved to the discharged list; CLAUDE.md / README.md prose; status.json + FEATURE_MATRIX regenerated (claim_check 43/43). Closes #933 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
avrabe
added a commit
that referenced
this pull request
Aug 13, 2026
Pulls four merged commits forward into a patch release because the first is a live vulnerability in a shipped version: #959 ARM --safety-bounds mask emitted an IDENTITY mask on (memory 0) #961 thumb-2 branch target could land mid-instruction (#930) #962 I64Const/I64Ldr/I64Str unpriced in the WCET model (#936) #958 synth verify covers i32.const + reports the decline denominator The ARM mask bug is the headline. The mask path exempted `bytes == 0` from its power-of-two gate, so `(memory 0)` compiled with exit 0 and `movw r10, #0x0`. The guard computes `R10 - 1`, and `0 - 1` is `0xFFFFFFFF` — a mask that masks nothing, in the mode whose whole purpose is to bound accesses. Unbounded OOB read AND write. It is the same sentinel/value collision as #953 one release earlier, running the other way: there `0` meant "unset" and INVENTED a 64 KiB bound, here `0` meant "no bound needed" and ERASED the real one. That is why the fix landed as a sweep of the collision class (54 sites, 4 converted, 3 latent defects) and not another point patch — the v0.53 finding was that we keep fixing instances rather than mechanisms. Release surfaces, all four swept to 0.56.2 and checker-confirmed: Cargo.toml [workspace.package] + 10 path-dep version= pins MODULE.bazel, npm/package.json, Cargo.lock (cargo metadata) scripts/check_version_pins.py: OK on all four Derived artifacts regenerated (--emit-status): artifacts/status.json, docs/status/FEATURE_MATRIX.md. Claim gate: 43/43. SCOPE MOVE, logged not silent: RQ-57-SENTINEL, RQ-57-BRTARGET, RQ-57-WCET2OPS, RQ-57-I32CONST and RQ-57-RULEINV were planned for v0.57 and are re-tagged release: v0.56.2 / status: implemented. SENTINEL carried the security fix and the other four were already merged on main, so a tag excluding them did not exist. rivet error/warning counts are unchanged by the move (50/164 before and after — pre-existing, unrelated to these artifacts). Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
verify coverage: close the i32.const hole (#933) and make the denominator reportable (#935)
These two issues compound: #933 is a verification hole (
i32.constcovered by NEITHER the SMT half nor the Rocq half), #935 is what made the hole invisible (synth verifynever reported the rules it applied and declined). They land together so the gap is both closed and could not silently reopen unreported.#933 —
i32_const_correctclosed: 592 Qed / 2 AdmittedContract chosen: (a) — normalize
I32Constat the WASM model boundary (exec_wasm_instr (I32Const n)now pushesVI32 (I32.repr n)), plus the small-branch MOVW immediate harmonized to the value's bits (I32.repr (I32.unsigned n)).Why (a) is a faithful model of wasm semantics, not a convenience (#166 no-weakening gate, argued not silent):
i32.const cimmediate is a value of type i32 (spec §2.4.1/§4.4.1): the binary format LEB128-decodes exactly 32 bits, so no real module can carry an out-of-range representative like the counterexamplen = 2^32 + 0x10000. Those representatives exist only because the model's shallow embeddingI32.int := Zadmits them syntactically.I32.repr/I32.unsigned; the raw const push was the one remaining injection point for un-normalized values into the machine. Normalizing there closes the embedding, it does not weaken a claim about any reachable program.Z— no hypothesis was added, no instance was excluded (contract (b) would have narrowed the quantifier's effective domain; (a) instead corrects what the model means byI32Const n, which is why (a) is the principled one).Z. The large branch inCompilation.vwas already value-derived (I32.unsigned n); the small branch's rawnwas an internal inconsistency, now harmonized.n,I32.repr n = nandI32.repr (I32.unsigned n) = n) — the compiled instruction sequences are unchanged, and in the Rust half normalization is inherent in thei32type. No existing Qed about real programs weakens; the proof-suite build (which recompiles every dependent theorem) is green.The proof itself is two already-Qed facts: the small branch discharges via
I32.repr_unsigned, the large branch viai32_const_large_reconstruct(the #166 MOVW+MOVT reconstruction Qed).Blast radius:
I32Constis referenced by 5.vfiles;WasmCertBridge.vdoes not cover const, and the example programs are compiled (vm_compute, unchanged results) but never executed, so only the const theorem itself restates.Ledger moved with the proof in the same commit:
claims.yaml592 Qed / 2 Admitted,CorrectnessSimple.vadmits 1→0;coq/STATUS.mdrecount + the T3 row moved to the discharged list; CLAUDE.md / README prose;status.json+FEATURE_MATRIX.mdregenerated.python3 scripts/claim_check.py claims.yaml→ 43/43.#935 — the full rule inventory: applied / verified / declined-with-reason
run_verificationnow returns and prints every applied op kind with occurrence counts:register-operation/immediate-shift-encoding/unmodeled-op) and, where one exists, the Rocq theorem the decline defers to (rocq_theorem: "i32_const_correct"— the join key the downstream obligation asked for; after this PR all named register-operation theorems are Qed).Console (per function and module level) now carries the denominator:
synth verify --emit-verify-report <path>writes asynth-verify-v1JSON sidecar (thesynth-wcet-v1precedent, #921/#922) with per-function records and a summary includingdeclined_by_reason— mechanically gateable in CI. Rule ids are Debug-derivedWasmOpvariant names (no hand-maintained mirror to drift, the #682/#890 lesson).Non-vacuity gate (
crates/synth-cli/tests/verify_report_935.rs, wired into the fact-spec CI job): a fixture with KNOWN declines (4×i32.const, 2×local.get, 1×i32.shl) must show them with real counts and reasons, andapplied_rule_kindsmust equalverified + failed + unknown + declined— a report that only ever prints zeros for declines fails the gate.Gates
bazel test //coq:verify_proofs— PASS (2/2)python3 scripts/claim_check.py claims.yaml— 43/43cargo fmt --check— cleancargo clippy --workspace --all-targets -- -D warnings— exit 0 (also-p synth-cli --features verify, since the inventory code is verify-gated)cargo test --workspace— PASScargo test -p synth-cli --features verify --test verify_report_935— 2/2frozen_codegen_bytes— 10/10 (no shipped bytes change; the Rocq model edits are identities on the reachable domain and the reporter is output-only)Closes #933
Closes #935
🤖 Generated with Claude Code
https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L