diff --git a/tests/test_write_path_trigger.py b/tests/test_write_path_trigger.py index 6a4575f..7fd3bcd 100644 --- a/tests/test_write_path_trigger.py +++ b/tests/test_write_path_trigger.py @@ -345,7 +345,12 @@ async def test_session_dedup_marks_the_reuse_arms_rather_than_silencing_them(): assert "seen" in next( line for line in out["context"].splitlines() if "#12" in line ) - assert 12 not in (search.await_args.kwargs.get("exclude_ids") or set()) + # #12 IS in this call's `exclude_ids`, and that is the other rule working: + # the place arm has just listed it, so the semantic arm must not list it + # again. What must never reach the query is the LEDGER, which is asserted + # on its own in tests/test_ledger_references_not_silence.py against a + # record this call has not otherwise rendered. + assert 12 in search.await_args.kwargs["exclude_ids"] # --- attribution + telemetry ------------------------------------------------- @@ -1313,9 +1318,14 @@ async def test_a_pulled_snippet_already_seen_is_evidence_not_menu(): assert 7 not in kw["exclude_ids"] assert kw["limit"] == 3 # ...and the menu carries it, marked. - assert out["note_ids"] == [7, 8] seven = next(line for line in out["context"].splitlines() if "#7" in line) assert "seen" in seven + # #8 (0.80) now falls OUTSIDE the margin band, because #7 (0.91) anchors it + # at 0.81 instead of being filtered out first. That is the point rather than + # a casualty: the band measures distance from the best answer, and the best + # answer here is #7 — suppressing it used to promote a materially weaker hit + # into a slot it had not earned, with nothing in the output saying so. + assert out["note_ids"] == [7] # The stamp saw the pull and the resemblance score for this payload. skw = stamp.call_args.kwargs assert skw["pulled"] == {7: skw["pulled"][7]}