fix(copies): close the ninth verification round of owner review 6

- A merge leaves each second version out of Main as it files it (Copy
  stage keep-both and SameUnhashed versions, Verify stage versions), so a
  merge abandoned before its Details stage (details changed meanwhile, a
  stale stage, a cancel) no longer leaves both versions in Main for good,
  which a new plan could not undo (owner Q3).
- A merge plan whose kept sequence has tombstones hashes the other's
  unhashed frames matched by size and time, so content the kept sequence
  deleted is listed as a last copy; a verify that still finds such content
  drops the journal and fails as a stale plan instead of failing on every
  retry.
- Download originals uses a key of the job only when the holder of the
  server sequence's key is kept apart from it or linked elsewhere: a link
  a 404 forgot (pair Candidate) refills and re-links the local copy
  instead of duplicating every photo into a new sequence.
- A 404 for a server sequence no local copy is linked to deletes its
  Candidate and Kept apart pairs, so Upload all local sends the local
  sequence again instead of skipping the only copy as a suspected one
  (owner Q8).

Refs #73

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-18 12:21:57 +01:00
1 parent aad8ae46dd
commit c1c02d8ef7
10 files changed
+286 -16

No files matched your search

+8
View File
@@ -223,6 +223,14 @@ match. A 1.1 server works as before, without Integrate; a 1.2 server adds the ph
- Download originals of a server sequence unlinked or kept apart from its earlier download makes a new local
sequence instead of filling the old one again, re-linking it and overwriting its details.
- An upload retried after its pair was kept apart makes a new server sequence instead of linking the old one again.
- A second version a Union merge copies in is left out of Main at once, so a merge that stops before its details
(an edit meanwhile, a cancel) no longer leaves both versions in Main for good.
- A merge whose other sequence is not hashed lists as a last copy a photo matched by size and time whose content the
kept sequence deleted, instead of failing its verify on every retry.
- Download originals of a server sequence whose link a 404 forgot fills and links its own local copy again instead
of duplicating every photo into a new local sequence.
- A match whose server sequence was deleted, with no local copy linked to it, goes: *Upload all local* sends the
local sequence again and the Library stops reading it as a copy found.
## [1.1.1] — 2026-11-16
+4
View File
@@ -1019,3 +1019,7 @@ One line per decision: date · decision · alternative · reason.
| 2026-11-18 | The Integrate journal keeps the losers the plan listed as last copies (`LastHere`, `LastThere`); before each trash step a loser not listed must still be held by another usable copy (the local copy's other frames, another sequence of this index, the server sequence's fresh manifest; for a server loser its other frames or any sequence of this index), else the journal goes and the job fails as a stale plan (#73) | Keep the loser and end Linked | As the merge's Replace stage: nothing goes to a trash as a last copy without being shown |
| 2026-11-18 | Download originals of a server sequence without a local copy goes under a key of the job (`chronos-sync:<remote:N>:<job:N>`, the same on a retry) when the sequence holding the server sequence's own key has a pair or a link for that server (kept apart, unlinked, asked again, linked elsewhere): a new local sequence, and its details are taken only by it; a holder with neither (a run that stopped before linking) is joined as before (#73) | Refuse the download and ask for Link or Ask again | The download twin of the round-7 upload rule: the shared key filed the photos back into the sequence the user kept separate, re-linked it and overwrote its details |
| 2026-11-18 | An upload never links again from its checkpoint a server sequence whose pair with the local sequence is Kept apart (unlinked or kept apart since the attempt that made it): the upload goes on as one without a target, under the job's key (#73) | Make Unlink and Keep apart cancel a pending upload | The checkpoint branch never reached the session-key rule, and a retry or a restart moved the Kept apart pair back to Linked |
| 2026-11-18 | A merge leaves each second version out of Main as it files it (the Copy stage's keep-both and SameUnhashed versions, the Verify stage's), under the kept sequence's lease at the settings version read just before, not cancellable halfway; when that was the plan's version the journal's `KeepSettingsVersion` moves to the one written, so the Details stage still writes the plan's payload (#73) | Have the re-plan exclude a shared version the kept sequence already holds twice | Only the merge knows which version it brought; the re-plan cannot tell it from two versions the user chose to keep in Main |
| 2026-11-18 | A merge plan whose kept sequence has tombstones also hashes in memory the other's unhashed frames matched by size and time (every frame of that size and instant); a verify that finds unhashed content the kept sequence deleted, held nowhere and not listed, drops the journal and fails as a stale plan (#73) | Hash them always | Only a tombstone makes such a frame a last copy nothing lists; the rest the verify files as a second version, and an adopted folder is not hashed twice for nothing |
| 2026-11-18 | Supersedes the 2026-11-18 download-key row: Download originals goes under a key of the job only when the holder of the server sequence's own key is Kept apart from that server sequence (kept apart or unlinked) or linked to another sequence of that server; a Candidate, Linked or Integrated pair, a pair with another server sequence, or a link a 404 forgot keeps the own key, so the download refills and links its own local copy (#73) | Any pair or link for that server | A link a 404 forgot left a Candidate pair, and the download duplicated every photo into a new local sequence |
| 2026-11-18 | A 404 for a server sequence no local copy is linked to (an observation-only link) deletes the Candidate and Kept apart pairs naming it (`FoundCopyStore.SettleUnlinkedGoneAsync`); Linked, Integrated and Integrating pairs are left to their link's 404 (#73) | Count the hit on those pairs (read as deleted on the server) | Neither is a copy of anything the server still has: Upload all local must send the local sequence, and a server sequence listed again is found anew |