Files
Chronos/tests/Chronos.Data.Tests
Alby96andClaude Opus 5.5 56b8ba3c1d fix(projects): never undo a deletion by a record rebuild; keep outside project.json edits
Phase 5a fix round 4, projects engine.

- The reconcile reads the projects' trash before the live folders, so a
  deletion wins over what a sync tool has left of the live folder. A lost
  record is never written again while the trash holds a folder of that
  project; a trashed record that cannot be read holds the project back.
- A lost record is written again from the index only once the folder has
  looked the same, file by file, on two reconciles two minutes apart, so a
  record a sync tool is still bringing (a rename, a newer head) wins.
- IndexAsync's "behind" is the rule the heal uses: the record's head must
  be a version the index holds below its head. A record on another chain
  keeps its name.
- A record written before what the index knows (its Updated time is
  older, e.g. a backup made before a rename) never gives its name, and the
  heal writes the index's name back. A record's Updated time never goes
  back, so a newer rename from a PC whose clock is behind is still taken.
- A mirror never writes project.json over settings written there since
  this index last knew what it held (another PC, an older client): they
  are merged first (theirs win where both changed) or kept as an external
  version, then the result is mirrored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 13:58:13 +01:00
..