feat(6243): move_path carries a moved path's snippets with its shapes
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 17s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m9s
CI & Build / Python tests (push) Successful in 2m12s
CI & Build / Build & push image (push) Successful in 31s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 17s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m9s
CI & Build / Python tests (push) Successful in 2m12s
CI & Build / Build & push image (push) Successful in 31s
Snippet locations are keyed by path too, so a snippet recorded under a moved directory reads `missing` at its next check. The tool is now move_path(project_id, from_path, to_path). It moves the ledger rows as before, and re-paths the project's snippet locations under from_path through update_snippet, so each body and its indexed mirror stay one record. A snippet the caller can only read is listed in snippets_read_only. The tool refuses only when nothing at all is recorded under from_path. The path test is the one snippets already uses (_path_touches), and the plugin version is minted for the skill edit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -383,12 +383,12 @@ def test_bind_repo_tool_can_move_a_renamed_repo():
|
||||
assert "moved_from" in tool.parameters.get("properties", {})
|
||||
|
||||
|
||||
def test_move_shapes_is_mounted_as_a_write_tool():
|
||||
def test_move_path_is_mounted_as_a_write_tool():
|
||||
"""A directory moved in the tree carries its judgments to the new path."""
|
||||
from grimoire.mcp.server import _WRITE_TOOLS, build_mcp_server
|
||||
tool = build_mcp_server()._tool_manager.get_tool("move_shapes")
|
||||
tool = build_mcp_server()._tool_manager.get_tool("move_path")
|
||||
assert {"from_path", "to_path"} <= set(tool.parameters.get("properties", {}))
|
||||
assert "move_shapes" in _WRITE_TOOLS
|
||||
assert "move_path" in _WRITE_TOOLS
|
||||
|
||||
|
||||
def test_coverage_routes_are_registered():
|
||||
|
||||
Reference in New Issue
Block a user