fix(7832): the edit search tests state notes-by-default, and the plugin version is minted for the static context change
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Python tests (push) Successful in 2m10s
CI & Build / integration (push) Successful in 2m21s
CI & Build / Build & push image (push) Successful in 33s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:21:06 -05:00
co-authored by Claude Opus 5.5
parent 4c69f9c163
commit 7c6b3fbc04
3 changed files with 14 additions and 17 deletions
+8 -9
View File
@@ -462,11 +462,12 @@ async def test_a_process_counts_as_reuse_too():
# --- write-path prior art beyond snippets ------------------------------------
@pytest.mark.asyncio
async def test_write_path_semantic_arm_asks_for_experience_not_just_snippets():
"""The inverse of auto-inject's mistake. This arm was snippets-only, so an
issue saying "we tried this and it deadlocked" could never reach the moment
that code was about to be written — arguably the better prior art, because
it says what NOT to do."""
async def test_write_path_search_by_resemblance_asks_its_own_row_for_notes():
"""The search by resemblance on an edit reads its own row of the
record-kinds table (`work.change.similar`), notes by default. A snippet
reaches an edit through the file it is recorded at, and an issue saying
"we tried this and it deadlocked" through the file or area it names (the
`work.change` row), so neither is offered by resemblance by default."""
from grimoire.services import plugin_context as pc
hits = [(0.72, fake_note(id=9, title="debounce helper", user_id=1, note_type="snippet")),
@@ -487,10 +488,8 @@ async def test_write_path_semantic_arm_asks_for_experience_not_just_snippets():
)
kw = search.await_args.kwargs
# 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["record_kinds"] == ["note", "snippet", "task:issue"]
# Telemetry must not claim this was a notes-only retrieval any more.
assert kw["record_kinds"] == ["note"]
# The call row is not a tasks-only or notes-only retrieval by is_task.
assert rec.call_args.kwargs["is_task"] is None