feat(copies): matches between this PC and the server, Integrate and merge (owner review 6, v1.2.0) (#74)
CI / Build and test (push) Successful in 13m44s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 16s
Release / Build, test and publish (push) Successful in 26m34s
CI / PostgreSQL 16 integration (push) Failing after 17m36s
CI / PostgreSQL 17 integration (push) Failing after 15m36s
CI / Docker image (push) Successful in 1m12s
Release / Server image (push) Failing after 15s
CI / Build and test (push) Successful in 13m44s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 16s
Release / Build, test and publish (push) Successful in 26m34s
CI / PostgreSQL 16 integration (push) Failing after 17m36s
CI / PostgreSQL 17 integration (push) Failing after 15m36s
CI / Docker image (push) Successful in 1m12s
Release / Server image (push) Failing after 15s
The same time-lapse on a server and on this PC under different ids, or twice on this PC, is recognised, compared and settled as the owner asked in owner review 6. Matches are found after each sync refresh, through the server's new photo lookup, and after the jobs that change photos. The default is to ask every time. Server › Matches offers: - Keep apart, which is remembered; - Link only and Unlink; - the Compare dialog: photos, details line by line, projects and the plan. Integrate completes both sides. Photos default to Union, projects are copied across, and a losing version goes to the trash only after a hash check. Afterwards new photos move by themselves, and deletions wait for the user. A merge of two local sequences verifies every photo before the other sequence goes to its archive's trash. Upload all local skips suspected matches and flags them. Migration 0012 adds the found_copies and copy_probes tables. Jobs 25 (Integrate) and 26 (MergeSequences) are new, and so are the server capabilities photo-lookup and upload-into. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #74.
This commit is contained in:
1 parent
43719bb5c5
commit
f33bcac32e
586 files changed
+41546
-280
No files matched your search
+264
-9
@@ -394,7 +394,11 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st
|
||||
sent home with their project and version; workspace-move, stored as 23, the workspace
|
||||
folder moved with its projects; all three run by the desktop only: amended 2026-10-26, R8;
|
||||
video-copy, stored as 24, renders copied hash-verified into a videos folder, desktop and
|
||||
server: amended 2026-11-05, owner review 1 R3/R8/R9), target ids, state (queued, running, paused, done, failed, cancelled),
|
||||
server: amended 2026-11-05, owner review 1 R3/R8/R9; integrate, stored as 25, a local
|
||||
sequence and its server match completed both ways by a confirmed plan, then linked;
|
||||
merge-sequences, stored as 26, two sequences of this PC merged into the kept one, the other
|
||||
into its archive's trash once every photo is verified; both run by the desktop only:
|
||||
amended 2026-11-16, owner review 6 R3), target ids, state (queued, running, paused, done, failed, cancelled),
|
||||
progress (done/total, fps, eta; and a detail: step, current item, item x of y, part n of m
|
||||
with its unit, stored as `jobs.progress_detail`, migration 0011, so a paused or failed job
|
||||
keeps where it stopped: amended 2026-11-15, owner review 5 R2), log tail, created by, node
|
||||
@@ -413,6 +417,16 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st
|
||||
R7), reason (deleted, replaced), removed at. Written from the sidecar's `removed` list (§7)
|
||||
at every index sync, so a rebuild keeps it, leaving out content a frame of the sequence
|
||||
holds again; it goes with its sequence row and outlives the trash entry.
|
||||
- **FoundCopy** (client; amended 2026-11-16, owner review 6 R1) — a *match*: two sequences
|
||||
Chronos believes hold one time-lapse, a local sequence and a sequence of one server, or two
|
||||
sequences of this index; kind, evidence (link, session key, hashes, size and time), scores
|
||||
(shared, only here, only there, deleted here, deleted there, containment, overlap, hints),
|
||||
state (candidate, kept apart, linked, integrating, integrated), the fingerprint of what was
|
||||
answered, the integrating job, the photo policy, whether new photos move by themselves, and
|
||||
the 404 record of the server sequence. **CopyProbe** — what detection last compared for a
|
||||
local sequence and a server (frames version, hashed count, the server's newest update time
|
||||
it saw), per sequence and scope (a server, or this PC). Both go with their sequence rows;
|
||||
detection finds a pair again.
|
||||
- **MediaCard** (client) — id, volume serial, filesystem label, capacity, nickname, camera
|
||||
identity (Make/Model/BodySerial from first file), profile JSON, first/last seen, import
|
||||
history (job ids).
|
||||
@@ -436,7 +450,10 @@ Main, both on live rows only, `project_versions(project_id, number)` (migration
|
||||
`renders.project_id` and `renders.project_version_id`; amended 2026-10-26, R8),
|
||||
`renders(created)` and `render_copies(render_id)` (migration 0010, with `renders.sha256`,
|
||||
`renders.kind` and the table `render_copies`, no backfill; amended 2026-11-05, owner review 1
|
||||
R3/R8/R9).
|
||||
R3/R8/R9), `found_copies(local_id, server, remote_id)` and `found_copies(local_id, other_id)`
|
||||
(unique per kind), `found_copies(server, remote_id)`, `(other_id)` and `(state)`, and
|
||||
`copy_probes(sequence_id, scope)` (the key; migration 0012; amended 2026-11-16, owner review 6
|
||||
R1).
|
||||
Paging everywhere (keyset pagination on `(first_capture, id)`).
|
||||
|
||||
---
|
||||
@@ -484,6 +501,12 @@ cache part runs. Nothing is deleted. A toast reports *Folders sorted* (with *Ope
|
||||
(a Guid v7 made at first start) in its database, so a restore keeps it and a fresh database
|
||||
makes a new one.
|
||||
|
||||
Matches (amended 2026-11-16, owner review 6 R1): migration 0012 (SQLite and PostgreSQL) adds
|
||||
`found_copies` and `copy_probes` (§5) and turns every existing link that has a local sequence
|
||||
into a linked pair, so a later server deletion and the pair's photo policy have a row. A
|
||||
re-key of a server's links (owner review 5 R3) moves its pairs and probes in the same
|
||||
transaction.
|
||||
|
||||
- Binding: `Chronos.Core.Windows/Sqlite/WinSqlite3.cs` P/Invoke to `winsqlite3.dll`
|
||||
(`sqlite3_open_v2`, `prepare_v2`, `step`, `reset`, `finalize`, `bind_*`, `column_*`,
|
||||
`exec`, `errmsg`, `last_insert_rowid`, `changes`, `busy_timeout`, `libversion`,
|
||||
@@ -1300,6 +1323,21 @@ player smoke test on Windows CI.
|
||||
sequence opened last on this PC, else *Open in workspace* asks which. A server-only
|
||||
sequence opens the same way, as a project whose home is the server, when the server keeps
|
||||
projects and the account may edit; otherwise it opens with proxies (§14.5).
|
||||
- Matches (amended 2026-11-16, owner review 6 R1/R6): a local sequence in a match that needs
|
||||
attention carries a Warning status, *Also elsewhere* (its tooltip names the server and the
|
||||
share of photos shared, or the other archive) or *Deleted there* (the match deleted photos
|
||||
this one still holds), on its card and in the list. *Compare…* in the card's context menu and
|
||||
the list row opens Server › Matches searched by the sequence's title. The statuses survive a
|
||||
refresh of the Library. Amended 2026-11-17 (owner Q3 "default unione": a differing photo
|
||||
kept in both versions stays listed so the user can drop one): a local sequence's card and
|
||||
row menu offer *Two versions…*, the photos it keeps in two versions (two usable hashed
|
||||
frames of one capture instant with different SHA-256, e.g. left by a Union merge whose pair
|
||||
is gone; an empty list says so), each version with *Drop…*: a dry run that says why it
|
||||
cannot go (archive offline or read-only, a job on the sequence, the frames changed) instead
|
||||
of asking, a confirmation naming the version that goes and the one that stays, then the
|
||||
archive trash, only while the other version is still there, usable and verified by
|
||||
content. A merge job's *Open* shows the list when the kept sequence has any. A server
|
||||
sequence's card in a match offers *Compare…* alone.
|
||||
|
||||
### 12.3 Edit (amended 2026-10-16, R7; formerly "Sequence editor"; amended 2026-10-26, R8; amended 2026-11-04, owner review 1 R5/R6)
|
||||
|
||||
@@ -1331,7 +1369,12 @@ player smoke test on Windows CI.
|
||||
state chip read from its home after the list shows) above *Library*; the search filters
|
||||
both, and Enter opens a library match, a project only when no sequence matches. A
|
||||
Workspace row's context menu and the Delete key offer *Remove local copy*, also for a copy
|
||||
that cannot open.
|
||||
that cannot open. Amended 2026-11-16, owner review 6 R5: a Workspace row whose time-lapse
|
||||
(a linked or integrated match) also has a workspace project at the other home shows a muted
|
||||
*Twin* chip right after the project name, its tooltip naming the other home (the server by
|
||||
name, its Main in the UI language) and project. Only a sibling makes a twin (amended
|
||||
2026-11-17): the other home holds a project of the same name, or of the name *Copy across*
|
||||
gave it (`<name> (<PC>)`, `<name> (<server>)`), either way round, ignoring case.
|
||||
- The steps form a guided path, freely navigable: **Analysis** (every finding of the
|
||||
analyses with the step that deals with it; light, flicker, exposure steps received,
|
||||
shake and flagged frames; Analyse), **Frames** (virtualized table: index, time,
|
||||
@@ -1688,6 +1731,39 @@ is a Job (resumable, cancellable, logged). Recurring scans, integrity checks, th
|
||||
proxies, analyses, maintenance, backups, clean-ups and reports are schedules in Jobs ›
|
||||
Scheduled (§12.6, §14.6); the buttons here run them once (amended 2026-10-26, R10).
|
||||
|
||||
Merge sequences (amended 2026-11-16, owner review 6 R3/R4). Merging is built as the merge of
|
||||
a local match (§12.7 Matches): two sequences of this index that hold one time-lapse, in this
|
||||
PC's archive, an adopted folder or a server's originals archive. Split is not built. The
|
||||
merge dialog is the Compare dialog with *Kept* and *Other* in place of this PC and the server:
|
||||
the user chooses the kept sequence (preselected only when exactly one of the two is linked
|
||||
and lies in a server's originals archive), the photo policy for differing photos (*Kept one
|
||||
wins* or *Other one wins* besides Union and Choose each; photos only in the other always
|
||||
come), each differing detail, and sees the plan: photos into the kept one, versions kept or
|
||||
replaced, last copies first, renders moved, projects copied across (always, under free
|
||||
names), session keys and links moved, the other to the trash. Under *Choose each* a differing
|
||||
photo is *Keep both*, *Kept* or *Other*, each chosen (no *Leave*: the other goes to the trash;
|
||||
amended 2026-11-17). The plan is blocked while
|
||||
either sequence is busy, offline, moved, linked to the same server as the other, holds
|
||||
workspace work not sent home, has a detail or a differing photo not chosen, holds a damaged
|
||||
photo nothing else holds, holds photos in the other's folder the index has not read (copied
|
||||
in by hand, or filed by another index; checked again before the links move and at the trash),
|
||||
or the space is short (512 MiB kept free). *Merge* asks to type the other's photo
|
||||
count (digits without separators, the prompt naming the number), then the `merge-sequences`
|
||||
job copies and files the other's photos (hash-checked, tombstones honoured), moves the
|
||||
renders, re-hashes every original of the other against the kept one, sends the losing
|
||||
versions to the photo trash, writes the details, copies the projects (one the kept sequence
|
||||
already holds a copy of, by name and history content, is not copied again and its renders
|
||||
name that copy), runs its trash checks, moves keys and links, and moves the other into its
|
||||
archive's trash only at the frames version it verified. Its journal resumes each stage after
|
||||
a crash; a retry whose pair was answered meanwhile, or whose other sequence changed (work
|
||||
sent to it since the plan, photos a third sequence no longer holds), drops the journal and
|
||||
plans again instead; a resumed merge verifies a photo flagged damaged since its first verify
|
||||
before anything goes to the trash. A merge abandoned after the
|
||||
links moved gives the other sequence back its links, session keys and pairs (amended
|
||||
2026-11-17). The dialog's photos read *Kept* and *Other* from its first plan; once a
|
||||
sequence is kept, its one-sided classes are named by role (*Only in kept*, *Deleted in
|
||||
other*), and *To trash…* on *Deleted in other* trashes from the kept sequence.
|
||||
|
||||
Maintenance › *Trash…* (amended 2026-10-26, R6) lists the archive's trash (§7), newest
|
||||
first: deleted sequences and photos deleted from sequences, each with its kind, photos,
|
||||
size, folder and when it went, and *Restore*. A sequence goes back as its folder is (into
|
||||
@@ -1913,7 +1989,9 @@ disabled after the other actions, and its tooltip says the server needs an updat
|
||||
while Windows reports the connection as metered, every transfer with a server pauses after
|
||||
its current chunk or file and resumes by itself afterwards: uploads, the sync's downloads,
|
||||
the workspace's copies from a server and its renders sent to one. Copies from and sends to
|
||||
this PC's archive never wait.
|
||||
this PC's archive never wait. Only the transfers it paused resume, after a restart too (it
|
||||
keeps their ids in the index); a transfer the user pauses or resumes meanwhile is the user's
|
||||
(amended 2026-11-17, owner review 6).
|
||||
|
||||
Server jobs (amended 2026-11-15, owner review 5 R2): while connected, a panel between the
|
||||
connection panel and the sync table lists the server's running and paused jobs (not the
|
||||
@@ -1950,6 +2028,105 @@ keeps sending originals to this PC's archive; a sequence with a local copy keeps
|
||||
originals into that copy's archive; copies already downloaded stay where they are. The
|
||||
originals archives are scanned after each finished scheduled scan of this PC's archive.
|
||||
|
||||
Matches (amended 2026-11-16, owner review 6 R1–R4, R6, R7). One time-lapse may be on a server
|
||||
and on this PC under different ids, or twice on this PC. Chronos finds these *matches* and
|
||||
lets the user choose what to do with each:
|
||||
- Detection. Server matches are looked for after each sync refresh, outside the sync's
|
||||
gate: this PC's unlinked sequences whose photos changed since they were last probed, or
|
||||
that a newer server sequence may match, send up to 64 sampled photos each (by SHA-256,
|
||||
conversions followed, and by size and capture time) to `POST /api/v1/photos/lookup`; hits
|
||||
are compared exactly by manifest (the frames list too when a side has unhashed photos), at
|
||||
most 50 per refresh. An older server without `photo-lookup` is compared by 1.1's rule, the
|
||||
hints (capture range, camera, interval, title words) and session keys, at most 20 per
|
||||
refresh, and offers no Integrate. Local matches (two sequences of this index sharing
|
||||
photos, a session key, or a link to the same server sequence) are looked for 30 s after the
|
||||
index opens and 10 s after a Scan, Rebuild, Verify, Import, Download, Convert, merge,
|
||||
Integrate or Empty trash ends. A folder of sequences kept elsewhere is added with *Adopt
|
||||
folder…* and compared like any archive; there are no watched folders. *Find matches*
|
||||
probes everything again. Detection removes only unanswered pairs: an answer given while it
|
||||
runs stays.
|
||||
- *Link matches* (Settings › Server, §12.8) decides what a server match becomes: *Ask
|
||||
always* (default) lists it; *When identical* links it when both sides hold exactly the same
|
||||
photos by SHA-256; *Half shared* keeps 1.1's rule (the same first second and camera, half
|
||||
the photos shared). A local match is always asked. New matches raise a toast "{n} matches
|
||||
found" · *Review*; links made by themselves "{n} sequences linked" · *Show*.
|
||||
- Server › *Matches* (a chip after Conflicts, shown while signed in or while the index has
|
||||
more than one archive) lists the pairs, attention first: Sequence, This side, Other side,
|
||||
State (*match found*, *kept apart*, *linked*, *integrating · x of y*, *merging*,
|
||||
*integrated*, *deleted there · n*, *deleted on server*, *kept here*) and the actions of the
|
||||
state: *Compare…*, *Integrate…* (*Merge…* for a local pair), *Keep apart*, *Ask again*,
|
||||
*Unlink*, *Review*, *Keep here*, *Upload again*, *To trash…*. A disabled action says why.
|
||||
A row shows three buttons at most (a linked pair with photos deleted there: *Compare…*,
|
||||
*Unlink*, *Review*); a long archive or server name is cut in its middle, whole in the
|
||||
tooltip (amended 2026-11-17). *Unlink* and *Keep apart* act on the local sequence the row
|
||||
names and leave alone a link that joins another sequence since; *Link only* waits while an
|
||||
integration of either side runs, and an integration never undoes a link given to another
|
||||
sequence since. *Keep apart* and *Unlink* toast with *Undo*; *Keep apart* is remembered and asked again
|
||||
only when the match becomes identical or its shared photos grow by the larger of 10 and a
|
||||
quarter of those shared when it was answered. The rail badge counts conflicts and matches that need attention. In the sync table
|
||||
a sequence in an unanswered match reads *match found* with *Compare…* first, and a linked
|
||||
one offers *Compare…* last.
|
||||
- The Compare dialog (in the section, Esc closes it) has four parts. *Photos*: the photo
|
||||
choice for this run and a class table (same, same unverified, only here, only there,
|
||||
different, converted, deleted here, deleted there, two versions) with counts and sizes per
|
||||
side; a class lists its photos, with *Bring* for photos on one side under *Choose each*
|
||||
(nothing preselected), *Keep both / This PC's / Server's / Leave* for different ones
|
||||
(a merge: *Keep both / Kept / Other*, its one-sided classes named by role, *Only in kept*),
|
||||
*Drop…* for two versions (the version Main uses reads *In Main*; dropping it lets Main use
|
||||
the one that stays, with its hero and keyframes; amended 2026-11-17), *To trash…* for photos deleted there and *Delete on server…* for
|
||||
photos deleted here (the owner of the server sequence or an admin, with Delete). *Details*:
|
||||
one row per title, tags, rating, notes and setting, each side's value and a choice *This
|
||||
PC | Server* with nothing preselected (each segment's tooltip says which value it takes),
|
||||
*All this PC* / *All server* above. *Projects*:
|
||||
*Copy across | Leave them* and each side's projects with where each goes. *Plan*: what each
|
||||
side receives, sends, keeps in two versions, sends to the trash (last copies first), the
|
||||
details changed, projects copied, free space and quota left, whether new photos will move
|
||||
by themselves, and each block with its reason and, where one exists, the action that
|
||||
clears it; *Link only* (a server match not linked yet) links without moving anything.
|
||||
*Apply* plans again first when the shown plan is pending or was made for other choices.
|
||||
- *Integrate* (local and server; R3, owner Q2 "Completa entrambe") is blocked while a detail
|
||||
has no choice (the dialog then opens on Details), either side is busy or gone, the server
|
||||
lacks `upload-into` or the account may not add photos to its sequence (it neither owns it
|
||||
nor may edit), or space is short. A plan that replaces photos asks first (*Replace
|
||||
photos?*, the losing versions listed under the side that loses them). The `integrate` job
|
||||
links the two, moves the photos each side lacks both ways (never creating or retargeting a
|
||||
server sequence), sends a losing version to the trash only after the winner is confirmed by
|
||||
hash on that side (on the server through a dry run, then at the frames version it read),
|
||||
writes the agreed details to both sides as one change, and copies the projects (§14.5). Its
|
||||
journal resumes each stage; a retry after the user answered the pair otherwise refuses.
|
||||
Amended 2026-11-17: who may trash a server sequence's photos is decided per sequence, as
|
||||
the server's `frames/delete` allows it: the account that owns that sequence or an admin,
|
||||
each with Delete (the job carries the planning account, so it plans as the dialog did).
|
||||
For anyone else the server's losing version stays and is kept out of the server's Main,
|
||||
which uses this PC's version; the plan lists it as needing the Delete right instead of
|
||||
blocking. A server title, tags, rating or notes change made while the job runs stops its
|
||||
Details stage on a line where the user kept this PC's value (nothing is overwritten on
|
||||
either side); a change on a line the plan did not have, or where the user took the
|
||||
server's value, is taken in. The job checks at its Link, Trash and Details stages that the
|
||||
link still joins its two sides.
|
||||
- After an Integrate that left nothing out, the pair is *integrated*: its new photos move by
|
||||
themselves both ways (§14.5); three failures in a row raise "{title}: photos not sent" ·
|
||||
*Show* and the row reads *not sent* with the reason. An Integrate that left photos out
|
||||
keeps manual transfers and says so.
|
||||
- Deleted there: photos the other side deleted that this side still holds read *deleted
|
||||
there · n* with *Review* (the dialog on that class) and go to this PC's trash only through
|
||||
*To trash…*, after a dry run and a confirmation naming last copies, and only while the other
|
||||
side still has them deleted; a photo that became a last copy since the plan stops it as
|
||||
stale (amended 2026-11-17).
|
||||
- Deleted on server: a linked server sequence that answers 404 is marked once per refresh
|
||||
(only on a server known by its id, at most once every 10 minutes, never in a sweep where 5
|
||||
or more links answer 404 and none answers); a second 404 at least 10 minutes later makes
|
||||
the row read *deleted on server*, with *Keep here* (then *kept here*, *Upload again*
|
||||
only), *Upload again* (a new server sequence) and *To trash…* (the Library's delete, last
|
||||
copies named). A sequence that comes back is linked or asked again. The sync table's row
|
||||
of that sequence offers the same three actions; a single pair's 404 is confirmed with the
|
||||
server, a sweep of many is not asked again pair by pair (amended 2026-11-17).
|
||||
- *Upload all local* (R7, owner Q8 "Saltale e segnalale") skips sequences in an unanswered or
|
||||
kept-apart match, in an integrating pair or a job's hands, whose server copy was deleted,
|
||||
or in any server's originals archive; each skipped row reads *skipped* with the reason
|
||||
(where the suspected match lies), and the toast "Queued: {0} · skipped: {1}" · *Show*
|
||||
lists them first.
|
||||
|
||||
### 12.8 Settings
|
||||
|
||||
Sections (list on the left, controls on the right, no descriptions — tooltips only):
|
||||
@@ -1968,7 +2145,8 @@ profile, memory budget, spill folder, parallelism = photos the running job proce
|
||||
with a level per job kind, encoders detected, hardware preference; amended 2026-10-16, R2;
|
||||
Workspace copy listed, high by default, as Download, and Local render high, Send render
|
||||
normal and Move workspace high: amended 2026-10-26, R8; Copy videos high: amended
|
||||
2026-11-05, owner review 1 R3/R8/R9),
|
||||
2026-11-05, owner review 1 R3/R8/R9; Integrate and Merge sequences high: amended 2026-11-16,
|
||||
owner review 6 R3),
|
||||
Formats (per
|
||||
format tier on this PC, codec install links), Storage, Workspace (amended 2026-10-26, R8:
|
||||
*Folder*, the path read-only with *Open* and *Change…*, which shows a plan (projects left,
|
||||
@@ -2007,6 +2185,15 @@ short server id (the full id in the tooltip), *Signed in* or *Offline*, the orig
|
||||
and the server's cache share, each with *Open*. The settings Chronos Desktop owns are shown
|
||||
in the shared library's admin panel as "Set in Chronos Desktop".
|
||||
|
||||
Owner review 6 (amended 2026-11-16, R1/R4/R5): Server gains three rows after *Default
|
||||
server* and before *Render node*, found by searching "Matches": *Link matches* (*Ask
|
||||
always*, default; *When identical*; *Half shared*: owner Q1 "Mettere la scelta come
|
||||
parametro, default chiedere sempre"), *Integrate photos* (*Union*, default; *Choose each*;
|
||||
*This PC wins*; *Server wins*: owner Q3 "default unione") and *Integrate projects* (*Copy
|
||||
across*, default; *Leave them*: owner Q5 "default copiali dall'altra parte"). Each option has
|
||||
its own tooltip. The Compare dialog starts from them and can change them for one run. Reset
|
||||
restores the defaults; Export and Import carry them.
|
||||
|
||||
### 12.9 About
|
||||
|
||||
The last page of Settings (§12.8), no longer an entry of the rail (amended 2026-10-26, R5):
|
||||
@@ -2172,7 +2359,8 @@ GET/PATCH {name}/DELETE /sequences/{sid}/projects/{pid} · GET …/{pid}/head ·
|
||||
POST /api/v1/sequences/{sid}/projects/{pid}/versions push → 201 stored | 200 already_stored | 409 project_diverged | 422 hash_mismatch, newer_format, invalid_version, too_large
|
||||
GET /api/v1/sequences/{sid}/projects/frames every frame and the photo aliases of replaced tombstones, of one frames version · GET …/frames/stamp
|
||||
|
||||
POST /api/v1/uploads {sequenceId|null, fileName, size, sha256, capturedAt?, sessionKey?, restore?} → {uploadId, chunkSize, received[]} | 200 {alreadyExists, frameId?}
|
||||
POST /api/v1/uploads {sequenceId|null, fileName, size, sha256, capturedAt?, sessionKey?, restore?, intoTarget?} → {uploadId, chunkSize, received[]} | 200 {alreadyExists, frameId?, copied}
|
||||
POST /api/v1/photos/lookup {probes: [{key, sha256[], unhashed?[], sessionKey?}]} → {results: [{key, hits: [{sequenceId, hashes, removed, unhashed, sessionKey}]}]} (Read; owner review 6)
|
||||
PUT /api/v1/uploads/{id}/chunks/{n} body bytes (idempotent) → {received}
|
||||
POST /api/v1/uploads/{id}/complete[?restore=true] → frame id (server verifies sha256, commits into layout, updates manifest)
|
||||
GET /api/v1/uploads/{id} resume state
|
||||
@@ -2475,6 +2663,24 @@ projects as this PC's archive does (§7), and `server/info` lists the capability
|
||||
carries the render's `projectId` and `projectVersionId`, null when none. An older server
|
||||
ignores both fields; the desktop notes it in the job's log.
|
||||
|
||||
Matches (amended 2026-11-16, owner review 6 R1/R3). `server/info` announces the capabilities
|
||||
`photo-lookup` and `upload-into`; a client reads them once per server and treats an older
|
||||
server as having neither.
|
||||
- `POST /api/v1/photos/lookup` (Read) answers, for each probe (a local sequence's sample of
|
||||
SHA-256, unhashed photos by size and capture time to the millisecond, and its session key),
|
||||
the sequences of the served archive that hold those hashes in a frame, tombstoned them
|
||||
(deleted or replaced by a conversion), match the unhashed photos, or are filed under the
|
||||
session key: ids and counts only, never another archive of the index. At most 200 probes
|
||||
and 20,000 items per request (413 `too_many`), a 4 MB body limit.
|
||||
- `intoTarget: true` on `POST /api/v1/uploads` files the photo into `sequenceId`, which must
|
||||
be given (400), belong to the served archive (404) and be the caller's own, or the caller an
|
||||
admin or an editor (403 `forbidden`); it never goes with `restore` (400). Only a copy in
|
||||
the target stands in for the photo, and a photo the target deleted answers `alreadyExists`
|
||||
with no frame. When another sequence of the served archive holds the photo intact, the
|
||||
server files a verified copy of that file into the target without the bytes crossing the
|
||||
wire and answers `copied: true` with the new frame (§14.4). Without `intoTarget` nothing
|
||||
changes.
|
||||
|
||||
### 14.4 Upload and ingest
|
||||
|
||||
Client computes SHA-256 while reading; `POST /uploads` short-circuits if the hash exists;
|
||||
@@ -2490,6 +2696,17 @@ answers 507 with the upload still receiving, so the client completes it again on
|
||||
room; render uploads and render-node results are checked the same way at completion, and a
|
||||
volume that cannot be measured refuses nothing (amended 2026-10-26, R2).
|
||||
|
||||
Uploads into a target (amended 2026-11-16, owner review 6 R3): with `intoTarget` (§14.3) an
|
||||
upload whose photo the target lacks, but another sequence of the served archive holds, is
|
||||
copied on the server: the quota (403 `quota_exceeded`) and the archive's room (507) are
|
||||
checked, the file is copied into staging and its SHA-256 compared (a mismatch or an IO error
|
||||
falls back to an ordinary upload), then it is committed into the target refusing removed
|
||||
photos, charged to the quota only when it makes a new frame, and announced with the frames
|
||||
change event. A busy, offline or moved target answers 503. The desktop uploads a linked
|
||||
sequence this way whenever the server has `upload-into`, so a linked pair whose photos the
|
||||
server held elsewhere now reaches *in sync*; if the server refuses (403) it goes on with
|
||||
ordinary uploads, which the server files by SHA-256.
|
||||
|
||||
Deleted photos (amended 2026-10-26, R6): a photo deleted from a sequence is not filed into it
|
||||
again by an upload. `POST /uploads` answers a SHA-256 the target sequence tombstoned, and none
|
||||
of its frames still holds, with `alreadyExists` and no frame id, so an old client syncing a
|
||||
@@ -2570,6 +2787,20 @@ missing here and *Download* fetches and drops it each time; a photo never hashed
|
||||
original was already missing when it was deleted leaves no tombstone, so a copy elsewhere
|
||||
(another PC, a card) is not known to be deleted and can come back.
|
||||
|
||||
Matches and integrated pairs (amended 2026-11-16, owner review 6 R1/R6). A refresh no longer
|
||||
links a local sequence to a server one by content by itself: the *Link matches* setting
|
||||
decides (§12.7), *Ask always* by default, and every link has its pair. For an *integrated*
|
||||
pair whose Integrate left nothing out, the sync agent queues after each refresh, at
|
||||
background priority, an upload of the photos the server lacks and a download of the
|
||||
originals this PC lacks into the local sequence's own archive (owner Q6 "Foto nuove in
|
||||
auto"); such a transfer never creates or retargets a sequence, never runs for a pair whose
|
||||
server sequence answered 404, is held on a metered connection whatever *Pause metered
|
||||
transfers* says, never interrupts a running job, and backs off after a failure. Settings of
|
||||
an integrated pair sync exactly as for any link. A photo deleted on one side of a linked or
|
||||
integrated pair is never deleted on the other by sync: it is counted as *deleted there* and
|
||||
goes to the trash of the other side only when the user confirms it (*To trash…*, or *Delete
|
||||
on server…* for the server).
|
||||
|
||||
Converted photos (amended 2026-10-26, R7). Every replaced tombstone of either side links two
|
||||
encodings of one photo, and the encodings these links join (a conversion, a conversion of it,
|
||||
its undo, each side converting its own copy) compare, transfer and translate as one photo,
|
||||
@@ -2611,7 +2842,15 @@ only settings both sides changed are a conflict. Versions are compared and place
|
||||
(the portable form), so photos added, a copy's other frame order, a Verify that hashed a
|
||||
photo or a conversion that replaced one never move a position. Only Main's head is
|
||||
mirrored into the sequence's settings, so only Main crosses to a linked server copy,
|
||||
through the settings sync above; other projects never leave their home. A home that is
|
||||
through the settings sync above; other projects never leave their home by themselves
|
||||
(amended 2026-11-16, owner review 6 R5): an Integrate of two matches with *Copy across*
|
||||
(the default, owner Q5 "Scelta, default copiali dall'altra parte") copies each side's other
|
||||
projects, with their histories, to the other home, named `<name> (<PC>)` (or `<name>
|
||||
(<server>)`) on a clash; a merge of two local sequences always copies the other's projects
|
||||
into the kept one; with *Leave them* they stay, and the two workspace copies are marked as
|
||||
twins in Edit (§12.3). A copied version is verified against its content hash at the other
|
||||
home, a copy someone else changed meanwhile is left alone and a new name taken, and a
|
||||
project of a newer settings format is not copied. A home that is
|
||||
read-only or out of reach leaves the versions waiting in the workspace. The home is this
|
||||
PC's archive or a server (§14.3).
|
||||
|
||||
@@ -2686,7 +2925,12 @@ holds its project now, and fails, to be retried, while a move is under way. *Cop
|
||||
and the server, high by default as a download is: it copies the renders its parameters
|
||||
name into the host's videos folder, checking that folder again when it runs (never the
|
||||
archive, the data folder or the workspace), each file verified by hash before it takes its
|
||||
name (§12.10), and resumes after the copies it finished. A
|
||||
name (§12.10), and resumes after the copies it finished. *Integrate* (`integrate`, stored as
|
||||
25) and *Merge sequences* (`merge-sequences`, 26; amended 2026-11-16, owner review 6 R3) run
|
||||
on the desktop only, high by default; each plans again on its first run and refuses a plan
|
||||
whose fingerprint moved, then follows its journal in `.chronos/journal/` stage by stage, and
|
||||
releases its pair on a cancel. A job of background priority (an integrated pair's automatic
|
||||
transfers) never makes a running job yield, whatever its level. A
|
||||
handler may clean up after a cancel: cancelling a paused or failed job no handler runs calls
|
||||
it, and cancelling a paused job whose run has not ended waits for that run to end first
|
||||
(amended 2026-10-26, R8).
|
||||
@@ -3609,6 +3853,14 @@ questions asked and the answers; DECISIONS rows give the reasons.
|
||||
| 2026-11-15 | Owner review 5, R2 (mass-pass progress, #65) | §5, §12.5, §12.6, §12.7, §14.3, §14.6, §14.8 | Jobs report a detail (step, item, item x of y, part n of m; `jobs.progress_detail`, migration 0011; `detail` on `JobDto`, `jobProgress` and `NodeProgress`), published at most twice a second per job (engine and server gate 500 ms); the Jobs rows, the job bar (60 characters), Archive › Recent maintenance, the editor's server job line and the admin panel's Jobs and dashboard show it; the desktop's Server section lists the connected server's running and paused jobs live, with Pause, Resume and Cancel only for ManageArchive. |
|
||||
| 2026-11-15 | Owner review 5, R3 (separate homes, #66) | §4.4, §6.2, §12.7, §12.8, §14.3 | Each server has a stable id (`server.id`, `serverId` in `server/info`); the desktop keys servers by it with addresses as aliases; the workspace and the cache are split into `local\` and `servers\<id>\` homes (parent manifest format 2), sorted from the 1.0 layout at the first start by journaled, inventory-checked renames; a server's homes are re-keyed at sign-in; *Download originals* goes to the server's own archive beside this PC's; Settings gain Home folders and Known servers. |
|
||||
| 2026-11-15 | Owner review 5, R4 (desktop as LAN server, #67) | §4.4, §6.2, §12.7, §12.8, §14.3, §14.8, §14.9, §18, §19.3 | The separate Windows server program and its Windows service leave the product: `Chronos.Server` is a library, `Chronos.Server.Host` the Docker and development program; Chronos Desktop shares this PC's library on the LAN (Settings › Server › *Share this library*, Server › This library), hosting the same engine in-process over its own index and archive; by-id endpoints are scoped to the served archive; the desktop refuses its own share. |
|
||||
| 2026-11-16 | Owner review 6, R1/R7 (matches, #73) | §5, §6.2, §12.2, §12.7, §12.8, §14.3, §14.5 | Chronos finds *matches*, the same time-lapse on a server and on this PC under other ids or twice on this PC (this PC's archive, adopted folders, servers' originals archives): `found_copies` and `copy_probes` (migration 0012), every existing link a linked pair; server detection after each refresh through `POST /api/v1/photos/lookup` (capability `photo-lookup`; 1.1's rule and hints on an older server), local detection after the index opens and after jobs that change photos; *Link matches* (*Ask always* by default, *When identical*, *Half shared*) replaces 1.1's silent link; Server › *Matches* with its states and actions, *Keep apart* remembered, the Library's *Also elsewhere*; a folder of sequences is adopted as an archive; *Upload all local* skips and marks suspected matches. |
|
||||
| 2026-11-16 | Owner review 6, R2/R3/R4 (compare, integrate, merge, #73) | §5, §12.5, §12.7, §12.8, §14.3, §14.4, §14.6 | The Compare dialog (Photos, Details line by line, Projects, Plan); *Link only* and *Unlink*; *Integrate* (`integrate`, 25) completes a local sequence and its server match both ways under the *Integrate photos* policy (*Union* by default, *Choose each*, one side wins for differing photos), losing versions to the trash only after the winner is hash-confirmed, the details applied as one change; the merge of two local sequences (`merge-sequences`, 26) into the kept one, the other into its archive's trash after every photo is verified, typed by photo count; both journaled and resumable; uploads into a target (`intoTarget`, capability `upload-into`) copied on the server; a background job never interrupts a running one. |
|
||||
| 2026-11-16 | Owner review 6, R5 (projects across, #73) | §12.3, §12.8, §14.5 | Other projects leave their home only through an Integrate with *Copy across* (the default of *Integrate projects*) or a merge, with their histories, `<name> (<PC>)` on a clash; with *Leave them* the two workspace copies are twins in the Edit picker. |
|
||||
| 2026-11-16 | Owner review 6, R6 (sync after integrating, #73) | §12.2, §12.7, §14.5 | New photos of an integrated pair move by themselves both ways at background priority, held on metered connections, told as *not sent* after three failures; settings sync as for any link; *deleted there* goes to the trash only on confirmation; a server sequence that answers 404 twice reads *deleted on server* with *Keep here*, *Upload again* and *To trash…*. |
|
||||
| 2026-11-17 | Owner review 6, verification round 3 (#73) | §12.7 | Integrate trashes a server photo only for the server sequence's owner or an admin, with Delete (decided per sequence, as `frames/delete` allows); for anyone else the server's losing version stays, out of the server's Main, listed as needing the Delete right; a server detail change made while the job runs stops its Details stage where the user kept this PC's value; detection keeps pairs answered while it ran; a sync row whose match the server deleted offers *Keep here*, *Upload again* and *To trash…*. |
|
||||
| 2026-11-17 | Owner review 6, verification round 4 (#73) | §12.2, §12.5, §12.7 | *Two versions…* on a local sequence's Library menu lists the photos it keeps in two versions, each with *Drop…* (owner Q3), and a merge job's *Open* shows it; a merge skips only a project the kept sequence holds a real copy of, runs its trash checks before the links move and gives the other back its links if abandoned; the merge confirmation types the count without separators; *Apply* plans again when the plan is stale; Matches rows cut long names in their middle. |
|
||||
| 2026-11-17 | Owner review 6, verification round 5 (#73) | §12.2, §12.5, §12.7 | *Pause metered transfers* resumes only what it paused, a restart included; a merge's *Choose each* has no *Leave* and blocks until each differing photo is chosen; a merge is blocked while the other's folder holds photos the index has not read; *Drop…* says why it cannot go before asking, and *Drop…* of the version Main uses lets Main use the one that stays (*In Main* marks it); a server card in a match offers *Compare…* alone. |
|
||||
| 2026-11-17 | Owner review 6, verification round 6 (#73) | §12.3, §12.5, §12.7 | A merge that finds the other changed drops its journal and plans again; *Unlink* and *Keep apart* act on the local side they name; *Link only* waits while either side integrates, and an integration keeps a link given to another sequence since; a sweep of 404s is not confirmed pair by pair; *To trash…* trashes from the kept sequence of a merge and stops when a photo became a last copy since the plan; a row shows three buttons at most; a Details segment says which value it takes; a twin needs its sibling at the other home. |
|
||||
|
||||
## Appendix A — `CLAUDE.md` content (create verbatim in Phase 0, keep updated)
|
||||
|
||||
@@ -3653,4 +3905,7 @@ recommendations with reasons) · Tier (how a frame's pixels are obtained) · Pro
|
||||
stand-in) · Sidecar (`sequence.json` manifest) · Render (an exported video) · Preset
|
||||
(bundle of export values) · Sequence preset (project settings + export preset produced by
|
||||
the advisor) · Render node (client lending its GPU to the server) · Job (any long
|
||||
operation, resumable) · Card profile (import rules for a memory card).
|
||||
operation, resumable) · Card profile (import rules for a memory card) · Match (two
|
||||
sequences that hold one time-lapse, never a duplicate photo; owner review 6) · Integrate
|
||||
(complete a match both ways, then keep it in sync) · Merge sequences (two matches of this PC
|
||||
into one) · Twin (a workspace project with a sibling at the other home).
|
||||
Reference in new issue
Block a user