diff --git a/tests/test_services_plugin_context.py b/tests/test_services_plugin_context.py index e45c98e..7c96f96 100644 --- a/tests/test_services_plugin_context.py +++ b/tests/test_services_plugin_context.py @@ -104,9 +104,12 @@ async def test_build_autoinject_hint_titles_only_with_margin_gate(): assert "#33" not in out["context"] # Title-first: no body text, ever. assert "get_note(id)" in out["context"] - # Telemetry fired with the auto_inject source and the full candidate set. - rec.assert_called_once() - assert rec.call_args.kwargs["source"] == "auto_inject" + # Telemetry fired for BOTH retrievals this path runs: the scored menu and + # the reuse-slot query competing against it. The slot's query used to be + # the one unlogged retrieval on this path — the hit it displaced was in + # retrieval_logs, the query that displaced it was not (#2463). + sources = [c.kwargs["source"] for c in rec.call_args_list] + assert sources == ["auto_inject", "reuse_slot"] @pytest.mark.asyncio