From 1363936ed78bb9578ee4ef3bf3b151e21f20ccc9 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 24 Nov 2026 14:32:28 -0500 Subject: [PATCH] test(7833): the write path is pinned to the kinds its door considers, not the retired fixed lists Co-Authored-By: Claude Opus 5.5 --- tests/test_lesson_surfacing.py | 6 +++--- tests/test_services_plugin_context.py | 3 +-- tests/test_write_path_trigger.py | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/test_lesson_surfacing.py b/tests/test_lesson_surfacing.py index e093a4cd..45984bac 100644 --- a/tests/test_lesson_surfacing.py +++ b/tests/test_lesson_surfacing.py @@ -101,10 +101,10 @@ async def test_the_write_path_asks_for_lessons_at_all(): await pc.build_write_path_hint(1, "src/ui/Badge.vue", code="x" * 400) kw = search.await_args.kwargs - assert LESSON_NOTE_TYPE in kw["note_type"] - # The kinds it already carried must survive the addition — a tuple rewritten + assert LESSON_NOTE_TYPE in kw["record_kinds"] + # The kinds it already carried must survive the addition — a set rewritten # rather than extended would trade one unreachable kind for another. - assert {"snippet", "note"} <= set(kw["note_type"]) + assert {"snippet", "note"} <= set(kw["record_kinds"]) assert kw["include_global_kinds"] is True diff --git a/tests/test_services_plugin_context.py b/tests/test_services_plugin_context.py index 0d617a34..b97a615f 100644 --- a/tests/test_services_plugin_context.py +++ b/tests/test_services_plugin_context.py @@ -483,10 +483,9 @@ async def test_write_path_semantic_arm_asks_for_experience_not_just_snippets(): ) kw = search.await_args.kwargs - assert kw["note_type"] == ("snippet", "note", LESSON_NOTE_TYPE) # An open to-do resembling the code answers nothing; an ISSUE carries a root # cause and a NOTE carries durable knowledge. Only the todo is excluded. - assert kw["task_kind"] == "issue" + assert kw["record_kinds"] == ["lesson", "note", "snippet", "task:issue"] # Telemetry must not claim this was a notes-only retrieval any more. assert rec.call_args.kwargs["is_task"] is None diff --git a/tests/test_write_path_trigger.py b/tests/test_write_path_trigger.py index 93967598..fde01472 100644 --- a/tests/test_write_path_trigger.py +++ b/tests/test_write_path_trigger.py @@ -255,8 +255,7 @@ async def test_semantic_arm_is_snippet_only_and_browse_scoped(): # code shape. What # stays out is the open to-do list, which resembles the code and answers # nothing. - assert kwargs["note_type"] == ("snippet", "note", "lesson") - assert kwargs["task_kind"] == "issue" + assert kwargs["record_kinds"] == ["lesson", "note", "snippet", "task:issue"] # Nobody asked for this, so it must not reach a one-to-one direct share. assert kwargs["scope"] == "browse"