diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-06 11:34:24 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-06 11:34:24 -0500 |
| commit | ef33eefa4cc45f2d80d7ffe27080bf766e9fa999 (patch) | |
| tree | 76b1a969de7a0a8f04c99f93e8a96b9b1389acb9 /tests/test-duet-backend.el | |
| parent | be0feb2b0d0070f23bc9cd348c877aa3ad6c8b7b (diff) | |
| download | duet-ef33eefa4cc45f2d80d7ffe27080bf766e9fa999.tar.gz duet-ef33eefa4cc45f2d80d7ffe27080bf766e9fa999.zip | |
feat: add the pure data-safety planner
Phase 3 shipped conflict and move sequencing but skipped the data-safety checks the design spec makes the pure planner's job. This adds them: same-file rejection, dir-into-itself rejection, trailing-slash destination resolution, special-file rejection, symlink surfacing, case-insensitive collision detection, and path-length and reserved-name checks.
Every check is pure. The filesystem facts each one needs (a path's lstat type, the names already at a destination, whether that filesystem folds case, its path-length limit, its reserved names) are injected, so the planner decides before a byte moves and the tests never touch a real file. Each problem is a plist with a class, a severity, the file, and a message. An error severity blocks a transfer, and a warning surfaces a decision, which is how a symlink is carried as follow-versus-preserve rather than silently chosen.
duet--plan-move-safe composes the checks with the move planner: a source carrying a blocking error is skipped with no copy and no delete, a safe source gets a copy and a delete gated on its copy success, and no delete is ever ungated. Coverage on duet.el rises to 92.3%.
Diffstat (limited to 'tests/test-duet-backend.el')
0 files changed, 0 insertions, 0 deletions
