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
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "grimoire", "name": "grimoire",
"description": "Grimoire for Claude Code: connects the grimoire MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Grimoire skills (using-grimoire, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting, family-canon), and syncs your saved Grimoire Processes as skills (/grimoire:sync).", "description": "Grimoire for Claude Code: connects the grimoire MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Grimoire skills (using-grimoire, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting, family-canon), and syncs your saved Grimoire Processes as skills (/grimoire:sync).",
"version": "2026.11.25.0016", "version": "2026.11.25.1721",
"author": { "author": {
"name": "Bryan Van Deusen" "name": "Bryan Van Deusen"
}, },
+8 -9
View File
@@ -462,11 +462,12 @@ async def test_a_process_counts_as_reuse_too():
# --- write-path prior art beyond snippets ------------------------------------ # --- write-path prior art beyond snippets ------------------------------------
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_write_path_semantic_arm_asks_for_experience_not_just_snippets(): async def test_write_path_search_by_resemblance_asks_its_own_row_for_notes():
"""The inverse of auto-inject's mistake. This arm was snippets-only, so an """The search by resemblance on an edit reads its own row of the
issue saying "we tried this and it deadlocked" could never reach the moment record-kinds table (`work.change.similar`), notes by default. A snippet
that code was about to be written — arguably the better prior art, because reaches an edit through the file it is recorded at, and an issue saying
it says what NOT to do.""" "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 from grimoire.services import plugin_context as pc
hits = [(0.72, fake_note(id=9, title="debounce helper", user_id=1, note_type="snippet")), 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 kw = search.await_args.kwargs
# An open to-do resembling the code answers nothing; an ISSUE carries a root assert kw["record_kinds"] == ["note"]
# cause and a NOTE carries durable knowledge. Only the todo is excluded. # The call row is not a tasks-only or notes-only retrieval by is_task.
assert kw["record_kinds"] == ["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 assert rec.call_args.kwargs["is_task"] is None
+5 -7
View File
@@ -247,7 +247,7 @@ async def test_a_failing_location_lookup_does_not_sink_the_hint():
# --- arm 2: by meaning, under the milestone-93 gates ------------------------- # --- arm 2: by meaning, under the milestone-93 gates -------------------------
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_semantic_arm_is_snippet_only_and_browse_scoped(): async def test_semantic_arm_offers_notes_by_default_and_is_browse_scoped():
from grimoire.services import plugin_context as pc from grimoire.services import plugin_context as pc
search = AsyncMock(return_value=[]) search = AsyncMock(return_value=[])
with patch.object(pc, "get_writepath_config", AsyncMock(return_value=_cfg())), \ with patch.object(pc, "get_writepath_config", AsyncMock(return_value=_cfg())), \
@@ -256,12 +256,10 @@ async def test_semantic_arm_is_snippet_only_and_browse_scoped():
patch.object(pc, "record_retrieval", MagicMock()): patch.object(pc, "record_retrieval", MagicMock()):
await pc.build_write_path_hint(1, "src/x.py", code=REAL_CODE) await pc.build_write_path_hint(1, "src/x.py", code=REAL_CODE)
kwargs = search.await_args.kwargs kwargs = search.await_args.kwargs
# Prior art is snippets AND recorded experience — an issue saying "we tried # By resemblance an edit is offered notes; snippets and issues reach it
# this and it broke" belongs here — AND lessons, which are often about a # through where they are recorded (the `work.change` row), lessons
# code shape. What # through their situation, and the open to-do list not at all.
# stays out is the open to-do list, which resembles the code and answers assert kwargs["record_kinds"] == ["note"]
# nothing.
assert kwargs["record_kinds"] == ["note", "snippet", "task:issue"]
# Nobody asked for this, so it must not reach a one-to-one direct share. # Nobody asked for this, so it must not reach a one-to-one direct share.
assert kwargs["scope"] == "browse" assert kwargs["scope"] == "browse"