From ad4bd101db1a08ac150e5fbf9d6e98168619f293 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 21 Sep 2026 22:44:01 -0400 Subject: [PATCH] fix(tests): the stale-premise guard keys on the retired conclusion, not the quoted premise (#4134) Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01821k5B3Ysecp9fNYs92Kuy --- tests/test_rule_overlap_gate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_rule_overlap_gate.py b/tests/test_rule_overlap_gate.py index e563660..5ca8ffc 100644 --- a/tests/test_rule_overlap_gate.py +++ b/tests/test_rule_overlap_gate.py @@ -268,6 +268,9 @@ def test_every_rule_create_door_asks(): def test_the_stale_premise_is_gone(): """find_duplicate_rule claimed rules were not a semantic-retrieval surface — false since rules were embedded, and the reason this gap survived.""" - doc = inspect.getdoc(dedup.find_duplicate_rule) or "" - assert "aren't a semantic-retrieval" not in doc + # Flattened: the docstring is hard-wrapped, and the claim straddled a + # line. Keyed on the CONCLUSION it drew, not the premise — the corrected + # docstring quotes the premise in order to retire it. + doc = " ".join((inspect.getdoc(dedup.find_duplicate_rule) or "").split()) + assert "the right (and only) signal" not in doc assert "find_overlapping_rules" in doc