feat(6243): a directory moved in the tree keeps its shape judgments
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Failing after 15s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / integration (push) Successful in 1m15s
CI & Build / Python tests (push) Successful in 2m9s
CI & Build / Build & push image (push) Successful in 30s

Ledger rows are keyed by path, so after a directory moves the next sync
marks every judged row vanished and lists the same shapes again, unjudged.
move_shapes(project_id, from_path, to_path) re-keys the rows under one path
to the other, in every repo of the project, keeping each row's judgment,
uses edges and history and adding a `moved` event that records the path it
left. A row already at the target is replaced when nobody judged it; a
judged one stands, and the old row is reported in `kept`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 15:03:03 -04:00
co-authored by Claude Opus 5.5
parent 5ad1df8e0f
commit 47b52197aa
8 changed files with 259 additions and 9 deletions
+8
View File
@@ -383,6 +383,14 @@ 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():
"""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")
assert {"from_path", "to_path"} <= set(tool.parameters.get("properties", {}))
assert "move_shapes" in _WRITE_TOOLS
def test_coverage_routes_are_registered():
from grimoire.app import create_app