req(T2): state what object-code verification actually achieves — and what it needs - #260
Merged
Conversation
…what it needs REQ-OS-OBJVERIFY-001 claimed "the compiler is removed from the isolation trust argument BY CONSTRUCTION". Working the track showed that is not what the construction delivers, and the requirement now says what it does. PRECONDITION (new). The requirement presumed an object a per-rule-obligation compiler had produced. There is none: partition_switch / mpu_switch / health_monitor are compiled natively by LLVM and never enter the dissolve path. Moving them IS the requirement, and the text now records why that is tractable rather than a rewrite -- all three are already thin-seam shaped, ~1790 lines of scalar logic over FOUR native atoms (ctx_save, region_swap, ctx_resume, mpu_write), no asm, no volatile, no raw pointers. Read out of the source, not assumed. THE OBLIGATION (sharpened). "Zero coverage gap" had no denominator. It is now the UNION of RULE-VERIFY and BIN-VERIFY: a rule BIN-VERIFY declines as non-computational counts as covered only if its RULE-VERIFY theorem is discharged. WHAT IT ACHIEVES (rewritten). rustc lowers Rust to wasm THROUGH LLVM, so dissolving does not remove LLVM -- it moves it. My first draft framed the residue as trusted LLVM. That was the wrong frame: LLVM is an UNTRUSTED PRODUCER whose output is verified rather than believed. The wasm carries MC/DC (witness), sound abstract interpretation (scry) and the executable oracles, then reaches machine code through a translation-validated compiler. Qualification of LLVM is therefore not required -- the classical alternative to qualifying a tool is verifying its OUTPUT, which is what is claimed. Stated so an assessor asking "what compiles the Rust to wasm?" meets an answer rather than a hole. EVIDENCE-ON-WASM (new). That argument holds only while the evidence is gathered, and today it is not -- witness has never been pointed at this OS. So the obligations are named and gated: witness MC/DC with zero unresolved gap rows, scry verdicts + gap report, and the SWITCH/ISO/HM oracles RE-RUN against the wasm build. The last clause is load-bearing: MC/DC and abstract interpretation establish properties OF THE WASM and do not by themselves show it refines the Verus-proven Rust -- a miscompile could yield wasm that is well-covered and sound-by-AI yet semantically different. KNOWN OPEN GAP (new). i32_const_correct is Admitted in synth's Rocq development -- false as stated for un-normalized operands, though the supporting arithmetic is Qed. BIN-VERIFY declines i32.const as a register operation, so neither half covers it. 473 occurrences across 34 of 67 functions on the E2 composite. Filed synth#933. Zero-gap cannot be claimed while it stands, and the requirement now says so where a release gate will see it. VER-OS-OBJVERIFY-001 kill-criterion gains the case that was missing: if the object is NOT synth-lowered the obligation is INAPPLICABLE, not satisfied -- otherwise "no mismatches reported" reads as passing when the pass cannot run at all. rivet validate: PASS, 333 warnings, unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
avrabe
added a commit
that referenced
this pull request
Aug 8, 2026
… the verified path (#261) REQ-OS-OBJVERIFY-001 needs the isolation core lowered by a compiler that carries per-rule obligations. health_monitor.rs is the cheapest possible first step: ZERO hardware seams, pure scalar predicates. If it could not dissolve, nothing in the isolation core could. It dissolves. Bodies lifted VERBATIM from the Verus/Kani-verified plain/src: health_monitor.rs -> wasm 2401 B -> component 3956 B -> cortex-m3 object text 1054 data 0 bss 0 undefined: none Zero SRAM, and correctly NO undefined symbols: unlike the fused OS composite -- where an empty undefined set means the seam was swallowed -- hm-thin genuinely has no seam. BIN-VERIFY runs on it: 6 functions, 8 rules verified, 0 failed, 0 unknown. AND IT IS NOT A ZERO-GAP RESULT, THOUGH THE SUMMARY LOOKS LIKE ONE. The object contains 29 i32.const. BIN-VERIFY classes Const as a register operation and skips it SILENTLY -- not in the verified list, not in a declined list, because there is no declined list. Its Rocq theorem i32_const_correct is Admitted (false as stated for un-normalized operands; the supporting arithmetic is Qed). So neither half covers it, 29 times over. i32.and / i32.eqz / i32.sub verified + Qed covered by both i32.gt_s / i32.le_s / i32.le_u verified, no theorem covered by BIN-VERIFY only i32.const x29 SKIPPED + Admitted COVERED BY NEITHER Filed: synth#933 (the proof gap) and synth#935 (that the gap is invisible in the tool's own output -- a consumer cannot compute a denominator from `synth verify`). This is the union-denominator clause from #260 earning its place on the first object it was applied to. My first read of that summary was "zero declined, clean". The clause is what made me check the module, and the module had 29 of them. Written the old way, this commit would have recorded a false zero-gap claim. NOT established, stated in RESULTS.md rather than left to be assumed: the evidence-on-wasm set (witness MC/DC, scry, the REQ-OS-HM-001 oracles re-run against the WASM build) has not been produced for this artifact, so BIN-VERIFY shows the lowering is faithful but not that the wasm refines the proven Rust; nothing has executed the object; the switch (3 seams) and mpu_switch (1 seam) remain; and 7 exported predicates became 6 functions, presumed inlining, unconfirmed. Claude-Session: https://claude.ai/code/session_011QG86sovTbfnPNY9SfhSmo 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.
REQ-OS-OBJVERIFY-001claimed "the compiler is removed from the isolation trust argument BY CONSTRUCTION." Working the track showed that isn't what the construction delivers. The requirement now says what it does.① Precondition — the object doesn't exist yet
The requirement presumed an object produced by a per-rule-obligation compiler. There is none:
partition_switch/mpu_switch/health_monitorare compiled natively by LLVM and never enter the dissolve path. Moving them is the requirement.The text records why that's tractable rather than a rewrite — all three are already thin-seam shaped: ~1 790 lines of scalar logic over four native atoms (
ctx_save,region_swap,ctx_resume,mpu_write), no inline asm, no volatile, no raw pointers. Read out of the source, not assumed.② The obligation — "zero gap" had no denominator
Now defined as the union of RULE-VERIFY and BIN-VERIFY: a rule BIN-VERIFY declines as non-computational counts as covered only if its RULE-VERIFY theorem is discharged.
③ What it achieves — rewritten, and this is the substantive change
rustclowers Rust to wasm through LLVM, so dissolving doesn't remove LLVM — it moves it.My first draft framed the residue as trusted LLVM. That was the wrong frame. LLVM is an untrusted producer whose output is verified rather than believed: the wasm carries MC/DC (witness), sound abstract interpretation (scry) and the executable oracles, then reaches machine code through a translation-validated compiler.
Qualification of LLVM is therefore not required — the classical alternative to qualifying a tool is verifying its output, which is what's claimed. Written so an assessor asking "what compiles the Rust to wasm?" meets an answer rather than a hole.
⑤ Evidence-on-wasm — the argument's price
③ holds only while the evidence is gathered, and today it isn't — witness has never been pointed at this OS (v0.6.0's notes say so). So the obligations are named and gated: witness MC/DC with zero unresolved gap rows, scry verdicts + gap report, and the SWITCH / ISO / HM oracles re-run against the wasm build.
That last clause is load-bearing. MC/DC and abstract interpretation establish properties of the wasm — they don't by themselves show it refines the Verus-proven Rust. A miscompile could yield wasm that is well-covered and sound-by-AI yet semantically different from the proven source.
④ Known open gap
i32_const_correctis Admitted in synth's Rocq development — false as stated for un-normalized operands, though the supporting arithmetic (i32_const_large_reconstruct,movw_movt_reconstruct_Z) is Qed. BIN-VERIFY declinesi32.constas a register operation, so neither half covers it. 473 occurrences across 34 of 67 functions on the E2 composite. Filed synth#933.Zero-gap cannot be claimed while it stands, and the requirement now says so where a release gate will see it.
Kill-criterion
Gains the case that was missing: if the object is not synth-lowered the obligation is INAPPLICABLE, not satisfied — otherwise "no mismatches reported" reads as passing when the pass cannot run at all.
Evidence behind this
Built synth from source with
--features verify(no release binary ships it) and ran BIN-VERIFY on the E2 dissolved OS: 23/23 functions, 24 rules verified, 0 failed, 0 unknown, 20 LRAT-certified I64 expansions, zero problems. The machinery works; the gap is one named rule.rivet validate: PASS, 333 warnings, unchanged.