test(8249): signature and source-text batch, the hook tests run the hook
- The caller-scoping property now covers services/family, family_adoption and platforms, with the seven reads that need no caller named and why. The hand-written platform list goes. - The snippet location keys: one test checks every door (service, MCP tool, web route) takes them; the route-only copy goes. - The write-path hook: the payload-shape and skip-list tests searched the shell script for strings. They now run the hook against a local listener and check what it sends: the code from each of the four payload field names, and nothing for a note, JSON or SVG while a YAML file and a .py are still asked about. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,19 +73,6 @@ def test_project_scoping_reaches_every_caller():
|
||||
assert "project_id" in inspect.getsource(routes.list_snippets_route)
|
||||
|
||||
|
||||
def test_location_lookup_reaches_every_caller():
|
||||
"""The reverse lookup — "what already lives here?" — has to be askable from
|
||||
both surfaces, or an agent and a human get different answers about the same
|
||||
file."""
|
||||
from grimoire.mcp.tools import snippets as tools
|
||||
from grimoire.routes import snippets as routes
|
||||
from grimoire.services import snippets as svc
|
||||
for key in ("repo", "path", "symbol"):
|
||||
assert key in inspect.signature(svc.list_snippets).parameters
|
||||
assert key in inspect.signature(tools.list_snippets).parameters
|
||||
assert f'request.args.get("{key}"' in inspect.getsource(routes)
|
||||
|
||||
|
||||
def test_update_field_map_matches_service_kwargs():
|
||||
"""Every field the PATCH route forwards must be a real update_snippet kwarg
|
||||
(interface-contract parity)."""
|
||||
|
||||
Reference in New Issue
Block a user