mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-09 19:31:57 +02:00
#619 got here first and got more of it right. Two things adopted from it, and one backed out. **Adopted, and this one is a bug fix.** The pair editor generates an `id` for every header and parameter row the first time it touches a request, and that write reaches the database like any other. Stripping only the top-level `id` left those in, so merely opening a request minted a version whose diff was nothing but ids. `strip_ids` drops every `id` at every depth. The regression test fails without it. **Adopted.** Hashes carry a `v1:` prefix, so a hash written by an algorithm a build doesn't understand is recognizable as unreadable rather than silently read as "different". And `sorted_keys` + `to_string` replaces the hand-rolled canonical writer — same guarantee, less code, and byte-identical to the implementation that is landing. **Backed out.** `comparable()` in import.rs goes back to its own copy. #619 rewrites that function and most of the file around it, including dropping `sortPriority` from the comparison, so pointing it at the shared module now would collide in the hottest region of that branch to save six lines. This module is shaped to be what #619 calls when it lands, and says so; the convergence is one deletion away rather than a reconciliation. That leaves `folderId` as the only real disagreement between the two callers, which PLACEMENT_KEYS now documents as such: import counts a move between folders as a change, versioning must not.