Files
codebase-memory-mcp/tests
Martin Vogel 5eae752f48 test(parallel): record the weak-member trade for the LSP-ambiguity probe
parallel_lsp_index_exact_ambiguity_does_not_fall_through_to_legacy
asserted alpha_edges == 1, which the Python weak-member guard suppresses.

That assertion is a side effect, not the test's subject. Its subject —
that an ambiguous exact LSP match must not fall through to the
lower-ranked legacy semantic row — is unchanged: beta_edges == 0,
legacy_edges == 0, and all four probe assertions (ambiguity.injected,
legacy_injected, carrier_allows_fallback, shared_matcher_failed_closed)
still hold. Verified before changing the number, not after.

The harness deliberately injects an ambiguous exact match and forces the
shared matcher to fail closed, so value.render() drops past the LSP into
the registry with three same-named candidates (Alpha/Beta/Legacy.render)
and bound by suffix_match -- measured: strategy=suffix_match, cands=3,
conf=0.5500. That is a 1-in-3 guess that happened to land on Alpha:
exactly the weak member-call class this change suppresses, and the same
accepted trade recorded on python/S6 in test_lsp_resolution_probe.c.

Not over-suppression: sibling tests in this suite index the same
value.render() source and resolve it via lsp_method (cands=1,
conf=0.9000), a strategy the guard keeps -- they still assert 1. Only the
sabotaged-LSP path degrades to a weak textual guess. Flips back to 1 once
py_lsp_cross resolves the receiver on this path.

Refs #1276
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-08-29 14:02:27 +02:00
..
2026-06-28 13:05:05 +02:00