Add automatic dedup suffix stripping to enhance syncback functionality

- Introduced a new plan to automatically strip `~N` dedup suffixes from filenames during forward sync, eliminating the need for redundant `.meta.json5` files.
- Implemented the `strip_dedup_suffix()` utility in `dedup_suffix.rs` to handle suffix removal.
- Updated `file_name_for_path()` and `get_dir_middleware()` to utilize the new stripping functionality.
- Modified syncback logic to skip writing meta `name` fields for dedup-only cases, ensuring cleaner instance naming.
- Enhanced existing tests and added new tests to cover the updated dedup behavior, ensuring robustness and correctness.

These changes aim to streamline the handling of deduplicated instances, improving overall system efficiency and clarity in naming conventions.
This commit is contained in:
Joe 2026-02-19 01:15:28 -06:00
parent 17d52e3edf
commit 7d0232c430
19 changed files with 269 additions and 84 deletions

View file

@ -0,0 +1,6 @@
{
"name": "dedup_suffix_auto_strip",
"tree": {
"$path": "src"
}
}

View file

@ -0,0 +1 @@
return "not a dedup suffix"

View file

@ -0,0 +1 @@
return "first"

View file

@ -0,0 +1 @@
return "second"