Owner review 2, phase 5a, fix round 5.
- A cancelled workspace copy clears its partial media only under the project's
lease, after checking again that the job is still cancelled, that no other
copy of the same root and project is queued, running or paused, and that no
copy in this process is writing. The engine now waits for a paused job's run
to end before calling the cancel handler, so the clean-up is never skipped.
- The clean-up never recreates a project folder that was removed meanwhile
(the lease no longer creates the folder). The next list removes a project
folder that holds only lease files nobody holds, older than the lease.
- A Main this Chronos cannot read (newer or damaged) refuses the open at once
only when nothing else can be offered. Otherwise Open in workspace lists it
disabled, with the reason as its tooltip. The refusal's action tooltip is
now Remove copy.
- The removal plan counts a conflict the same way the sync status does: a
conflict that a settling replay took past its commit point is not work
left.
- A healed record is stamped after both the record's time and the index's, so
the next rename made elsewhere is taken.
- A trash folder holds back the rebuild of a lost record only when it is this
sequence's deletion: its record names this sequence or cannot be read, or it
has no record, is within a one-day grace and holds no version of another
project. What was seen of folders that are gone or have a record again is
forgotten.
- When a deletion wins, version files pushed into the live folder before the
deletion arrived are moved beside the deleted record in the trash, never
deleted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner review 2, phase 5a (R8), fix round 4.
A project the library no longer has now reads as Gone with no conflict to
answer. The conflict stays recorded in sync.json, so Save both on a deleted
project says Gone once and offers its copy. It no longer reopens the conflict
dialog. Keep mine and Take the library's first check that the home still has
the project. Neither is merged onto the last version a deleted project had,
so the working state and the unsent versions stay as they were.
Old files in versions/.replaced are pruned only after a push that ended well,
never after one that stopped at a conflict. A file an earlier build set aside
kept the time its version was written. It now counts as set aside no earlier
than when this build first knew the folder (versions/.replaced.since), so an
upgrade does not prune it by an old mtime. The Merge mark goes on the replayed
version whose own change met a setting the conflict listed. A version that
only rides along with a working-state conflict stays a commit.
A first copy cancelled while paused or failed, which no handler runs, now has
its partial media removed under the project's lease, as a running one does
(ICancelledJobHandler). The space estimate counts a proxy held under its
<id>-<sha16>.jpg name. The frames stamp carries a weighted SQL checksum of
the hashes, so a hash replaced in place (a Verify) makes the workspace read
the frames again.
Desktop: a removal that cannot move a file puts back what it moved, so the
copy stays whole and listed, and the failure is said. The Removed toast names
a damaged copy as it is known, never by its folder id. One copy that cannot
be listed no longer hides the others. A Main this Chronos cannot read (newer
or damaged) is refused at once with the reason, and a damaged one offers
Remove local copy. Save version is off on a Gone project, and Send/Delete
there say the project was deleted in the library.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Conflict in WorkspaceFallbackTests: keeps desktop's new newer-copy test
and drops ACancelledFirstCopyLeavesNoHalfMedia, which the sync branch
removed along with WorkspaceHost.RemovePartialMediaAsync (the cancelled
first copy's clean-up now runs in the copy job, tested in Data).
ReplayAsync auto-merged with both intents: desktop's working-state
conflicts and silent paths, and sync's skip of no-change versions,
Settles journal flag and PruneReplaced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A take of the library's values cut past its commit point settles its conflict
(replay journal marks Settles); a later stale choice finds nothing to settle,
and one cut before it keeps the conflict so the next choice is applied.
- A local version that changes nothing once replayed on the head is not sent
nor written as a Merge; its file stays in versions/.replaced.
- Save both journals its intent (name, base, time) before the home is asked,
so a cut after the copy was made reuses that copy on retry.
- A project deleted at the home reads as Gone from pull, push, resolve and
save both, logged once, without retry loops; versions and working state stay.
- Save both keeps the restore recorded in sync.json.
- The copy job writes a photo's new bytes under a name of its own while the
editor's media still name the old file, switching at the commit; a cancelled
first copy removes its own half media under the lease (VM hook removed).
- Status reads the version files once, re-reads the home's frames only when
its stamp moved, reports damage only when confirmed under the lease, and
waits once for a busy lease before calling the media outdated.
- versions/.replaced is pruned after a sync that ended well (30 days, newest
20 kept, never a file a journal names).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catch-up merge of a push whose mirror a crash cut short with settings
written meanwhile was two appends (External, then Merge), resumed by a purely
structural test that also fired on ordinary histories (two outside edits in
a row, a second index with an older mirror) and reverted the latest edit.
It is now one Merge version on the head in which the settings written
meanwhile (the settings in force, which older clients wrote) win where both
changed; the head's values stay in its version. A merge that adds nothing to
the head makes no version, so a cut before its mirror is finished next time
by the same index or a rebuilt one without any marker. The structural resume
is gone. An index meeting Main with a lagging record merges project.json the
same way, so a newer outside edit is no longer reverted by an older push.
Versions the catch-up records as mirrored are named in Main's record too
when project.json holds them, so records no longer lag behind externals.
Duplicate Main claimants (an index that met the sequence before Main's
record arrived) are settled from the records: the oldest claimant with a
version is Main in every index, the others are ordinary projects, and their
records say so when the archive takes writes.
A live project folder whose record is missing while the index holds the
project gets its record (and missing version files) written again from the
index instead of being held back forever. A record behind the index no
longer gives the index its old name. MirrorAsync reads the version leniently
and skips a newer one, as the other branches do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner review 2, R8. Round 2's checkers left five desktop problems:
- A workspace copy whose project.chronos a newer Chronos wrote (a format
this one does not know) was listed as damaged and offered for Discard.
It is now listed as "Newer Chronos" with its own tooltip, named from
what of its file still reads. It never opens, is never checked out
over, and Remove local copy refuses it with a sentence that says why.
- Discard of any copy moved only the files Chronos knows. It now moves
every file and folder of the copy aside (only the media are deleted)
and removes the folder only when nothing else came into it.
- Discarding a damaged copy asked to type its folder's GUID. It now asks
for the name the copy is still known by (its file, else the library's
index; the project's name, else the sequence's title), else for the
number of its files. The heading never shows the id.
- A conflict at a path where the working state had gone back to the base
value listed the local version's value. The conflict now lists the
working state's value in every case. Where the working state already
holds the library's value there is nothing to ask: that path takes the
library's value in the replayed versions too, so they agree.
- EditorSession.ReloadAsync, ResolveConflict and TakeOverAsync threw
NewerSettingsException on every reload when an edit was not stored
yet and the stored project became a newer Chronos's. The edit is now
kept in versions/.replaced (outside the chain, never sent), a toast
says so, the pending save is dropped and the newer settings are shown
read-only. When the edit cannot be kept aside, the editor stays as it
is and nothing is dropped.
The SequenceViewModel wiring now has a view-model test: the copy's facts
in Open in workspace, the refused-folder toast and its Choose folder
action, and the picker for a newer copy and a damaged one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Taking the server's values no longer saves the working state as a
version first (the desktop fix), so a take refused by a home that
holds no versions after the base leaves the local versions as they
were. The recovery test that relied on that pre-commit now saves the
unsaved stack change itself before pushing it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 5a fix round 2 of owner review 2 (desktop):
- Take library's no longer commits the working state first, so a take that
leaves only the library's values sends no empty version; the working state
it replaces is kept aside in versions/.replaced, outside the chain.
- Conflicts list this side's value as the working state holds it, so one
answer settles them instead of asking again for the newer value.
- A conflict of format (library saved by a newer Chronos) offers only Save
both and Later, says why in its tooltip and shows no raw format numbers.
- Conflict lines count the photos a setting differs on ("Excluded frames
(3)") instead of dropping the duplicates.
- A read-only library is named as such, not as offline; checkouts from it
stay editable and their versions wait in the workspace.
- A workspace folder refused inside a library offers Choose folder, and
Settings > Workspace gets Change...: a plan (projects left, projects found)
is confirmed before the folder changes; nothing is moved.
- Open in workspace shows the copy's size and the drive's free space, and
warns when the copy would not fit with its 0.5 GB reserve.
- A cancelled first copy removes the half media it wrote.
- A copy whose project.chronos cannot be read is listed as damaged instead of
hidden, and goes only through Remove local copy > Discard, after a plan.
- Pruning keeps a version whose archive file is damaged (test added).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Save both, a recorded conflict and a damaged version file could each leave
a local version out of the chain or a copy half-made at the home. This round
makes every one of these end with nothing lost and nothing half done.
- Save both retry: a journaled copy somebody else sent a version to (or one
deleted since) is left as it is, and a new copy takes every local version.
A divergence met at the copy while sending also makes a new copy, once.
- Keep mine, Take server, or a pull that settles a conflict after a Save both
was cut short first send the rest of the journaled versions to that copy,
if it is still this workspace's. The journal is cleared at the commit point.
- A conflict of format met past local versions the home already stored
(their answer lost) now moves the base onto them, like any other conflict.
The conflict, the base and the chain then name one version. A save-both
journal follows the base when it moves.
- A conflict recorded before stays while the home holds no version after
the base. A base that has reached the conflict's head clears it.
- Take server no longer replays or sends the version it saves first when,
replayed, that version holds only the server's values. It stays in
versions/.replaced for the undo. The test checks the exact history again.
- Version files after the base that cannot be read, or that do not follow
from it, are listed (WorkspaceProject.UnreadableVersions). The new state
WorkspaceState.Damaged shows them. Commit, push, pull and resolve refuse to
go past them. A damaged file whose version the home holds takes the home's
copy at the next sync, and the damaged file is kept aside. Remove local
copy counts these files as unsent.
- PushOutcome.TooLarge raises its own WorkspaceSyncException message. The
desktop says Errors.Workspace.VersionTooLarge for it and for
ProjectVersionTooLargeException when a local commit is too large.
- The editor maps LeaseUnavailableException from opening a busy project to
Errors.Workspace.Busy.
- The copy job no longer deletes, during the pass, a proxy that the editor's
current media name. RemoveStale removes it after the commit. A resumed run
does not keep such a file as a frame whose photo changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sidecars stay the truth of a sequence's projects in the cases round 1's
checkers found still open, and no version or setting is lost on the way:
- An index-only Main meeting a Main another index made is written back as
another project, and Main passes to theirs in one transaction through a
free temporary name, so ux_projects_name and ux_projects_main never fail
(the SqliteException used to escape ListAsync and leave the index and the
sidecars disagreeing). A refusal is logged; the next reconcile settles it.
- The reconcile takes Main from the records, in step with the index, when
another index passed it on: exactly one Main per sequence, names from the
records where free.
- A project folder with versions and no record, of a project no index row
names (a creation cut before its record), no longer holds the sequence
back forever: it is left as it is and indexed once its record arrives.
- A record behind the index (a projects folder put back from an older
backup) is made whole from the index: its missing versions and the record
are written again, at every catch-up and before any append, rename or
delete. Only a record ahead of the index or naming another version is
refused, with a message that says so.
- An index meeting Main walks the chain down to the version the record names
as mirrored (a bound, since that record write may lag project.json), so a
lagging record never makes an External that reverts a newer push. When the
record names a mirrored ancestor, settings written since merge with the
unmirrored versions, as for an index that knows its mirror.
- The catch-up merge's External + Merge pair is resumable: an External head
whose parent is a push no mirror wrote is finished into its Merge version
next time, by this index or one rebuilt from the sidecars.
- A project deleted at the home has no head there, so a workspace copy of it
reads Gone, never In sync; Remove local copy without discard says the
project was deleted in the library.
- DatabaseExceptions are contained per sequence in the archive scan's project
reconcile and in ProjectService reads.
Tests: SQLite (PostgreSQL-ready) for each scenario, including a cut between
the two catch-up versions, a 40,000-exclusion version through save, push and
rebuild, and the App's Remove local copy of a project deleted at home.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pull onto a newer Chronos's settings made the editor throw: ProjectHistory.Replace
rebased every undo and redo snapshot through ProjectMerge, which refuses to merge a
newer format when both sides changed, so any non-empty undo stack broke the reload
after a sync that had succeeded. Replace now drops the steps instead when either side
(or a step) is of a newer format: the project is shown read-only and undo never brings
back values from before the newer settings.
The media learnt the home's hashes and conversion aliases only inside a replay, so a
status or Save version before that compared a SHA-named base with photo-named media
and read a false Modified or saved a version that only re-keyed photos. Now:
- ProjectContent.SameChoices also compares the texts as placed on the frames, hashed
or not (Bound), so status and commit without a home agree with the base;
- a status asked of the home teaches the media its names (written under the lease, or
when the lease is free), and so does a checkout of a project already here;
- WorkspaceStatus.MediaOutdated reports frames moved at the home, or names the media
could not learn yet, and the project menu offers Update media for it (tooltip text
updated in en and it).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Taking the server's values now saves unsaved changes as a version first
(desktop fix), while a conflict of format refuses that choice (merge fix):
the save is skipped for a conflict of format, so a refused choice leaves
the local versions as they were. A project that moves onto a newer
Chronos's head with nothing of its own now adopts the home's copies of
the local versions the home already held, as a replay does, since the
replay no longer writes over unsent files before the base moves
(workspace fix). The recovery test of a conflict met past a held version
checks the versions before the one Take the server's saves first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review 2, phase 5a, fix round 1 (desktop and the engine side of Resolve and Restore).
- Resolve applies Keep mine / Take the library's only to the conflict the dialog listed:
when the head or what differs moved since, the new conflict is recorded and asked again;
Sync re-works a pending conflict instead of re-showing a stale list. Take the library's
first saves uncommitted changes as a version, and the editor takes it as one undo step
(toast Undo, Ctrl+Z) that brings back only the settings both changed.
- Restore saves unsaved changes as a version also while a conflict waits; a restore that
changed nothing, or was undone, no longer marks the next version as a Restore.
- The editor's saves and merges of a workspace project merge positions photo by photo
(portable form) and ask where both sides changed a setting, never deciding for ours.
- Read-only after a pull is signalled, and no save that can never be stored is left behind.
- The chip is read again after edits; a background conflict waits for the open dialog;
Send first and Delete show the conflict they met; Discard changes needs the typed name.
- Open project... reaches the library's other projects (Save both's sibling, also from
its toast); copies whose project or sequence is gone read Not in library and can be
removed from the picker's Workspace rows; a delete whose local copy stays says so.
- A workspace folder inside a library is refused before anything is written.
- Conflict and Compare lines name heroes, exclusions and keyframes; History shows the PC
name alone, never the program's prefixes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A push now moves the base before its local file reads as sent; a replay
journals itself in sync.json, writes the replayed versions, then the base
(the commit point), and only then sets the old ones aside and adopts the
local commits the home already held; a conflict met past such commits moves
the base onto them first. A save-both journals its copy and the ids it sends
under, so a retry completes the same copy instead of making another. The
next push, pull or resolve finishes or undoes whatever a cut left, so no
version is orphaned and no false conflict appears.
The editor reads the working state and the media index under the project
lease; workspace.json is written whole and moved into place (an empty one is
made again); project files may hold 64 MiB and one that would be larger is
refused before it is written, so large projects check out. The workspace copy
checks the drive's free space before and during the copy, keeps the folder in
its checkpoint and stores a reset when a pass starts again, and runs at High
level in the priority queue. Renders record a version only when the index
holds it with the settings rendered; an unsent version renders as the project.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A project record that could not be read once, or a missing .chronos/projects, marked
projects deleted for good and made a second Main; an index meeting Main with no mirror
state took its own stale settings column as an outside change and reverted the pushed
head; a newer-format or unreadable head made every project call fail or rewrote the
record's head over the real history. Now:
- Deletion is never inferred from absence or a read failure: an unreadable record holds
its project back (listed as indexed, nothing written for it, no second Main), a row
marked deleted is revived when its live record says so, and projects the archive has
no folder for are written back from the index.
- Appends re-read the record under the lease and refuse when its head is not the
index's; Main is only made when the sequence has none anywhere.
- An index with no mirror state decides from project.json and the record's new
mirrored member (older records: the head's ancestry), never from its own column.
- A newer-format Main head is listed and pulled but never mirrored, merged or built on;
pushes must parse strictly and fit the one 64 MB version limit (TooLarge otherwise).
- Duplicate version numbers and name/Main clashes are contained per project, so a scan
or rebuild never stops.
- Delete moves the folder first, then writes the deleted record in the trash.
- The home's read-back for workspace pruning and Remove local copy reads the version
files (IProjectHome.HoldsAsync), not the index.
- A read-only archive is read without writing: its projects open from the sidecars and
a sequence with no Main gets one in the index only, written back once writable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A workspace copied before the home hashed or converted a photo named it
differently from the versions the home made since, so a pull merged the
same photo as two: frame edits were silently undone and Keep mine placed
the library's value. Before replaying, the workspace media now learn the
home's hashes (same frame id, size and capture time) and conversion
aliases, so every side names each photo alike. Rebind also gives a
renamed entry the occurrence a placement looks for, so positions on
burst photos keep applying once hashed, and folds entries of one photo
(in Rebind and in the merge's keyed form) instead of keeping one.
Settings of a newer Chronos are no longer merged member by member with
this one's: ProjectMerge refuses when both sides changed. A workspace
pull keeps its local versions and working state untouched and records a
conflict of format that only Save both settles (into a new project of
this format); with nothing local it takes the newer head read-only.
Main's catch-up leaves a newer head and settings written meanwhile as
they are.
When Main's catch-up merge overrides values another writer stored, that
writer's settings are kept as an External version before the Merge one,
so nothing is lost from the history.
Unknown members inside Auto values, camera keyframes and curve points,
and on pending entries once placed, are kept like ProjectSettings' Extra.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 5a was written on an early phase 4a state. On top of phase 4b it now
keeps the rules every writer of a sequence's folder follows, and keeps
project versions intact through Reorganize and conversions:
- ProjectService writes project sidecars, project.json and the settings
only under the sequence's lease and only in a folder that holds the
sequence (SequenceFolders.Holds). A folder another index moved away, or
one another sequence was moved into, is refused with
SequenceFolderMovedException: reads answer from the index, so no
project is taken for gone, nothing is written into the other sequence's
folder and the old folder is never created again. The home reports it
as out of reach. Full scans and rebuilds reconcile projects the same
way, and a failure there is logged instead of failing the scan.
- Stored versions park positions by photo and now follow the encodings a
Replace conversion (or its undo) joined through the sequence's Replaced
tombstones (PhotoAlias, HomePhotos): Main's mirror, renders of a
version and workspace media place them on the converted frames.
ProjectContent.Rebind/SameChoices name parked photos as the frames hold
them now, so a conversion or a hash since is no "external" Main version
and no spurious "Modified" in a workspace, and merges see one photo.
- The workspace copy job only reads the archive: it no longer runs the
archive's proxy pass, makes missing proxies in the workspace, reads
only a folder that holds the sequence, starts again when the folder
moved or files were renamed during the copy, resumes from a checkpoint
of its frames version, and refuses a workspace folder inside any
library before it writes anything (Errors.Workspace.InsideLibrary).
The working state keeps its positions by frame where frames stay.
- ArchiveProjectHome looks for a project or version the index does not
know yet in the sequence's sidecars first (an index taken back from a
backup, a sequence back from the trash), instead of calling it gone.
Tests cover the moved and taken folder, conversions in the archive and in
the workspace, the copy refusing a workspace in a library, resuming on
other frames, the alias lookup and the rebinding.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner review 2, phase 5a (R8), desktop package: editing moves out of the library. A sequence of this PC's archive
now opens in Edit as a project of the workspace (%LOCALAPPDATA%\Chronos\workspace, .\data\workspace when portable),
with this PC's archive as its home; the editor writes the workspace's working state, never the library.
- WorkspaceHost composes WorkspaceStore and WorkspaceSync over Settings > Workspace's folder: checkout and the
WorkspaceCopy job, status, Save version with the sync after it (Sync automatically, on by default), sync (pull,
then push), conflicts, restore, history, new / rename / delete project, and Remove local copy, which refuses
while work is unsent unless the user sends it first or discards it, reads back the home's head and base and
checks their hashes, and keeps discarded work in <workspace>/.trash; versions past Kept versions are pruned only
once the home returns them with the same content.
- WorkspaceSequenceSource: frames and pixels of the media (proxies), the working state saved atomically under the
project's lease and merged against the basis, the home's deep report while its frames are the media's, renders
at the home with the portable settings recording the project and the version.
- Edit: the project opened last for the sequence, else "Open in workspace" (Main made from the sequence's settings,
another project or a new one; proxies) checks out, copies and opens once the copy is done. The picker lists the
workspace's projects with their state above the library. The title's project menu: Save version (Ctrl+S, note),
Sync, History (compare, restore as one undo step), New project, Rename, Delete project, Remove local copy; a
conflict dialog only on real conflicts (keep mine, take the library's, save both, later); Update media when the
library's frames moved. .chronos files: format 2 opens its project, format 1 gives its settings to Main.
- Settings > Workspace: folder (shown, Open), Sync automatically, Kept versions. Strings in English and Italian.
- A capture (sample data without an engine) keeps editing the library.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit da47a580ba9db3ce2a1db2f11c30cf7344c8b394)
Owner review 2, phase 5a (R8): editing moves out of the library into a workspace on a fast disk, and a
sequence gets several projects, each with a linear version history pushed and pulled like git.
- Core: ProjectSettings keeps members a newer Chronos wrote (Extra) and reads a newer settings format
read-only; ProjectContent is the portable form of a version (every frame position parked by photo,
canonical text, SHA-256 content hash); ProjectBundle format 2 adds the workspace section, and a file
without it is still written as format 1. JobKind.WorkspaceCopy = 20 (19 kept for Convert).
- Data: migration 0009 (projects, project_versions, the render's project columns); ProjectService on
ArchiveService.Projects keeps projects as sidecars first (.chronos/projects/<id>/), then the index,
under the sequence lease: create, rename, delete into the projects' trash, history, push with
fast-forward, idempotent repeat, divergence and hash checks. Main is made from the sequence's settings
and mirrored both ways, so every older code path keeps working; outside writes become "external"
versions, a mirror a crash cut short is completed or merged. Full scans and rebuilds take the projects
back from their sidecars.
- ProjectMerge moves from the App to Data/Projects, merges pending frames photo by photo and replays
unpushed commits on a moved head.
- Workspaces: WorkspaceStore, WorkspaceSync (checkout, save, commit, push, pull with replay and merge,
conflicts settled by keep mine / take server / save both, restore, status) and the WorkspaceCopy job
(proxies copied hash-verified and resumable; originals refused until phase 5c).
- Renders of a project version place its positions on the frames and record the project and version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c4c1802884e403db8759ed0501f770a67a047f20)
Phase 4b and its first fix round were written on phase 4a before its rounds 4-6. Moved onto the
released 4a, the conversion now follows 4a's rule for writers into a sequence's folder
(SequenceFolders.Holds), and the parallel fixes meet:
- The job leaves a sequence another index moved away (its folder missing, or holding another
sequence's sidecar) as Blocked with Errors.Archive.FolderMoved, nothing settled, staged or
replaced there; the retry after this index's scan converts it where it is. It read the
sidecar there and reported the reader's technical text.
- New sequence reads the source's project under the source's lease, where its sidecar was just
read as its own, and writes the new sequence's project under that sequence's lease only into
a folder that holds it. It read the project from the folder the row named afterwards, without
a lease, and wrote through the store without the check.
- Download originals (resolved in the cherry-pick of the trash and sync fix, tested here) swaps
a copy fetched in another encoding into its missing frame after the transfers, as round 6
restores originals, and only once the sequence is found in the folder the index has;
otherwise the copies stay staged and the job fails with FolderMoved after its other work.
The swap ran inside the transfer loop and failed the job at the first refusal.
- The New sequence wording of the three skip reasons the codecs fix added (Archive.Convert.
NotCopied.EightBit, ColorProfile, TooLarge, en and it): the server and the desktop look them
up by reason.
- The server's free space test sets the staging folder's figures too: the job fix measures the
tighter of the archive root's and the staging folder's volumes.
Tests: a conversion of a sequence another index moved (its folder taken or empty), and a
download whose missing frame takes the server's conversion where the sequence is now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The convert endpoint planned the whole selection inside the HTTP request, again for
every mode, quality keystroke and confirmation, with no limit: behind a proxy an
all-sequence conversion could never get past its dry run or its apply.
- ReorganizePlanCache becomes PlanCache, shared by Reorganize and Convert: one plan
per key made apart from the request, two at once across both kinds, eight kept,
15-minute timeout, 5-minute lifetime, 503 plan_dropped. Keys are typed records
(ReorganizePlanKey, ConvertPlanKey) that also say which exceptions are refusals.
- A conversion plan is keyed by archive, a convert stamp of the index
(SequenceRepository.GetConvertStampAsync: the Reorganize stamp plus, per planned
sequence, the photos' count, sizes, formats, pixel sizes and missing, corrupt,
preview-only and undecodable flags), the sequences and the target with the
quality that counts. Not the mode: the request's mode and options are set on the
kept plan, and the free space is measured again at every request through the
engine. A plan made while the volume was away is not kept (503 archive_offline).
- New sequence holds the converted copies alone: the dry run says the skipped
photos are not copied into it (Archive.Convert.NotCopied.*, Server.Convert.OnPcNew),
the panel's totals, column and confirmation give the count, and so does the
desktop's summary.
- Panel: the preview is asked in Replace's neutral words; a dry run cut off by a
proxy is asked again while the totals show how long it takes, plan_dropped is
retried once; an apply the server let go plans again, a changed one shows
Admin.Convert.PlanChanged, and one with no answer is not resent (its job may be
queued).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f0b1e379ce7c08b6d3459ab25ca6214c8f366f6c)
Owner review 2, phase 4b, fix round 1 (trash, undo, recovery, sync and ingest).
- Replace journal: records a phase (moving, written, undoing) and the name each swapped
frame is filed under. Recovery decides "sidecar written" by what the sidecar lists, not
by the frames version any writer moves; a failed rollback stays undoing and its failure
now stops the writer (as a photo deletion's recovery does). The ingest settles restores
and replacements first, so an upload can no longer complete a swap that never happened.
- Emptying a Replaced entry re-verifies each replacement where it is now: in the sequence
through later conversions (a second conversion no longer strands the first originals),
or, when the conversion was deleted, its copy in the trash. The dry run marks such
entries "conversion deleted" (fingerprinted, shown on the desktop and the panel), and
the confirmed emptying may then erase them instead of keeping them forever.
- Undo of a conversion takes exactly the entries its job made (the job id is recorded on
the entry), never entries found by time window.
- Project positions translated by photo use the sidecar's photo of every frame still
there, so positions on a converted frame stay put when another frame went meanwhile.
- Sync aliases are equivalence classes: an original converted on both sides is one photo;
link-by-content, proxy counting and proxy upload follow aliases; a download into a
frame missing here swaps the other encoding into that frame instead of adding a frame.
- The ingest answers a converted photo's original (a card or folder imported again, a
download) as a duplicate of its conversion and keeps the alias tombstone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3341a2f845753fc4c5bcba51a3b645f126c95eaf)
The convert job planned every sequence again when it ran and checked only the frames
version, so a verify, a repaired upload or a tier change between the dry run and the job
let it replace photos the confirmed plan had listed as staying unchanged.
- Each sequence of a convert job now carries the digest of the photos it converts, each
with its SHA-256 (ConvertSequencePlan.Digest, also in the plan's fingerprint). Under the
sequence's lease, its sidecar settled, the job plans it again and goes on only while the
digest matches; it then pins those photos (convert-<job>.pins), so photos that come in
or are verified later stay as they are, a retry included. Stage B checks under the lease
that every pinned photo still holds the content converted instead of holding the frames
version, so a sequence still receiving uploads converts what was confirmed.
- A resumed job settles the journals a crash left in a sequence (a half-done replacement
among them) before it plans, and reports a sequence its replacement completed as
Converted, never Nothing or a partial swap.
- The passes a converted or new sequence needs are queued as soon as its outcome is
journaled; the journal records the statuses they follow from and whether they were
queued, so a pause, yield, stop or crash no longer loses them.
- Staged conversions of a blocked or failed sequence are kept for the retry, which
re-verifies and takes them; maintenance keeps a convert job's staging while the job is
queued, running or paused, and removes its journal and staging once the job is done or
gone from the history.
- A dry run counts the sequences of a queued conversion as busy, so the same conversion
cannot be confirmed twice.
- New sequence copies are owned by the source's owner, else by the requesting user's id
(never the user name); a staged copy that vanished fails the sequence instead of leaving
its photo out; the job log states how many photos stayed in the source alone.
- Free space is measured where the conversion writes: the server takes the tighter of the
space path's volume and the archive's own (Unraid cache), the desktop asks Windows
(GetDiskFreeSpaceEx), which also measures UNC archives; the job checks again before each
sequence and each photo, scaling estimates by the files staged so far, and stops before
the volume fills with what it staged kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2d7d461c33b9f257bf57793cc7cf331d0425c14e)
Phase 4b review, codec findings. A Replace makes the converted file the
photo, so a conversion must not lose what the original held, and the dry
run must promise only what the job will do.
- Linear DNG from a conversion is scene-referred: the pixels are stored in
linear ProPhoto primaries (colours outside sRGB stay positive) and
divided by the power of two that brings their peak under the white
level (at most 4 stops), with BaselineExposure giving it back and
ColorMatrix1/ForwardMatrix1 describing that space. Highlights a RAW
develops above 1 and its wide-gamut colours now read back as written.
Exports keep the clipped linear-sRGB DNG.
- A conversion reads with the managed decoders first for every format they
read natively (RAWs developed at float precision, as on the server) and
with WIC only for what they cannot. A RAW only WIC's Raw Image Extension
develops (8 bits) is refused for TIFF-16 and linear DNG and planned out
as "eight_bit"; JPEG still converts it. Providers say so through
IImageDecoderProvider.DevelopsRawAt8Bits.
- The original's colour space is kept: a JPEG (APP2) or TIFF (tag 34675)
carries its ICC profile, with the values unchanged; a linear DNG gets the
values converted through a matrix/TRC profile; a gray profile converts
to sRGB. Exif Adobe RGB (uncalibrated + R03) and HEIF nclx P3 get an
in-house profile. A space nothing here can keep (CMYK, a lookup-table
profile into a DNG, uncalibrated without R03, HDR nclx) is planned out
as "color_profile". New in-house ICC parser/writer and header reader
for JPEG, PNG, TIFF, HEIF/AVIF and WebP.
- The planner asks every file, whatever tier was recorded (unknown before
the light analysis, or by another host), with the conversion's decoders,
headers only and eight at a time; a RAW the server cannot develop is
"convert_on_pc" in the plan instead of failing its sequence. Photos a
target cannot hold (a JPEG side above 65535, more samples than one
buffer) are planned out as "too_large", and an overflow fails its photo
rather than the job.
- A photo that fails reads in the job log as one catalog sentence by cause
(Archive.Convert.Failed.*), the file named once; the exception's English
text goes to the diagnostics log only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 0ca1e91ea09946d7a55f45695ee58e1a0ff5f779)
Phase 4b was built on phase 4a before its review fixes. Integrated on the reviewed 4a, the
conversion now follows the same rules as filing and the other writers.
- Names: a converted file is named as filing names a photo of its sequence (FrameNaming: the
archive's file template, the frame's context in the sequence with its camera, lens, number
and title, {name} the card's, {ext} the target's, a long name keeping its extension).
Replace through ConvertOptions.FileName; New sequence through the ingest itself
(StagedFrame.NamedAs), which numbers and names the copies in the new sequence. Names stay
unique against every file present, those leaving included, so a Replace never moves onto a
file; a test pins a stray file that keeps its bytes.
- Leases: stage A starts from the sidecar settled under the sequence's lease where the index
has it then (SequenceWriter.ReadLocked), and FrameTrash.ReplaceAsync reads the row again
under the lease, so a folder a Reorganize moved meanwhile is followed, never made again.
A Reorganize the archive waits for keeps the conversion off its sequences (pinned).
- Journals: the replace journal is settled with the others. MassRenamer steps, restores into
a sequence and sequence deletions wait for an unsettled replacement as they wait for a
restore, and so do photo deletions, whose frames version the recovery reads
(FrameTrash.EnsureReplaced); a scan settles it and reconciles nothing meanwhile; a restore
settles its sequence's replace journal first, at the folder the index has under the lease.
- The convert job tells each sequence converted or made as it completes, as a Reorganize
tells each step, so an editor open on it reads it again while the rest of the job runs.
- Desktop: JobKind.Convert gets its row in the settings' job priority list. A click on Apply
that commits the quality no longer starts the same dry run again under the click (as 4a
fixed for Reorganize).
- Panel: a dry run answered during the confirmation with the same plan no longer drops the
confirmed Apply; a different plan is shown with Admin.Convert.PlanChanged (en, it).
- Tests: TrashDialogTests.EmptyQueuesTheJobOfTheConfirmedPlanOnly waits for the command to
end before running it again (a running AsyncRelayCommand ignored the second Execute).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2e0d1d6dcc10575734970bb9c77749f00777c859)
Owner review 2, R7 asks for mass conversion after import on the desktop too, with a choice at
every run between Replace and New sequence. The desktop now uses the engine's conversion, the
same plan and job as the web panel.
- Convert... in the Archive manager's mass operations (the set) and the Library's mass bar (the
selection of one archive; server cards are left out, two archives are refused with their own
reason). The dialog has the format (JPEG, TIFF 16-bit, Linear DNG, the archival default), a
JPEG's quality (1-100, 95) and the mode, which starts unchosen at every open: Apply waits for
it. Each choice has a tooltip that says what becomes of the originals.
- The dry run stays in the dialog and follows the choices: each sequence with its photos and
sizes before and after, the photos that stay as they are with why, the sequences left as they
are (busy, offline, unreadable), a summary and the free space line; a volume without the space
blocks Apply. The mode does not change what converts, so choosing it plans nothing again.
- Apply asks to type the number of photos a Replace replaces, then queues the convert job of
exactly the plan shown; New sequence leaves the originals as they are and asks nothing.
- When a Replace job ends, its toast offers Undo: for each sequence it converted, the newest
Replaced trash entry made while it ran goes back (a sequence changed since gets its originals
as a new sequence). Undo runs once and never from the Windows notification.
- The Library and the Archive screen read the sequences again after a conversion; --capture
renders archive-convert from a sample plan.
- Strings in en and it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 275469284f895fc92e2569339809e18bf59d1d6a)
(cherry picked from commit 76ba41f58983275ae4b1478edd403efb11da7c79)
Owner review 2, R7 asks for mass conversion after import on the web panel too, with what
happens to the originals chosen at every run. The Library's mass bar gets Convert… for the
selection (every sequence after Select all without a filter, else at most a thousand ids,
the same rule as Reorganize, now one helper).
The dialog (convert.js) offers the format (linear DNG, the archival choice, first), the JPEG
quality (shown for JPEG only, 1-100, checked on the field) and the mode, Replace or New
sequence, never preselected, each tooltip saying what happens to the originals. Every change
asks POST /archive/convert for a dry run, one request at a time and debounced while typing;
the table shows per sequence the photos converted, the photos left as they are with why
(what blocks the whole sequence first), and the size before and after, then the totals and
the server's space line. While no mode is chosen the table is planned as New sequence (what
converts does not depend on the mode) and Apply waits; choosing Replace plans again, since the
fingerprint names the mode. Apply confirms Replace by typing the localised word, New sequence
with a plain confirmation, sends the shown plan's fingerprint back and links the queued job;
plan_changed, not_enough_space and nothing_to_convert plan again. Server refusals land on the
field they name.
The trash says what Restore does to a replaced entry (the originals swap back while their
conversions are unchanged) and toasts it; the audit entry archive_converted reads as a sentence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2a09572e3e67ef95a931333c35cd3bb1e818db71)
(cherry picked from commit 1d71a18fa112a7cb39e3e7ced7d7234230eb4453)
Owner review 2, R7 asks for mass conversion after import on the web panel and the desktop,
with a choice at every run between Replace and New sequence. This is the engine and the
server API both UIs build on.
- Core/Conversion: ConvertOptions (JPEG 4:4:4 at quality 1-100, default 95; TIFF-16 sRGB
Deflate with the predictor; linear DNG, the archival choice; converted names keep the
stem and take the target's extension in the old one's case). FrameConverter decodes at
the native tier only, encodes with the in-house writers, writes Exif from the sidecar
(capture time to the tick, offset, exposure) and the original (camera, serial, lens,
modes, GPS), hashes the bytes as made, writes atomically and verifies: read back, the
metadata again, a decode by the server's decoders. ExifWriter now writes the exposure
program, metering mode, flash and white balance. ConvertPlanner: convertible frames,
skips with reasons, size estimates per pixel, the plan's space and fingerprint.
- FrameTrash.ReplaceAsync swaps the files of frames in place: same ids and indices, the old
files and their XMP companions into one Replaced trash entry (records, replacement
hashes, a copy of analysis.json), tombstones aliasing old content to new, proxies of the
swapped frames dropped, under .chronos/replace.pending.json, which the next writer undoes
or completes. Restoring a Replaced entry swaps back while every converted frame is
unchanged (the converted files become a Replaced entry in turn), else the originals come
back as a new sequence.
- MassConverter and JobKind.Convert (19): the dry run (busy, offline, unreadable, space
against ArchiveServiceOptions.FreeSpace), stage A converting into
staging/convert-<job>/ in parallel with each source re-hashed and each staged file
appended to journal/convert-<job>.staged, stage B per sequence all or nothing under the
lease at the planned frames version: Replace, or a new sequence through the ingest with
the source's tags, rating, notes and project. Resumes keep verified staged files; a
sequence changed, busy or with a failed photo is left as it was and fails the job at the
end, the journal kept for a retry.
- POST /api/v1/archive/convert: dry run with the plan, its space line and fingerprint, or a
202 convert job; formats the server cannot read at full resolution are skipped as
convert_on_pc; validated, audited (archive_converted), sequenceChanged converted/created.
The server measures the space volume for the check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 809210d924cfc3f597ecdea26106fb3ff62d3762)
(cherry picked from commit e13d4c0bb1bd9441933b6f3e5b6220e865a7228c)
Round 5 stopped clearing "behind" for rows of a third sequence (neither the one moving nor the
one now holding the old folder). Such a row, an export one sequence saved in another's exports
through the Export folder picker, then stayed at its old path whenever the sequence that moved
into the folder brought an export of the same name, and named that sequence's file (Send exports
would upload it). A file at the old path is never "behind" while the old folder holds another
sequence: it is that sequence's, so every row other than the holder's follows its file.
A resumed render job deleted the output its crashed attempt was writing at the absolute path in
the checkpoint. After another index moved the sequence away and another sequence into the folder
it left, and this index scanned, that path named the other sequence's export. The checkpoint now
keeps the sequence's folder when the output was chosen; a pending output there is rebased into the
folder the sequence is in now, one in the sequence's current exports or outside the archive (an
export folder chosen on a client) is discarded as before, and one anywhere else in the archive is
left alone (the entry renders under another name). Older checkpoints, without the folder, only
discard in the current exports.
Download originals put an original flagged missing back at the path read before the transfer,
with no lease and no check of the folder: after another index moved the sequence, it recreated
the folder it left or filed the photo among another sequence's originals. The restores now run
after the transfers under the sequence's lease, in the folder the index has then, which must hold
the sequence (SequenceFolders.Holds), at each frame's path read under that lease. Otherwise
nothing is restored, the copies stay staged for the next attempt and the job fails with
Errors.Archive.FolderMoved after its other work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ad46ef68180845de4b9b605a4ce2529a148c6f13)
The phase 4a docs were written before the last two fix rounds landed. They
now describe the code at 8c2b9f1b: a sequence left as it was inside a moving
folder is taken along instead of keeping that folder in place; a held plan on
an offline archive keeps its plan and fails as offline; render filing answers
503 folder_moved; a rebase never moves the rows of the sequence that took the
old folder (with its known limitation); every writer refuses a folder another
sequence holds (SequenceFolders.Holds). Three DECISIONS rows added, six
updated; five fix rounds in STATUS and the request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 31d479c5f4dd0b7076b39331246815e95895a1fa)
Round 4 let every row under the old folder follow when that folder holds another sequence
now. When the scan took the new holder first, its own row (already rebased into the old
folder) then followed the moving sequence too and named that sequence's file, leaving its
own export without a row; a second scan did not repair it. Only the moving sequence's own
rows now follow because the old folder is taken, and a row of the sequence holding the old
folder never follows: its export is in its own folder whatever the other one took along
under the same name. The rebase callback now gets the owner of each row.
Writers that file into the folder the index has for a sequence checked only that the folder
existed. After another index moved the sequence away and another one into that folder, Take
server wrote the server's settings into the other sequence's project.json, Save both wrote
this PC's copy into its .chronos, and a render sent for the sequence was filed among its
exports. SequenceFolders.Holds treats a folder whose sidecar names another sequence exactly
like a missing one, and every such writer asks it: settings sync and conflict resolution
(Errors.Archive.FolderMoved), Save both's copy and its clean-up, server render filing (503
folder_moved, the upload kept), export downloads, render jobs as they start, proxies sent and
proxy passes, the deep analysis checkpoint and the editor's project save. A thumbnail pass
refuses a sidecar of another sequence before it opens the pack.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b406a4f6a9a7a3121e9e40289663fb62ee31948e)
An archive open lists the pending rename plans; one journal that was not valid JSON threw out of
ArchiveService.OpenAsync, so the archive (and the server, at boot) did not open until the file was
removed by hand. It is now logged and left in place; its own job fails with the reason instead of
planning again over a half-applied plan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The web panel's archive settings save checked both request templates against
every template rule before the engine ran, so an archive.json saved before the
rules made every save fail, even of the name or proxy size. Only a template that
differs from the stored one is now held to the rules, as ArchiveService already
does, and a TemplateRuleException from the engine (archive.json changed since the
form was read) answers invalid_template with its rule instead of archive_policy.
Exports follow a moved folder correctly in two more cases. Image-sequence exports
are folders, so the rebase now tests Path.Exists instead of File.Exists. An
export left at the old path no longer pins a sequence's row when that path now
belongs to another sequence (its sidecar holds the old folder, or its render row
names the path); the row follows to the new path, so it never names another
sequence's file.
RenderStore throws FolderMovedException when the sequence is not in the folder
the index has. That is transient until this index's next scan, so client render
uploads and render-node results now answer 503 folder_moved, keep the part file
and the node's job, instead of failing them for good with a wrong reason.
Save both and Take server refused because the folder moved now say
Errors.Archive.FolderMoved (try again after the next scan) instead of the
"changed again, choose again" sentence, which repeated until a scan.
Doc wording: the ReorganizeDialogViewModel summary covers a sequence kept whole,
and RenamePlanner.Plan's existsExactly says the own folder is found under at most
one of the two names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit d898798657197d48f4e19b7f776003eb2fc441b5)