A moved file or directory keeps its shape judgments and snippet locations #213

Merged
bvandeusen merged 2 commits from dev into main 2026-10-22 15:29:37 -04:00
Owner

Adds move_path(project_id, from_path, to_path).

Shape-ledger rows and snippet locations are both keyed by path. When a directory moves in the tree, two things go wrong at the next coverage sync:

  • every judged row is marked vanished, and the same shapes are listed again under the new path, unjudged;
  • every snippet recorded under the old path reads missing.

move_path re-keys the rows. Each one keeps its judgment, uses edges and history, and gains a moved event. It also re-paths the project's snippet locations through update_snippet.

If the sync has already put an unjudged row at the target path, the moved row replaces it. A judged row at the target stands, and the source row is reported in kept.

CI is green on 979efe6 (run 9685). The plugin is minted at 2026.10.22.1907 for the shape-accounting skill note.

🤖 Generated with Claude Code

Adds `move_path(project_id, from_path, to_path)`. Shape-ledger rows and snippet locations are both keyed by path. When a directory moves in the tree, two things go wrong at the next coverage sync: - every judged row is marked vanished, and the same shapes are listed again under the new path, unjudged; - every snippet recorded under the old path reads `missing`. `move_path` re-keys the rows. Each one keeps its judgment, uses edges and history, and gains a `moved` event. It also re-paths the project's snippet locations through `update_snippet`. If the sync has already put an unjudged row at the target path, the moved row replaces it. A judged row at the target stands, and the source row is reported in `kept`. CI is green on 979efe6 (run 9685). The plugin is minted at 2026.10.22.1907 for the shape-accounting skill note. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 2 commits 2026-10-22 15:29:33 -04:00
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
47b52197aa
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>
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
979efe6662
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>
bvandeusen merged commit 9a1513070d into main 2026-10-22 15:29:37 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledGrimoire#213