Skip to content

fix(safety): correct LS-M-5 status to fixed (already mitigated by reject)#199

Merged
avrabe merged 1 commit into
mainfrom
fix/ls-m-5-status-correction
May 28, 2026
Merged

fix(safety): correct LS-M-5 status to fixed (already mitigated by reject)#199
avrabe merged 1 commit into
mainfrom
fix/ls-m-5-status-correction

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 28, 2026

Summary

Clean-room verification of the backlog item "LS-M-5 multiply-instantiated module support (priority: critical)" found the critical silent-corruption hazard was already closed — meld rejects multiply-instantiated modules at fusion time:

  • `Merger::check_no_duplicate_instantiations` (merger.rs) returns `Error::DuplicateModuleInstantiation` the moment a `module_idx` reappears; invoked unconditionally at the top of the merge pipeline (~merger.rs:909) before any index-space merging.
  • The resolver has an independent guard (~resolver.rs:2222).

So the corrupt-output path [H-1, H-2, H-3] is unreachable — a multiply-instantiated module produces a loud build error, never a mis-merged module. The loss-scenario entry still read `status: open` — stale bookkeeping.

Changes

  • Add `ls_m_5_multiply_instantiated_module_rejected` — gate-convention regression test pinning the reject behavior (the pre-existing `test_duplicate_module_instantiation_rejected` predates the `ls_*` convention)
  • Flip LS-M-5 to `status: fixed` with a `fix:` block documenting the detection-and-reject mitigation

Important scoping note

This documents the rejection mitigation. Full per-instance index-space support (fusing a module instantiated twice into two independent function/memory/table spaces) remains a backlog forward feature — a large merger refactor, not required to close the safety hazard since rejection already prevents the unsafe output.

No functional code change; the detection shipped in earlier releases. This PR is safety-case accuracy + a gate-tracked regression test. Rides into the next feature release rather than a standalone tag.

Test plan

  • `ls_m_5_multiply_instantiated_module_rejected` passes
  • Pre-commit hooks pass
  • CI green + LS-N verification gate now finds `ls_m_5_*` for the (newly) `fixed` entry

🤖 Generated with Claude Code

…ect)

Clean-room verification of the v0.16.0 "LS-M-5 multiply-instantiated
module support (priority: critical)" backlog item found the critical
silent-corruption hazard was ALREADY closed: meld rejects
multiply-instantiated modules at fusion time.

`Merger::check_no_duplicate_instantiations` (merger.rs) walks every
component's instances and returns
`Error::DuplicateModuleInstantiation` the moment a module_idx
reappears; it is invoked unconditionally at the top of the merge
pipeline (~merger.rs:909) before any index-space merging. The
resolver has an independent guard (~resolver.rs:2222). So the
corrupt-output path [H-1,H-2,H-3] is unreachable — a multiply-
instantiated module produces a loud build error, never a mis-merged
module.

The loss-scenario entry still read `status: open` — stale
bookkeeping, not an open hazard. This:

  - adds `ls_m_5_multiply_instantiated_module_rejected` (gate-
    convention regression test pinning the reject behavior)
  - flips LS-M-5 to `status: fixed` with a fix block documenting
    the detection-and-reject mitigation

NOTE: this is the *rejection* mitigation. Full per-instance index-
space *support* (so a shared utility module instantiated twice
fuses correctly) remains a forward feature on the backlog — a large
merger refactor, NOT required to close the safety hazard.

No functional code change; detection already shipped in earlier
releases. Rides into the next feature release rather than a
standalone tag.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Mythos delta-pass required

This PR modifies one or more Tier-5 source files (per
scripts/mythos/rank.md):

meld-core/src/merger.rs

Before merge, run the Mythos discover protocol on the
modified Tier-5 files:

  1. Follow scripts/mythos/discover.md
    — one fresh agent session per touched Tier-5 file.
  2. For each finding, the agent must produce both a Kani
    harness and a failing PoC test (per the protocol's
    "if you cannot produce both, do not report" rule).
  3. Attach a comment on this PR with either the findings
    (formatted per discover.md's output schema) or
    NO FINDINGS.
  4. Add the mythos-pass-done label to this PR.

Why this gate exists: LS-A-10
(CABI alignment padding in async-lift retptr writeback) was
found by the v0.8.0 pre-release Mythos pass — but it had
lived in the callback emitter since #128, across six
releases. A PR-time gate would have caught it at review
time instead of at the release boundary.

The gate check on this PR will pass once the label is
applied.

@github-actions
Copy link
Copy Markdown

LS-N verification gate

⚠️ 35/37 verified — 2 missing regression tests

count
Passed (≥1 test, all green) 35
Failed (≥1 test failure) 0
Missing (no ls_*_NN_* test found) 2

Approved loss-scenarios.yaml entries are expected to have a
regression test named ls_<letter>_<num>_* (e.g. LS-A-11
ls_a_11_*). The gate runs each prefix via cargo test --lib --no-fail-fast and aggregates pass/fail/missing.

Failed LS entries

(none)

Missing regression tests
  • LS-R-13
  • LS-M-6

Updated automatically by tools/post_verification_comment.py.
Source of truth: safety/stpa/loss-scenarios.yaml.

@github-actions
Copy link
Copy Markdown

Mythos delta-pass (auto)

NO FINDINGS across 1 Tier-5 file(s)

File Verdict Hypothesis
`` ✅ NO FINDINGS

Auto-run via anthropics/claude-code-action@v1
(SHA-pinned) on the touched Tier-5 files, using the
maintainer's Max-plan OAuth token. See
.github/workflows/mythos-auto.yml and
scripts/mythos/discover.md.

@github-actions github-actions Bot added the mythos-pass-done Mythos delta-pass completed on Tier-5 file changes; findings (or NO FINDINGS) attached to PR label May 28, 2026
@avrabe avrabe merged commit 2137398 into main May 28, 2026
12 of 14 checks passed
@avrabe avrabe deleted the fix/ls-m-5-status-correction branch May 28, 2026 06:12
@avrabe avrabe mentioned this pull request May 28, 2026
4 tasks
avrabe added a commit that referenced this pull request May 28, 2026
DWARF Phase 2 increment 1 (#143, #200): component-provenance section
v2 with per-function code-byte ranges — the anchor for DWARF address
remapping. Plus the LS-M-5 status correction (#199, already-mitigated
multiply-instantiated-module hazard).

Increments 2 (rewriter instruction-offset map) and 3 (gimli DWARF
rewrite) follow in later releases.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mythos-pass-done Mythos delta-pass completed on Tier-5 file changes; findings (or NO FINDINGS) attached to PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant