Conversation
gale got 9 of 31 functions declined with {name, reason, note} and nothing else
— the second-largest category, actionable only by hand-bisecting the object.
Adds optional `op` + `offset` to the decline record, additive so existing
consumers are unaffected.
`op` is derived from Debug, not a hand-maintained table (no mirror to drift).
`offset` comes from the REAL encoder, the same source WcetLoopBound uses, and
is OMITTED rather than estimated when it cannot be computed — a drifted offset
is worse than none.
CORRECTS A FALSE DOC CLAIM: the variant said it was 'never emitted in a released
build (the classifier is exhaustive with no wildcard)'. op_cost indeed has no
wildcard, but many arms return Unmodeled deliberately — exhaustive over variants
is not costed for every variant.
Threading it through function_wcet alone left op null in every REAL sidecar,
because the CLI goes through the composer; the unit path passed regardless. The
end-to-end run caught it, so the regression test is end-to-end and red-first
verified: reverting the composer patch reproduces gale's exact JSON and fails.
Measured, not assumed: i64.load reproduces (I64Ldr); i64.add / i64.ge_s /
i64.extend_i32_u come out BOUNDED because the selector expands them first.
clippy 0, 133 test suites green.
Refs #921, #778
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
The clippy and test-helper fixes were applied with a script AFTER the last `cargo fmt` run, so the formatter never saw them. Format caught it.
# Conflicts: # CHANGELOG.md
avrabe
enabled auto-merge (squash)
August 7, 2026 11:38
avrabe
added a commit
that referenced
this pull request
Aug 13, 2026
… (#957) * chore(release): v0.56.1 — security patch for #953 One fix: rv32 `(memory 0)` no longer gets a 65532-byte bounds guard. See the CHANGELOG entry for the mechanism; the short version is that `0` was used as both a value and a sentinel, which is the #932 disease from v0.56.0 running the other way. All four surfaces bumped 0.56.0 -> 0.56.1 and verified by the gate #924 shipped: OK: path-dep pins + MODULE.bazel + Cargo.lock + npm/package.json all at 0.56.1 Regenerated, not hand-edited: artifacts/status.json, docs/status/FEATURE_MATRIX.md (`claim_check.py --emit-status`), Cargo.lock (`cargo metadata`). Gates on this branch, each read as a real exit code: cargo test --workspace 2742 passed / 0 failed frozen_codegen_bytes 10/10 bit-identical clippy -D warnings exit 0, 0 diagnostics claim_check 43/43 check_version_pins 0 oracle_wiring_check 0 (--min-emulation-floor 295710) artifact_citation_check 0 model_coverage_audit 0 repo_metadata_check 0 The #953 oracle was re-run ON THIS BRANCH rather than trusted from the lane that wrote it: 9/9, every access to a zero-byte memory traps, matching wasmtime. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YJK5LZZEkV5smCY1jKn18L * plan(v0.57): three issues were invisible to the plan — #935, #936, #944 Board audit found the anti-pattern I wrote INTO this plan two commits ago: "an untriaged issue is invisible to the release plan and resurfaces as a release-time surprise." Three open issues had no artifact, so the v0.57 scope I just landed had a hole in it. ## #935 belongs in Tier 1 — it is the theme almost verbatim `synth verify` reports verified rules and never the ones it applied and DECLINED, so a consumer cannot compute a coverage denominator. Verification summary: 8 verified, 0 failed, 0 unknown reads as complete. The same object contains 29 `i32.const`, which BIN-VERIFY skips as a register operation WITHOUT REPORTING. "8 of 8" is really "8 of 8 computational rules, plus an unreported const rule whose Rocq theorem is Admitted" — which is #933. So the two compound: **#933 is the hole and #935 is what makes it invisible.** Fixing only #933 leaves a consumer unable to see the next one; fixing only #935 honestly reports a gap that is still open. They land together, and #935 is the cheaper half. Precedent that the shape works: #921/#922 turned an opaque `unmodeled-op` into an actionable `{op, offset}`. ## #936 is a small ask with the number already known gale re-ran `--emit-wcet` on a whole `gust:os` composite (31 functions) with 0.55.0: all 9 `unmodeled-op` declines resolve to exactly TWO opcodes — `I64Const` (6) and `I64Str` (3) — plus 11 cascades behind them. Modelling two opcodes moves 20 functions from "no bound" to bounded on a real OS composite. Included BECAUSE the number is known: an optimization with a measured benefit and a constraint it must not violate (the bound stays SOUND — tighter and wrong is a regression). ## #944 is triage-first, deliberately `could` 98 branches on a verified isolation module, 56 no-provenance, 9 only-in-synth (`cabi_realloc`, `tick`, `run_switch`). An object branch with no WASM origin is an obligation nothing can discharge. Scoped `could` because the 9 need CLASSIFYING before any schema change: if they are all compiler-introduced (realloc shims, expansion-internal guards) the right fix is a provenance record kind for compiler-origin branches, not pretending a WASM origin exists. Deciding that is the work. rivet OURS-errors 0; claim_check 43/43; citation check 0. Refs #935, #936, #944 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>
avrabe
added a commit
that referenced
this pull request
Aug 13, 2026
… denominator (#935) (#958) * feat(verify): #935 full rule inventory — applied / verified / declined-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 * proof(#933): close i32_const_correct — normalize I32Const at the WASM 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 * style: cargo fmt on the #935 inventory code 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>
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.
Closes #921. Additive to
synth-wcet-v1;.textunchanged.{"status":"declined","name":"f","reason":"unmodeled-op", "note":"op not classified by the cycle model","op":"I64Ldr","offset":8}Both fields are optional and absent for every other reason, so existing consumers are unaffected.
Two design choices worth flagging
opis derived fromDebug, not a hand-written table. This repo keeps paying for hand-maintained mirrors that drift from what they mirror (thumb-2: i32.shl/shr_s/shr_u don't mask the shift amount mod 32 — amounts >=32 silently compile to 0 (VCR-SEL regression; Rocq ARM model masks like WASM so proof is vacuous) #682, Shelfware oracles: 57/130 differentials are unreferenced, and nothing distinguishes 'manual by design' from 'forgotten' #890). A newArmOpvariant is named correctly here for free, with no second source of truth.offsetcomes from the REAL encoder — the same source of truthWcetLoopBound::head_offsetuses, so a decline site and a loop head cross-reference in one disassembly. It is omitted, never estimated, when a preceding op is one the encoder refuses:estimate_arm_byte_sizeis not exact for every op, and a drifted offset sends the reader to the wrong instruction — worse than sending them nowhere.The doc comment was false
WcetDecline::UnmodeledOpclaimed it was "never emitted in a released build (the classifier is exhaustive with no wildcard)".op_costdoes have no wildcard arm — exhaustive in the compiler's sense — but many arms returnUnmodeleddeliberately: the i64 pseudo-ops and the whole MVE/Helium f32 family. Exhaustive over variants is not costed for every variant, and #921 is that difference showing up on the first real object. Corrected.Measured, not assumed
I nearly shipped "it'll be the i64 family, timestamps are 64-bit" as fact. Testing it:
i64.loadI64Ldri64.addi64.ge_si64.extend_i32_uThe selector expands most i64 ops before the WCET pass sees them. Which op @avrabe's object actually trips is what the new field answers — on their object, not by inference from mine.
What caught the bug in the fix
Threading the site through
function_wcetalone leftopnull in every real sidecar, because the CLI goes through the composer (wcet_compose). Unit tests on the patched path passed throughout. The end-to-end run found it, so the regression test is end-to-end too and red-first verified — reverting the composer patch reproduces the exact JSON from the issue and fails the test.The test also refuses to pass over an empty set: if
I64Ldrever becomes costed, it fails loudly rather than silently asserting nothing.clippy clean, 133 test suites green.