The review of the found-copies work showed pairs that could stick, jobs that
could act on a pair the user had answered otherwise, and detection gaps:
- forgetting a link on an address-keyed server deletes the pair and Candidate
rows of that remote and resets the probe, so the sequence is found again
when it is back; a Linked/Integrated row with no link is asked again
- 404s count only on id-keyed servers, at most once per recheck interval
- probes store the server's newest update time (copy_probes.server_newest,
migration 0012) instead of comparing with this PC's clock; the lookup
sample carries hashed photos by size and capture time too, for servers
that have not hashed their copy
- the older-server gate no longer re-compares unchanged manifests
- a failed Integrate keeps its job id so a retry resumes only an untouched
pair; cancel and stale plans release the pair (ReleaseAsync)
- automatic photo transfers never create or retarget a sequence
- a first upload files photos the server holds elsewhere into the new
sequence
- Unlink re-compares before keeping apart; Trash here names only true last
copies; Drop... trashes one version on both sides after re-checking the
other
- a merge keeping the pair's other sequence swaps the dialog's columns and
re-keys Different choices; Upload all reads every pair
Each fix has a regression test where it makes sense.
Refs #73
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner review 6 asks Chronos to recognise the same time-lapse held under different ids on the
server and on this PC, compare the copies, and keep them apart or integrate and sync them. This
lays the shared foundation the later parcels build on, without any UI or detection yet.
- Migration 0012 adds found_copies (local-server and local-local pairs with evidence, scores,
answer, policy and the 404 record) and copy_probes; every existing link with a local sequence
becomes a Linked pair, so a server deletion and the per-link policy have a place.
- FoundCopyStore keeps the pairs: upserts that never touch the answer, a compare-and-set of the
state with an Integrating backstop (a failed or cancelled job reads as the previous state),
link promotion and demotion, the once-per-refresh 404 count, the merge's links stage
(session keys, links reset, pairs moved, refused when both are linked on one server), the
local overlap queries and the probes. SyncLinkStore.RekeyAsync moves pairs and probes with
the links in the same transaction.
- Contracts for detection, review, plans, the Integrate and MergeSequences jobs (kinds 25/26,
High level, new detail steps) and the Upload all rule that keeps suspected, kept-apart,
deleted, busy and server-born sequences here.
- Wire: POST photos/lookup, uploads into a target (IntoTarget/Copied, trailing and optional),
frames/delete on the client, capabilities photo-lookup and upload-into, cached per remote.
- The trash plans and deletes accept the job that holds the sequence (its own hold is not
Busy) and a frames version checked under the lease; a Background job never interrupts a
running one.
- Settings for linking, the photo policy and projects; the en and it keys of design section 9.
Refs #73
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>