Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ All notable changes to this project will be documented in this file.

### Fixed

- **LS-CP-4 regression coverage + LS-N gate integration-test scan**
(`tools/run_ls_verification.py`,
`meld-core/tests/dwarf_strip.rs`). The LS-N verification gate was
previously invoking `cargo test --lib`, which filtered out
integration tests under `<package>/tests/`. Three pre-existing
tests in `dwarf_strip.rs` (`default_strips_dwarf`,
`passthrough_preserves_dwarf`, `default_is_strip`) already pin
LS-CP-4 ("DWARF passthrough emits address-incorrect debug info on
fused output") via Phase 1.5's Strip-default policy, but the gate
reported the entry as missing because the test names didn't match
the `ls_cp_4_*` convention AND the integration-test binary
wasn't being scanned. Adds three convention aliases delegating to
the existing test bodies, and drops `--lib` from the gate runner
so both lib and integration tests participate. Gate verdict moves
from 16/19 verified to **17/19 verified**; remaining
missing-bucket entries are LS-A-8 and LS-A-9 (both need
net-new tests, not aliases).

- **LS-A-19 regression coverage** (`meld-core/src/merger.rs`). PR #156
fixed the `imp.name.ends_with(rn)` suffix-collision bug
(`float` / `bigfloat` cross-resource confusion) but landed without
Expand Down
27 changes: 27 additions & 0 deletions meld-core/tests/dwarf_strip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,30 @@ fn default_is_strip() {
let cfg = FuserConfig::default();
assert_eq!(cfg.dwarf_handling, DwarfHandling::Strip);
}

// LS-N verification gate convention aliases. These delegate to the
// existing tests above; their purpose is the discoverable
// `ls_cp_4_*` name that `tools/run_ls_verification.py` matches
// against. The original tests stay in place as the canonical bodies
// (preserves git blame + grep continuity).
//
// LS-CP-4 ("DWARF passthrough emits address-incorrect debug info on
// fused output") is the loss scenario the Strip-default policy
// directly mitigates — Phase 1.5 made Strip the default so the
// broken passthrough is no longer the silent fallback. These tests
// pin that policy.

#[test]
fn ls_cp_4_default_strips_dwarf() {
default_strips_dwarf();
}

#[test]
fn ls_cp_4_passthrough_preserves_dwarf_explicitly() {
passthrough_preserves_dwarf();
}

#[test]
fn ls_cp_4_default_is_strip() {
default_is_strip();
}
14 changes: 11 additions & 3 deletions tools/run_ls_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,33 @@ def load_approved_ids(yaml_path: Path) -> list[str]:


def run_prefix(package: str, prefix: str) -> tuple[int, int, int]:
"""Return (matched, passed, failed) for `cargo test --lib <prefix>`.
"""Return (matched, passed, failed) for `cargo test <prefix>`.

`matched` = total selected tests (passed + failed + ignored). When
cargo finds no matching tests, it reports `0 passed; 0 failed; 0
ignored` and still exits 0; the caller treats matched=0 as missing.

Drops the `--lib` filter so integration tests under
`<package>/tests/` are also scanned. Several LS-N scenarios pin
their regression coverage in integration tests (e.g. LS-CP-4 in
`dwarf_strip.rs`); excluding them caused the gate to misreport
those entries as missing.
"""
cmd = [
"cargo",
"test",
"-p",
package,
"--lib",
"--no-fail-fast",
"--",
"--exact" if False else "--test-threads=1",
"--test-threads=1",
prefix,
]
proc = subprocess.run(cmd, capture_output=True, text=True)
passed = failed = ignored = 0
# cargo emits one `test result:` line per target (lib + each
# integration test binary), so we sum across all of them. A
# prefix that matches in *any* target counts as "matched".
for line in proc.stdout.splitlines():
m = _TEST_LINE.match(line)
if m:
Expand Down
Loading