A local sequence and its server twin can now be integrated into one linked
pair by a resumable job instead of by hand. The planner runs the dry run of
design 5c: photo steps per policy (the wins policies decide only the Different
class; Only here and Only there always move), left out and AutoPhotos, last
copies, the one portable payload, projects copied across under free names,
space, rights and every block, and a fingerprint the job checks again.
The Integrate job keeps an atomic journal and resumes at each stage: link,
photos both ways through filtered transfers that never create or retarget a
server sequence (a 404 marks the pair remote gone), trash only once the winner
is present (locally through the photo trash inside the job, on the server at
the version its dry run read), the agreed details, then projects through
ProjectTransplant. Refusals are kept and reported; a failure or a cancel sets
the pair back to Linked or its previous state.
Linked uploads now file into their target when the server announces
upload-into. The plan context travels with the job so rights and names give
the same plan on the job side.
Refs #73
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refresh no longer links copies by content behind the user's back. After the
gate is released, CopyFinder looks for copies whose ids differ: the server's
photo lookup (or 1.1's gate and the hints on an older server), session keys,
and an exact comparison by manifest, bounded per refresh and remembered in
copy_probes so nothing is compared twice while neither side moves. What a pair
becomes is the Link matches setting's call: asked by default, linked by itself
only as the setting allows, through a compare-and-set that a Keep apart wins.
Local detection finds copies inside this PC's archives and never links them.
SyncService gives every link its pair, adds Unlink (kept apart, observation
kept), marks pairs whose server sequence answers 404 (once per refresh, twice
reads deleted, never on an address key or in a 404 sweep), keeps deletion
counts current at each comparison, writes an Integrate's agreed details to both
sides by content (ApplyAgreedAsync) and queues uploads at a given priority.
CopyReviewBuilder assembles what the Compare dialog shows.
Refs #73
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Detection, Integrate and Merge need one comparison of two copies of a time-lapse, so
this adds it: CopyComparer classifies every photo (same, converted, same unhashed,
deleted here/there, differs, two versions, only here/there) with strict Differs and
Versions rules so whole-second capture times and bursts never pair, unusable frames
held as nothing and marked for repair, and the score of design 3.2.
CopyRules ports 1.1's same-originals gate exactly for "Link when half shared" and
holds the Decide table, ask-again thresholds, fingerprints, hints and the probe
sample. CopyPayload compares details in portable form (same photo at another index is
no line) and merges the chosen sides into one payload that must parse as a project.
CopySides reads both sides from the index and a server and answers the last-copy
check across every archive. SyncTombstones gains FromDtos for local pairs.
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>