fix(364): gate multiply-instantiated support to verified MultiMemory + fix SR-31 traceability#366
Open
avrabe wants to merge 1 commit into
Open
fix(364): gate multiply-instantiated support to verified MultiMemory + fix SR-31 traceability#366avrabe wants to merge 1 commit into
avrabe wants to merge 1 commit into
Conversation
… fix SR-31 traceability avrabe (#364) correctly caught that SR-31 "multiply-instantiated detection" is marked verified via an ISOLATED reject test (ls_m_5) while #362 wired the normalization unconditionally into fuse_with_stats — so the reject is dead code on the live path and the shipped behavior (accept) is the OPPOSITE of the certified property. The inc-3 execution oracle only covered MultiMemory; under SharedMemory the instances share one linear memory and independence is unverified (my probe: the 2nd instance collapses to a single `bump` export). Fix (avrabe's option b, honestly): - lib.rs: gate `expand_multiply_instantiated_modules` to explicit MultiMemory — the only strategy the execution oracle proves keeps per-instance state independent. Under SharedMemory (unverified) and Auto (implicit, ADR-4) the normalization is skipped and the DuplicateModuleInstantiation reject fires. So shipped behavior == verified behavior. - multiply_instantiated_runtime.rs: `shared_memory_and_auto_reject_multiply_ instantiated` proves the reject fires on the LIVE fuse path under both. - Traceability repointed to the live-path evidence (not the isolated reject): docs/verification-matrix.md SR-31 row, sw-verifications.yaml SWV-31, safety-requirements.yaml SR-31 verification-description + SR-55 scope note. The MultiMemory support (SR-55) is unchanged and still execution-verified (independent globals + memory + data segments). Per-instance import wiring stays noted as un-execution-tested (import-free fixtures). Full meld-core suite green (0 failures); fmt + clippy clean; rivet validate PASS. Refs #364, #362, SR-31, SR-55 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LS-N verification gate✅ 59/59 approved LS entries verified
Approved Failed LS entries(none) Missing regression tests(none) Updated automatically by |
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.
Fixes #364 — SR-31 "multiply-instantiated detection" was marked
verifiedvia an isolated reject test while #362 wired the normalization
unconditionally, making the reject dead code on the live path and the shipped
behavior (accept) the opposite of the certified property. Thanks @avrabe for the
sharp catch.
Root cause (confirmed)
expand_multiply_instantiated_moduleswas wired unconditionally intofuse_with_stats, soDuplicateModuleInstantiationnever fires on the live(instantiate $m)path, whilels_m_5_multiply_instantiated_module_rejectedverifies it in isolation. The inc-3 execution oracle only covered MultiMemory
(independent memories); under SharedMemory the instances share one linear
memory and independence is unverified (reproduced: the 2nd instance collapses to
a single
bumpexport, notbump+bump$0).Fix (avrabe's option b, honestly)
lib.rs— gate the normalization to explicit MultiMemory, the onlystrategy the execution oracle proves keeps per-instance state independent.
Under SharedMemory (unverified) and Auto (implicit, ADR-4) the
normalization is skipped → the
DuplicateModuleInstantiationreject fires. Soshipped behavior == verified behavior.
multiply_instantiated_runtime.rs—shared_memory_and_auto_reject_multiply_instantiatedproves the reject fireson the live fuse path under both strategies.
docs/verification-matrix.mdSR-31 row,sw-verifications.yamlSWV-31,safety-requirements.yamlSR-31 verification-description + SR-55 scope note.MultiMemory support (SR-55) is unchanged and still execution-verified (independent
globals + memory + data segments). Per-instance import wiring stays noted as
un-execution-tested (import-free fixtures).
Verification
Full
meld-coresuite green (0 failures); fmt + clippy clean;rivet validatePASS.
Closes #364.