feat: owner review 2 phase 4b: mass conversion after import (#13)
CI / Build and test (push) Failing after 3m1s
CI / PostgreSQL 16 integration (push) Skipped
CI / PostgreSQL 17 integration (push) Skipped
CI / Docker image (push) Skipped
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 10s
Release / Build, test and publish (push) Successful in 15m31s
Release / Server image (push) Successful in 1m13s

Convert photos already in the archive to JPEG, TIFF-16 or Linear DNG, from the panel's Library and the desktop's Archive and Library. Each run asks Replace (same frames, originals to the trash, recoverable) or New sequence. A dry run lists what converts, what is skipped and why, size before and after, and free space; the job converts exactly the confirmed photos, resumes, and commits all or nothing per sequence. A conversion never changes what Chronos reads from a photo. Replaced originals are erased only on the archive's own word that their conversion is gone. Desktop TIFFs that WIC showed black or as noise now go to the managed reader; the Edit picker no longer spins a core.

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 #13.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-11-03 10:41:50 +01:00
1 parent 7e4a3b481d
commit efa87f68ce
354 files changed
+24530 -843

No files matched your search

+368 -41
View File
@@ -310,10 +310,12 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st
entries of a confirmed plan, erases nothing when the trash changed since, and is never
scheduled: amended 2026-10-26, R6; move, stored as 14, a Reorganize that applies exactly a
confirmed plan of new folders, titles and file names to sequences of the archive, its target,
and holds the rest of it when paused, cancelled or failed: amended 2026-10-26, R7), target
ids, state (queued, running, paused, done, failed, cancelled), progress (done/total, fps,
eta), log tail, created by, node id, attempts, error, schedule id (the schedule that queued
it; amended 2026-10-26, R10).
and holds the rest of it when paused, cancelled or failed: amended 2026-10-26, R7; convert,
stored as 19, a conversion of exactly the photos a confirmed plan lists, its targets the
sequences, each converted all or nothing into its own frames or a new sequence: amended
2026-10-26, R7), target ids, state (queued, running, paused, done, failed, cancelled),
progress (done/total, fps, eta), log tail, created by, node id, attempts, error, schedule id
(the schedule that queued it; amended 2026-10-26, R10).
- **Schedule** (amended 2026-10-26, R10) — id, system key (set, and unique, on a host's
system schedules, §14.6), name, action (scan, verify, thumbnails, proxies, analysis,
maintenance, backup, cleanup, duplicates, orphans), target (`current`: the host's
@@ -424,8 +426,9 @@ The archive is the source of truth; the database is an index that can be rebuilt
│ ├── archive.json { id, name, schemaVersion, created, layoutTemplates, proxyPolicy }
│ ├── index-snapshot.bin optional accelerator for rebuild (all sidecars concatenated + hash); ignored if stale
│ ├── locks/ lease files for concurrent writers (server + client on same share)
│ ├── journal/ rename-<plan>.json: a mass rename or Reorganize being applied (below; amended 2026-10-26, R7)
│ └── trash/ deleted sequences and photos, kept until Empty (below; amended 2026-10-26, R6)
│ ├── journal/ rename-<plan>.json: a mass rename or Reorganize being applied; convert-<job>.json, .staged, .pins, .photos: a conversion (below; amended 2026-10-26, R7)
│ ├── staging/ copies an import is filing; convert-<job>/<sequence>/: the files a conversion made, until they take their place (below; amended 2026-10-26, R7)
│ └── trash/ deleted sequences and photos, and originals a conversion replaced, kept until Empty; .erased/: what Empty erased that a replaced entry needs (below; amended 2026-10-26, R6, R7)
├── 2026/
│ └── 2026-09-28 Canon EOS R5 - Harbour sunset/ folder = expanded FolderTemplate
│ ├── originals/ IMG_0001.CR2 … names = expanded FileTemplate
@@ -437,7 +440,7 @@ The archive is the source of truth; the database is an index that can be rebuilt
│ ├── project.json render settings (the "project")
│ ├── thumbs.pack packed thumbnails (one file per sequence, indexed; avoids 100k tiny files on SMB)
│ ├── rename-files.json the file renames of a Reorganize a crash interrupted (below; amended 2026-10-26, R7)
│ └── *.pending.json journals of an ingest, a photo deletion or a restore a crash interrupted (below)
│ └── *.pending.json journals of an ingest, a photo deletion, a frame replacement (replace.pending.json, a conversion or its undo; amended 2026-10-26, R7) or a restore a crash interrupted (below)
```
`sequence.json` (canonical, versioned, written atomically):
@@ -447,8 +450,9 @@ tags, rating, notes, status, versions, createdBy, updatedAt, removed? }`. Amende
R6: `removed: [{ sha256, replacement?, reason: Deleted | Replaced, at }]` holds the tombstones
of the photos removed from the sequence (§5 FrameRemoval), left out when there are none;
`frames[].source: { sha256, format, file, size }` names the file a converted frame was made
from, reserved for R7 (read and written, nothing acts on it yet). A build that does not know
either field keeps it and writes it back unchanged.
from: a conversion's Replace writes it, and its undo and a conversion job that resumes read it
(amended 2026-10-26, R7). A build that does not know either field keeps it and writes it back
unchanged.
Trash (amended 2026-10-26, R6). Nothing in it is erased except by *Empty* (§12.5, §14.8):
- `trash/<id>[-<time>[-n]]/` with `<name>.json` beside it: a deleted sequence folder, whole
@@ -458,10 +462,17 @@ Trash (amended 2026-10-26, R6). Nothing in it is erased except by *Empty* (§12.
from sequence `<id>`, each original with its XMP companion when no photo that stays shares
it, and the record: each photo's frame record, each file's former place, size and SHA-256,
the sequence's title and folder, who deleted them, when, and the kind (photos, or replaced
for originals a conversion replaced, R7). A photo never hashed is hashed as it goes; one
whose original was already missing goes with its record alone.
for originals a conversion replaced, R7: such an entry also keeps each photo's replacement
SHA-256, a copy of the sequence's `analysis.json` and the job that made it). A photo never
hashed is hashed as it goes; one whose original was already missing goes with its record
alone.
- `trash/.erasing/`: entries moved aside by Empty before they are deleted, so a listing never
sees half an entry; leftovers are deleted by the next Empty.
- `trash/.erased/<sequence id>.json` (amended 2026-10-26, R7): the record that Empty erased a
deleted sequence (its id, title, entry, when and by whom), written before the folder goes
while a replaced entry of that sequence stays in the trash, and never while the sequence also
lives (this index has it, or a folder's sidecar names it). Each Empty deletes the records no
listed replaced entry needs. The trash never lists them.
- In a sequence's `.chronos/`, `remove.pending.json` is written before a photo deletion's
first move and `restore.pending.json` before a restore's; until the sidecar is written the
entry's record is `<name>.json.pending`, which the trash never lists, restores or empties.
@@ -471,6 +482,22 @@ Trash (amended 2026-10-26, R6). Nothing in it is erased except by *Empty* (§12.
the entry, or the record without the photos the sidecar lists again). A restore into a new
sequence stages each original in `<entry>/.restoring/` (never the archive's staging) and
puts it back on any failure.
- A replaced entry (amended 2026-10-26, R7) goes back by a swap: while every converted frame
still holds its conversion (re-hashed) and names the original as its `source`, the originals
take their frames' place again as a Replace does (below), the converted files going into a
replaced entry in turn and the entry's `analysis.json` back into the sequence; otherwise the
originals come back as a new sequence. *Empty* erases it only while each conversion of its
originals still hashes to its SHA-256 where the archive shows it now; of a conversion deleted
since, every copy the trash still holds must hash to it, and with none left nothing keeps the
entry. The archive is asked, never this host's index alone: the sequence's sidecar where the
index or the entry says it is, in the trash, or found by walking the archive's folders (once
per dry run or Empty, again only for a sequence no longer where the walk found it), followed
through its replaced tombstones. A conversion counts as deleted only on the archive's own
word: a deleted tombstone ending its chain in the sequence's sidecar, the sequence in the
trash, or the trash's record of erasing the sequence (`.erased/`), which outweighs a stale
row of this index but not a live sidecar. Anything else keeps the entry: a sidecar that holds
none of the conversion and no tombstone of it (one rebuilt by adoption), a sequence found
nowhere with no erasure record (the walk may have skipped its folder), a frame never hashed.
Deleting photos writes the sidecar without them (frames version + 1) and with a tombstone of
each SHA-256 no photo that stays holds, and clears what covered the frames (light and deep
@@ -516,7 +543,60 @@ step being one sequence and the sequences nested in a folder that moves with it:
- Proxies (named by frame index), thumbnails (by index and content hash), tombstones and trash
records need nothing; a photo restored from the trash comes back under the name it had.
Rules: originals are immutable (never rewritten; edits are settings); every write of a
Conversion (amended 2026-10-26, R7; §8.7, §12.5, §14.8) writes over no original: Replace
moves each original into the trash, New sequence leaves it where it is.
- The photos a confirmation lists are written whole, before its job is queued, into
`journal/convert-<job>.photos` (one line per sequence, each frame id in plan order); the job
record keeps each sequence's digest alone, so it grows with the sequences, not the photos.
Without that file the job holds each sequence to its whole plan made again (the same digest).
- A `convert` job takes one sequence at a time. Under the sequence's lease, its sidecar settled
where the index has it then, it plans the sequence again and goes on only while the photos the
confirmed plan listed are there with the content confirmed; it pins them in
`journal/convert-<job>.pins` and from then on, a retry included, converts those alone, so
photos received or verified since stay as they are. A sequence another index moved away (its
folder gone, or holding another sequence) is left for the retry after this index's scan.
- Stage A, without the lease: each original is re-hashed against its record, converted and
verified (§8.7) into `staging/convert-<job>/<sequence>/`, several at once, and each staged file
is appended to `journal/convert-<job>.staged`; `journal/convert-<job>.json` records what each
sequence came to and whether the passes it needs were queued. Before each photo the free space
must hold it and every photo started whose converted file has not landed yet (a file lands
whole, by a rename, before it is verified). A resumed or retried job keeps the staged files
whose SHA-256 still verifies, settles a replacement a crash left half-way, and takes a
sequence it had replaced already as converted.
- Stage B, under the lease and while every photo pinned still holds its content, all or
nothing: Replace swaps the files of the frames (next point); New sequence files the converted
copies into a new sequence through the archive ingest (§12.5), and the journal names that copy
as soon as its photos are filed. A retry or resume finishes the copy it named (or finds by its
session key) once that copy holds every pinned photo, whatever changed in the source since; it
never remakes a copy deleted since (the sequence is then changed: plan again). A source that
another conversion copied in the same format after this one was confirmed gets no copy
(outcome superseded, in the job's log) once that conversion is done; while it is not, the
sequence is left for the retry.
- A Replace, and the undo of one, writes `replace.pending.json` in the sequence's `.chronos/`
first. Each swapped frame's original and its XMP companions go into one trash entry of kind
replaced; each converted file comes in under the name filing gives a photo of the sequence
(§7.1, with the target's extension), never onto a file there, those leaving included (`_2`…).
The frames keep their ids and indices; each record takes the converted file's size, SHA-256,
format, upright size and full-resolution tier, orientation 1, no preview, the flags of that
file and those the user set, and a `source` naming the original. The sidecar (its frames
version one higher, analyses, thumbnails and proxies cleared) gains a replaced tombstone per
original naming its replacement, and content that comes back loses its tombstone; then the
index follows, the proxies of the swapped frames are deleted and the passes the frames need
are queued. The journal records its phase (moving, written, undoing) and each frame's new
name: the next writer of the sequence completes a replacement whose sidecar lists a new name
and undoes any other, and an undo that fails stops that writer, as a deletion's recovery
does. Every writer that changes the frames (an ingest, a deletion, a restore, a Reorganize
step, a sequence deletion) settles it first, or waits while it cannot be settled yet (the
trash entry an undo takes its files from is busy); a scan settles it too, and reconciles
nothing in the folder while it stays.
- The job's journals and staging go once every sequence is final. Maintenance keeps a job's
staging while the job is queued, running or paused, removes it at once when the job is done
and otherwise once its files are a day idle, and removes the journal when the job is done. A
job this index does not know (another host's on a shared archive) keeps both while any of
their files was written within 90 days, then both go.
Rules: originals are immutable (never rewritten; edits are settings; a conversion takes an
original out of its sequence only into the trash, amended 2026-10-26, R7); every write of a
sidecar goes to a temp file, `fsync`, rename; the folder name is derived from templates at
import time and never auto-renamed afterwards: only Reorganize, an explicit user action
behind a dry run, moves and renames what is filed, updating sidecars and DB together
@@ -569,7 +649,7 @@ One naming rule for import, upload and Reorganize (amended 2026-10-26, R7):
|---|---|---|---|---|
| JPEG | jpg jpeg jpe jfif | APP1 Exif/XMP, MPF | WIC or managed | managed (baseline + progressive) |
| PNG | png | eXIf, iTXt XMP | WIC or managed | managed |
| TIFF | tif tiff | IFDs | WIC or managed | managed (strips/tiles; none/PackBits/LZW/Deflate/JPEG) |
| TIFF | tif tiff | IFDs | WIC or managed (never WIC for a compression it does not decode, a floating-point predictor or 32-bit integer samples, which it reads as black or noise; amended 2026-10-26, R7) | managed (strips/tiles; none/PackBits/LZW/Deflate/JPEG; gray, RGB and linear RAW samples only: a CMYK, CIELab or palette TIFF is unavailable, never read as gray; amended 2026-10-26, R7) |
| DNG (smartphones: Apple ProRAW, Android, Samsung; DJI; Insta360; Leica; Pentax; Ricoh; GoPro files converted by Adobe software) | dng | IFDs, MakerNote | managed full decode (amended 2026-10-16, R4) | managed full decode |
| Canon | cr2 cr3 | cr2: TIFF; cr3: ISO-BMFF `CMT1..4` | WIC (Raw ext.) → managed CR2 (P1) → embedded preview | managed CR2 (P1) → embedded full-size JPEG (CR3 track 1) |
| Nikon | nef nrw | TIFF | WIC → managed NEF (P1) → preview | managed NEF (P1) → preview |
@@ -617,11 +697,19 @@ dims, delta), `WhiteLevel`, `AsShotNeutral`/`AsShotWhiteXY`, `ColorMatrix1/2` +
- `JpegDecoder` (baseline, progressive, restart intervals, 4:4:4/4:2:2/4:2:0/4:1:1/gray,
12-bit optional, ICC ignored), `JpegEncoder` (baseline, quality 1–100, subsampling
choice, optimised Huffman tables optional, Exif/XMP APP1 embedding).
choice, optimised Huffman tables optional, Exif/XMP APP1 embedding, an ICC profile in APP2
chunks: amended 2026-10-26, R7).
- `PngDecoder`/`PngEncoder` (all colour types, 8/16-bit, Adam7 decode, filters, zlib via
`System.IO.Compression.ZLibStream`).
- `TiffReader`/`TiffWriter` (as prototype: 16-bit TIFF, linear DNG writer with
`PhotometricInterpretation=34892`).
- `TiffReader`/`TiffWriter` (as prototype: 16-bit TIFF, an ICC profile in tag 34675, linear DNG
writer with `PhotometricInterpretation=34892`, scene-referred for a conversion, §8.7: amended
2026-10-26, R7).
- `IccProfile` (amended 2026-10-26, R7): ICC profiles read and written (matrix/TRC and gray,
`curv`/`para` curves, `desc`/`mluc` text), an in-house Adobe RGB (1998)-compatible and a
Display P3 profile, the profiles a conversion makes for the values it writes (a profile's
colorants with the sRGB curve, a gray curve as RGB), and what a photo's headers say of its
colour space (JPEG APP2, PNG iCCP/sRGB, TIFF tag 34675, HEIF/AVIF `colr`, WebP ICCP, Exif
ColorSpace and Interop).
- `GifEncoder` (animated; median-cut palette + Floyd–Steinberg; frame differencing).
- `ApngEncoder`.
- `AviMjpegWriter` (RIFF AVI with `MJPG`, OpenDML index for > 2 GB).
@@ -650,6 +738,70 @@ size and budget, never by sequence length; the self-tests assert this.
`SHFormatDrive` (format card), `ShellExecute("open", url)` (links, Store pages),
`ShellExecute("explore", folder)` (reveal in Explorer). Nothing else.
### 8.7 Conversion (amended 2026-10-26, R7; §7, §12.5)
A conversion makes each photo a JPEG (baseline, 4:4:4, optimised Huffman tables, 8-bit,
quality 1–100, default 95), a 16-bit TIFF (RGB, Deflate with the predictor) or a linear DNG
(16-bit LinearRaw, lossless JPEG tiles), the archival choice.
- Decoding: at full resolution only, never from an embedded preview, upright. The managed
decoders come first for every format they read natively (a RAW developed in-house at float
precision, the same on every host), WIC only for what they do not read. A 16-bit target never
takes a RAW through a decoder that develops it at 8 bits (WIC's Raw Image Extension): such a
RAW converts to JPEG only. The server decodes with the managed decoders alone, so it converts
no CR3, HEIC or RAW body its developer does not support, nor a CMYK, CIELab or palette TIFF,
an unsupported compression or a file past their size limits: its dry run says to convert those
photos on a PC, which reads them through WIC. A photo another host flagged unreadable is asked
again where the conversion has other decoders (WIC on a PC) and planned when they decode it at
full resolution; a corrupt one stays out everywhere. WIC is never used for a TIFF whose
compression is not 1–5, 7, 8, 32773 or 32946, whose predictor is other than none or the
horizontal one on integer samples, or whose integer samples exceed 16 bits (WIC gives black or
noise for them without an error), in conversions and in every other desktop decode: the
managed reader takes it, or it is unavailable. A conversion's WIC probe reads the file's headers (the decoder, the
first frame's upright size, the pixel format), so the size bounds apply to what only WIC
reads; a file it cannot open is missing or held, never unreadable.
- A linear DNG keeps what a RAW develops: the values are stored in linear ProPhoto primaries
(colours outside sRGB stay positive), divided by the power of two, at most 2^4, that brings
their peak under white, which BaselineExposure gives back; ColorMatrix1 and ForwardMatrix1
describe that space (illuminant D65, AsShotNeutral 1/1/1). The as-shot white balance is baked
in and values below black are clipped. An export's DNG stays clipped linear sRGB (§11.3).
- Colour: what Chronos reads from a photo never changes. Its decoders read no profile: they take
code values through the sRGB curve and a float TIFF's values as they are. A converted file
holds the values they read from the original, as they read them back, within what the target
holds (a JPEG or TIFF-16 holds 0..1 and clips beyond; a DNG up to 4 stops above white), and
says truthfully what those values are:
- A JPEG or TIFF-16 keeps the codes of an RGB profile's code values and carries that profile.
Float values are written as sRGB codes with a profile made for them: the original's
colorants and media white with the sRGB curve ("<description> (sRGB curve)"). A lookup-table
profile named sRGB is carried; other float values in a lookup-table profile are refused. A
gray profile's codes are kept, its curve carried as an RGB profile with sRGB's colorants
("<description> (RGB)"); linear gray needs no profile.
- A linear DNG, whose matrices Chronos develops it with too, takes only values that are sRGB's
as read: no profile, an sRGB profile, float values in sRGB's primaries whatever the curve,
linear gray, gray codes on the sRGB curve. Any other profile (Adobe RGB, Display P3,
ProPhoto, a gamma-1.0 profile's code values) is refused as `color_profile`; TIFF-16 and JPEG
convert those photos with their profile.
- A matrix/TRC profile is sRGB by its numbers (its matrix within 2e-3 of sRGB's, its curves
within 2e-3 of the sRGB curve), by its name only when it has no colorant tags at all; one
whose colorants convert nothing, or that has no curves, is never sRGB.
- Exif Adobe RGB (uncalibrated with Interop R03) and a HEIF nclx box with P3 primaries get the
in-house profiles. Refused for every target: CMYK, Lab and other non-RGB profiles, Exif
uncalibrated without R03, other nclx primaries or an HDR transfer, a profile that does not
parse. A photo that records no colour space is sRGB.
- Damaged values: a photo whose decoded pixels hold NaN or infinite values fails as damaged
data, and nothing is written.
- Metadata: capture time (to the tick), offset, exposure, f-number, ISO, focal length, bias and
white balance from the sidecar; camera, serial, lens, 35 mm focal length, exposure program,
metering mode, flash, GPS, artist and copyright from the original, the sequence's camera and
lens where it names none. MakerNote and XMP are not carried; the orientation is 1.
- Size: a photo is not converted when the target cannot hold it (a JPEG side above 65535) or
the server's decoders could not read it back (a JPEG above 2^28 pixels; a TIFF-16 or DNG
above 2^29 samples, about 179 MP). Sizes are weighed without overflow, so a damaged header's
absurd size is too large, never a wrapped number.
- Each converted file is hashed as it is made and written atomically, then read back (the same
size and SHA-256), its metadata read again (format, capture time and offset) and decoded by
the server's decoders at full resolution and size; a file that fails any of these is deleted
and its photo fails.
---
## 9. Metadata model and parsers (`Chronos.Core/Metadata`)
@@ -669,7 +821,9 @@ WhiteBalance mode + Kelvin if present, Flash, Orientation, dimensions, Make/Mode
Lens, GPS (lat/lon/alt), Artist/Copyright, Rating/Label from XMP, `Software`. All parsers
are fuzz-safe (no exception escapes; malformed input yields partial metadata + a warning).
`ExifWriter` (prototype) is kept for proxies/exports: writes a minimal, valid Exif block.
`ExifWriter` (prototype) is kept for proxies, exports and converted photos: writes a minimal,
valid Exif block, with the exposure program, metering mode, flash and white balance when known
(amended 2026-10-26, R7).
---
@@ -864,9 +1018,10 @@ player smoke test on Windows CI.
status chips: `✓` analysed, `▣` proxies, `▶n` renders, `☁` synced/origin, `!` warnings.
Hover reveals quick actions: Open, Analyse, Render preset, Sync.
- Multi-select → mass actions bar (Analyse, Build proxies, Verify, Tag, Rate,
Reorganize…, Upload, Download, Delete, Export list as CSV). Reorganize… (amended
2026-10-26, R7; formerly Move) takes the selected sequences of one archive, never a
server-only one, into the dialog of §12.5.
Reorganize…, Convert…, Upload, Download, Delete, Export list as CSV). Reorganize… (amended
2026-10-26, R7; formerly Move) and Convert… (amended 2026-10-26, R7) take the selected
sequences of one archive, never a server-only one, into their dialogs of §12.5; a selection
of two archives is refused with the reason.
- Filters are chips; saved views (e.g. "Night, 4K, not rendered"); search is instant
(indexed columns); everything virtualized (in-house `VirtualizingWrapPanel`).
- Photos deleted from a sequence (amended 2026-10-26, R6; on the admin panel, §14.8, or by
@@ -938,7 +1093,7 @@ player smoke test on Windows CI.
│ ● SD 128 GB EOS R5 card A ▲ │ Destination (•) Archive ( ) Folder [D:\Shoots …] ( ) Server ☁ "Studio NAS" │
│ ● microSD 64 GB GoPro 12 │ Scan [✓] Subfolders Sessions [✓] gap [45] min · min [8] frames [✓] Verify hashes │
│ ○ E:\ no DCIM │ Names {year}/{date} {camera} / {date}_{time}_{n:0000} → 2026/2026-09-28 Canon EOS R5/2026-09-28_18-02-11_0001.CR2 │
│ ○ Folder… │ On existing (•) Skip ( ) Rename ( ) Overwrite Convert (•) Copy ( ) TIFF-16 ( ) Linear DNG ( ) JPEG │
│ ○ Folder… │ On existing (•) Skip ( ) Rename ( ) Overwrite │
│ │ After import (•) Keep card ( ) Delete imported ( ) Format card [✓] Eject [✓] Deep analysis │
│ [✓] Import automatically when │ Plan 3 sessions · 4,812 photos · 96.2 GB · 12 min [Show plan] [ Import ▶ ] │
│ a known card is inserted │ │
@@ -963,6 +1118,11 @@ player smoke test on Windows CI.
panel have no Group choice.
- Copy with hash while streaming; verify by re-reading destination; only then delete or
format (OS dialog); eject via `IOCTL_STORAGE_EJECT_MEDIA` after `FSCTL_LOCK_VOLUME`.
- Import copies every photo byte for byte and converts nothing (amended 2026-10-26, R7; the
sketch's former *Convert* row is gone): deleting imported photos and formatting the card
need archived copies that re-hash to the card's files, which a converted file never does,
and originals are immutable. Converting is a separate, explicit step after import, behind a
dry run (*Convert…*, §12.5, §14.8); a photo converted since keeps its card copy (§13).
- Destination "Server" streams frames through the client to the server (§14.4); the
server confirms each hash before the client counts it as imported.
- Auto-import on insertion (per card), with the OS toast "Card X detected — Import".
@@ -977,7 +1137,7 @@ player smoke test on Windows CI.
│ Index health: ✓ sidecars 412/412 · ⚠ 3 sequences without proxies · ⚠ 1 unverified since 90 days │
│ Recent maintenance: 2026-09-20 verify ✓ · 2026-09-01 vacuum ✓ │
├──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Mass operations on filtered set (412): [Analyse] [Proxies] [Thumbnails] [Verify] [Reorganize…] [Retag] [Export CSV] [Delete] │
│ Mass operations on filtered set (412): [Analyse] [Proxies] [Thumbnails] [Verify] [Reorganize…] [Convert…] [Retag] [Export CSV] [Delete] │
```
Operations: **Scan** (incremental, mtime/size), **Rebuild index** (from sidecars; falls
@@ -1008,6 +1168,19 @@ those entries and nothing when the trash changed since; an entry that changes wh
is kept, and the job then fails after erasing the others. It is the only way the product
erases trash entries; no schedule runs it (§14.6).
Originals a conversion replaced (amended 2026-10-26, R7; §7) are listed as *Replaced
originals*. *Restore* swaps them back into their sequence while its converted frames are
unchanged, the conversions going to the trash in turn, and otherwise brings them back as a
new sequence. *Empty…*'s list names first, wherever the trash lists them, the entries whose
conversion the archive itself shows deleted since (§7; *conversion deleted*: they may hold the
last copy of their photos), the others filling its six lines and the rest counted. The job
keeps, each logged with why and what settles it, an entry changed since the plan, one whose
sequence is busy, one whose conversion no longer matches, one with a photo never verified
(verify the sequence), one where a sidecar that may hold the sequence is missing or
unreadable (scan the archive), one whose sequence the index lists but the archive no longer
holds (rebuild the index), and one whose conversion's fate the archive does not show (restore
it to keep its photos; a frame missing or corrupt, which no verify hashes, counts here).
*Reorganize…* (amended 2026-10-26, R7; it replaces Rename… and Move…) applies new templates
to sequences already filed: the set (online), the Library's selection (§12.2), or every
sequence of the archive from the toast of Settings › Archive (§12.8). The admin panel offers
@@ -1052,6 +1225,59 @@ the same (§14.8), through the same engine and job.
Archive and Library screens read the archive again when it ends; an editor open on a
sequence it changed reloads where the sequence is now after that sequence's step.
*Convert…* (amended 2026-10-26, R7; §7, §8.7) converts the photos of sequences already filed
to JPEG, 16-bit TIFF or linear DNG: the set (online), or the Library's selection (§12.2). The
admin panel offers the same (§14.8), through the same engine and job.
- An in-window dialog: Format (JPEG, TIFF 16-bit, Linear DNG; Linear DNG, the archival choice,
chosen first), Quality (JPEG only, 1–100, 95) and Mode, *Replace* (the converted files take
the photos' place in their sequences; the originals go to the archive's trash, restorable
until it is emptied) or *New sequence* (converted copies in a new sequence beside each source;
the originals stay as they are). The mode is chosen at every run: it starts unchosen at every
open and is never remembered. Each choice's tooltip says what becomes of the originals.
- The dry run (nothing touched) follows the choices (400 ms after typing the quality; Enter at
once) and lists each sequence that converts, skips photos or stays whole: its photos and size
before → after (an estimate), the photos that stay as they are and why (already in that
format; a format this computer cannot read at full resolution; read only from an embedded
preview; a RAW developed here at 8 bits only, for a 16-bit format; a colour profile the format
cannot keep, for a linear DNG any but sRGB (§8.7); larger than the format holds or Chronos
reads back; unreadable; missing; never verified; held open by another program or not
openable), or why the whole sequence stays (a job works on it, or a conversion of it waits;
the archive offline or read-only; its sequence file unreadable). With New sequence, the photos
a copied sequence skips are *not copied* into its new one. A summary ("12 of 36 change · 3,600
photos · 41 GB → 32 GB · 20 skipped") and the space line follow ("Needs 12 GB, free 340 GB":
the estimate with a 15 % margin and a 512 MiB reserve, against the free space where the
conversion writes); a volume without the space blocks Apply. The mode does not change what
converts, so choosing it plans nothing again.
- *Apply* (enabled for the dry run of the choices on screen when it converts something and the
space is there, once a mode is chosen, which is asked last) asks a Replace to type the number
of photos it replaces, and confirms a New sequence with how many photos the new sequences
lack; it then queues the *Convert* job of exactly that plan at user priority, and the dialog
closes. A conversion of one of its sequences already queued or running refuses it: the dry
run is made again and shows those sequences busy. Cancel is the default button.
- The job (desktop and server) converts one sequence at a time, all or nothing: the photos the
dry run listed alone, each only while it holds the content confirmed; photos received since
stay as they are. It checks the free space before it starts, before each sequence and before
each photo (counting every photo still being written), and stops before the volume fills.
Paused, resumed or retried in Jobs, it keeps what it converted. A sequence whose confirmed
photos changed is left as it is, and a retry leaves it too (plan again); one busy, moved away
by another program or with a photo held open waits for the retry; one with a photo that cannot
be converted is left as it was, what it converted kept for the retry. The job's log says each,
and the job fails at the end saying how many.
- New sequence: titled "title (JPEG|TIFF|DNG)", in a folder from the archive's template, its
photos named as filing names them, owned as its source is, with its source's tags, rating,
notes and project (the positions on photos it lacks wait as pending frames). It holds the
converted copies alone; the job log says how many photos stayed in the source alone. A retry
finishes the copy the job made and never makes a second; a source another conversion copied
in the same format since this one was confirmed gets no copy (the job log says so), and waits
for the retry while that conversion has not finished.
- When a Replace job ends, its toast offers *Undo* (once, never from the Windows notification):
the replaced entries that job made go back (swapped back, or as a new sequence for one that
changed since). Later, *Trash…* › *Restore* does the same, and the admin panel's trash view
for a conversion the server ran.
- A running or paused conversion makes its sequences busy. The Library and Archive screens read
the sequences again when it ends (a failed one converted the others); an editor open on a
converted sequence reloads.
### 12.6 Jobs
Two tabs, a *Queue | Scheduled* segmented control first in the toolbar (amended 2026-10-26,
@@ -1170,6 +1396,9 @@ update check on start (§18) runs whatever screen is open.
its sequence carries, as Reorganize names it (amended 2026-10-26, R7).
- Post-actions: keep / delete imported files (only those verified) / format card (OS
dialog) / eject; run deep analysis automatically (default on, background, low priority).
A photo whose archived frame a conversion replaced since no longer matches its card file,
so a delete keeps it on the card and a format is refused while it is there (amended
2026-10-26, R7).
- Failure handling: card removed mid-copy → partial files deleted, plan resumable on
re-insert; errors listed per file, never a modal per error.
@@ -1255,6 +1484,7 @@ POST /api/v1/nodes/register · POST /nodes/{id}/heartbeat · POST /nodes/{id}/
GET/PUT /api/v1/archive/settings · POST /archive/scan · /rebuild · /verify · GET /archive/stats · POST /archive/maintenance (admin)
POST /api/v1/archive/reorganize {sequenceIds|all, folderTemplate?, fileTemplate?, titleTemplate?, dryRun, fingerprint?} → plan | 202 move job (admin)
POST /api/v1/archive/convert {sequenceIds|all, target, quality?, mode, dryRun, fingerprint?} → plan | 202 convert job (admin)
GET /api/v1/archive/trash · POST /archive/trash/{name}/restore · POST /archive/trash/empty {names?, dryRun, fingerprint} (admin)
GET /api/v1/i18n/{culture} strings for the web admin
```
@@ -1297,14 +1527,18 @@ Library and trash (amended 2026-10-26, R6):
another's), `folder_in_use`; 422 `trash_mismatch` (no file matches its record any more, or a
deleted sequence's own sidecar no longer names it); 503 `archive_offline`. Audited
`trash_restored`; publishes `sequenceChanged` `created` (a sequence, or a new one) or
`frames`.
`frames`. A replaced entry (amended 2026-10-26, R7) answers kind `replaced`, with
`newSequence` false once its originals swapped back in place of their conversions, true when
they came back as a new sequence.
- Empty: a dry run answers the entries measured on disk, their photos, files and bytes, the
plan's `fingerprint` and the names asked for that the trash does not hold (`unknown`); the
erase sends the fingerprint back and answers 202 with the `empty-trash` job. Errors: 400
`bad_request` (`names`, `fingerprint`); 409 `trash_changed` (details: the fingerprint now),
`job_unavailable`; 503 `archive_offline` (offline, and for the erase also read-only; the
listing answers it too, offline). The request is audited `trash_empty_requested`; what the
job erased is in its log.
plan's `fingerprint` and the names asked for that the trash does not hold (`unknown`); a
replaced entry whose conversion the archive shows deleted carries `conversionDeleted: true`,
which the fingerprint covers (amended 2026-10-26, R7). The erase sends the fingerprint back
and answers 202 with the `empty-trash` job. Errors: 400 `bad_request` (`names`,
`fingerprint`); 409 `trash_changed` (details: the fingerprint now), `job_unavailable`; 503
`archive_offline` (offline, and for the erase also read-only; the listing answers it too,
offline). The request is audited `trash_empty_requested`; what the job erased, and why it
kept an entry, is in its log.
- The manifest gains `removed: [{sha256, replacement, reason: deleted|replaced, at}]` (null
when there are none; covered by its ETag, since a deletion moves the frames version).
@@ -1337,10 +1571,11 @@ Reorganize (amended 2026-10-26, R7; ManageArchive; §7, §12.5, §14.8):
photo count, frames version and how many of their photos are hashed; the title of the others
inside their folders. The same dry run again, and its confirmation, take the kept plan. A
plan is made apart from its request (one a proxy cuts off leaves it to be made, and asking
again waits for it), at most 2 at once and 8 kept or being made; one still being made 15
minutes after it was asked, let go for newer ones, or when the server stops is stopped, and
its requests answer 503 `plan_dropped`. A change made on disk alone is not in the stamp: the
confirmation then answers 202, and the job, which plans again, fails without changing anything.
again waits for it), at most 2 at once and 8 kept or being made (Convert's dry runs counted,
R7); one still being made 15 minutes after it was asked, let go for newer ones, or when the
server stops is stopped, and its requests answer 503 `plan_dropped`. A change made on disk
alone is not in the stamp: the confirmation then answers 202, and the job, which plans again,
fails without changing anything.
- `invalid_template`, here and from `PUT /archive/settings`: the details name the field and,
after a colon, the rule a template that parses breaks (`folderTemplate:reserved_folder`,
`fileTemplate:file_separator`, `fileTemplate:extension`, `fileTemplate:not_unique`), the
@@ -1358,12 +1593,53 @@ Reorganize (amended 2026-10-26, R7; ManageArchive; §7, §12.5, §14.8):
answers 503 `sequence_busy` while the sequence is held, 404 `frame` when the sequence or its
folder is gone, or the folder is another sequence's.
Convert (amended 2026-10-26, R7; ManageArchive; §7, §8.7, §12.5, §14.8):
- The request names exactly one of `sequenceIds` (1–1,000) and `all`, a `target` (`jpeg`,
`tiff16`, `linear-dng`), a `quality` (1–100, default 95; it counts for a JPEG only) and a
`mode` (`replace` or `new-sequence`). A dry run answers `{target, quality, mode, steps,
sequences, photos, skipped, bytesBefore, bytesAfter, space, fingerprint}` and changes nothing:
a step per sequence asked, in order, `{sequenceId, title, folder, framesVersion, photos,
bytesBefore, bytesAfter (an estimate), skipped: [{reason: same_format|convert_on_pc|
undecodable|missing|unhashed|eight_bit|color_profile|too_large|inaccessible, photos,
message}], blocked: [{reason: busy|offline|unreadable, message}]}`, each message in the
request's language. `convert_on_pc` is a format or file the server cannot read at full
resolution ("convert these photos on a PC"); of a sequence `new-sequence` copies, a message
says the new sequence lacks those photos. `space` is `{required, free, enough, message}`:
the estimate × 1.15 plus 512 MiB, counted in both modes, against the free space where the
conversion writes (the tighter of the space path's volume and the archive's own, §14.9).
- The change sends the dry run's fingerprint back and answers 202 with the `convert` job, whose
parameters name each sequence's digest (its photos are kept beside the job's journal, §7).
Errors: 400 `bad_request` (`sequenceIds`, `target`, `quality`, `mode`, `fingerprint`); 404
`not_found` (`sequence`); 409 `plan_changed` (details: the fingerprint now; none when a
conversion of these sequences was queued meanwhile), `nothing_to_convert`, `not_enough_space`
(details: the bytes needed), `job_unavailable`; 503 `archive_offline`, `plan_dropped`. Audited
`archive_converted` (sequences · photos · target · mode). The job publishes `sequenceChanged`
`converted` for each sequence whose frames it replaced and `created` for each new sequence, as
each one completes.
- The fingerprint is a SHA-256 of the options, the mode, and each sequence with its frames
version, its photos' count and bytes, their digest (each frame id with the SHA-256 of its
content), what it skips and what blocks it.
- The server keeps a dry run as it keeps Reorganize's, in one cache for both (2 made at once,
8 kept, 5 minutes, stopped after 15 with `plan_dropped`), keyed by the archive, the selection,
the target with the quality that counts (none for a lossless target) and a stamp of the index:
Reorganize's, and of the planned sequences' photos their count, sizes, formats, pixel sizes
and how many are flagged missing, corrupt, preview-only or undecodable. Not the mode, which is
set on the kept plan, nor the busy sequences and the free space, measured again at every
request. A plan made while the archive was offline is not kept. A confirmation takes only the
plan kept for the index as it is now and never plans inside its own request: with none kept
it answers 503 `plan_dropped` (ask the dry run again), with a kept plan that differs 409
`plan_changed`. A change made on disk alone is found by the job, which converts the photos
confirmed only while each holds the content confirmed.
Uploads (amended 2026-10-26, R3, R6): `server/info` lists `extensions`, the photo file
extensions the archive files (lower case, no dot), which the admin panel's dialog keeps to. A
frame upload whose file name starts with `.` is 400 `invalid_file_name`. A start whose
SHA-256 the target sequence tombstoned (and none of its frames holds) answers 200
`alreadyExists` without a `frameId`, unless `restore` is true; the completion checks again
unless `?restore=true` and answers 409 `photo_removed`, the upload cancelled (§14.4).
unless `?restore=true` and answers 409 `photo_removed`, the upload cancelled (§14.4). An
original a conversion replaced in the target sequence is tombstoned too; sent with `restore`,
it files nothing and its completion answers the frame that holds its conversion (amended
2026-10-26, R7).
Schedules (amended 2026-10-26, R10; ManageArchive, every change audited): `PUT` and
`PATCH` change the fields given; an invalid field is 400 `invalid_schedule` with the field
@@ -1411,6 +1687,14 @@ whose file name starts with `.` (the AppleDouble `._` files a Mac leaves on card
files) is refused for every client (400 `invalid_file_name`), as the archive scanner leaves
such files out.
Replaced photos (amended 2026-10-26, R7): a photo a conversion replaced in a sequence is in it
as its conversion. The ingest answers its original (a card or a folder imported again, a
download, an upload sent with `restore`) as a duplicate of the frame that holds the conversion,
followed through later conversions, and keeps the tombstone that makes sync count both as one
photo; once no such frame is intact, the original is filed again. A batch files nothing into a
sequence while a restore from the trash or a frame replacement of it is not settled (its trash
entry busy): an upload's completion answers 503 and the client tries again.
The admin panel uploads through the same path (amended 2026-10-26, R3; the dialog, §14.8):
- It hashes each photo in the browser with an in-house incremental SHA-256 (FIPS 180-4,
`sha256.js`) in a same-origin module worker (`hash-worker.js`, under the panel's
@@ -1456,17 +1740,29 @@ Removed photos (amended 2026-10-26, R6). A photo deleted on one side leaves a to
no upload of a photo the server deleted, no download of one this PC deleted; sync never
deletes local files either way. A tombstone leaves a photo out only while its own side holds
no matching photo (by hash, or by size and capture time while unhashed), so a duplicate that
stays or a file put back by hand still syncs. A photo replaced by a converted file (R7)
counts as its replacement on both sides, an alias followed up to 8 steps, for the
comparison, the transfers and the frame positions. Content known only once hashed is checked
then: a download skips an unhashed server frame this PC deleted (or holds as its
replacement), and an upload skips an unhashed local frame the server deleted and then runs
the archive verify, so the index gets the hashes and the next comparison leaves it out.
stays or a file put back by hand still syncs. A photo replaced by a converted file (R7) is
the same photo as its replacement on both sides, for the comparison, the transfers and the
frame positions (below). Content known only once hashed is checked then: a download skips an
unhashed server frame this PC deleted (or holds as its replacement), and an upload skips an
unhashed local frame the server deleted and then runs the archive verify, so the index gets
the hashes and the next comparison leaves it out.
Known limitations: until the server verifies such a frame, the sync table still counts it as
missing here and *Download* fetches and drops it each time; a photo never hashed whose
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.
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,
under the smallest of their SHA-256s; a deletion on either side covers every encoding. Linking
a local sequence to a server one by content and the proxies this PC sends follow them (a frame
this PC converted makes the proxy of the server's original). A download for a frame flagged
missing here whose photo the server holds only in another encoding puts that file in the
frame's place (the same id, nothing to the trash, a replaced tombstone linking the two), after
the transfers and only in the folder the index has for the sequence, and queues the passes the
swap cleared even when the job is stopped meanwhile; a frame that changed meanwhile keeps its
place and the copy is dropped.
Folders moved by another program (amended 2026-10-26, R7). When a desktop and a server share
an archive, a Reorganize by one index (or a folder moved by hand) is found by the other's next
scan, which moves the sequence's row, its frames and the paths of the exports that moved with
@@ -1705,6 +2001,35 @@ Reorganize (amended 2026-10-26, R7), the panel's way to the Reorganize of §12.5
audit log and the Dashboard read "… reorganized the archive · N sequences · M files renamed
· templates".
Convert (amended 2026-10-26, R7), the panel's way to the Convert of §12.5 through
`POST /archive/convert` (§14.3):
- The Library's selection bar has *Convert…*, after *Reorganize…*, for the same selection: up
to 1,000 sequences, or every sequence after *Select all* without a filter (one plan, one job).
- The dialog: Format (JPEG, TIFF-16, Linear DNG, the archival choice, chosen first), Quality
(JPEG only, 1–100, 95) and Mode (Replace or New sequence), never preselected; each choice's
tooltip says what becomes of the originals. Each change asks the server for a dry run, one at
a time (400 ms after typing the quality). Until a mode is chosen it is asked in Replace's
words; New sequence asks again, answered from the plan the server keeps. The table shows each
sequence, 200 at a time: photos converted, those left as they are with why (what blocks the
whole sequence first; *Not copied* with New sequence) and the size before → after; then the
totals and the server's space line. A dry run a proxy cut off is asked again every 2 s for up
to 16 minutes, the totals saying how long it takes.
- The dialog's *Convert…* (enabled while the table is the plan of the fields, converts
something, has the space and a mode is chosen; its tooltip says what is missing) asks a
Replace to type the word "replace" in the panel's language, and confirms a New sequence with
how many photos the new sequences lack, each sequence listed with its own count. It then
asks the dry run again (Close stays: nothing is sent yet) and sends that plan's fingerprint
only while it is the one confirmed; the toast offers *Open job*. `plan_changed`,
`plan_dropped`, `not_enough_space` and `nothing_to_convert` show the new plan and the button
waits; a request that got no answer is not sent again, as its job may be queued (the Jobs
page says).
- The trash view lists replaced originals as *Replaced*, whose *Restore* swaps the originals
back in place of their conversions while those are unchanged, else restores them into a new
sequence. *Empty…* lists first the entries whose conversion the archive shows deleted, each
saying so.
- The audit log and the Dashboard read "… queued a conversion · N sequences · M photos ·
format · mode".
Upload (amended 2026-10-26, R3): Library › *Upload* (no sequence) and a sequence's *Add
photos* open the upload dialog (§14.4), a module the pages import only on demand.
- Target: the given sequence, or a choice between an existing sequence (a search box, then a
@@ -1743,7 +2068,8 @@ at first login), `CHRONOS_ARCHIVE_PATH=/archive`, `CHRONOS_DATA_PATH=/data`,
`CHRONOS_SPACE_PATH` (`SpacePath` in `server.json`; optional: a folder, e.g. `/space`, whose
volume's free space the admin panel shows instead of the archive's; one that cannot be
measured falls back to the archive's with one warning, logged at start and again only once
it has worked in between; uploads always check the archive's own volume, §14.4),
it has worked in between; uploads always check the archive's own volume, §14.4, and a
conversion the tighter of the two, §14.3: amended 2026-10-26, R7),
`CHRONOS_DB=postgres|sqlite` (Linux: postgres only), `CHRONOS_DB_HOST`, `CHRONOS_DB_PORT=5432`,
`CHRONOS_DB_NAME`, `CHRONOS_DB_USER`, `CHRONOS_DB_PASSWORD`, `CHRONOS_DB_SSLMODE=prefer`,
`CHRONOS_HTTP_PORT=8080`, `CHRONOS_HTTPS_PORT=8443`, `CHRONOS_TLS_MODE=auto|pem|proxy`,
@@ -2209,6 +2535,7 @@ questions asked and the answers; DECISIONS rows give the reasons.
| 2026-10-26 | Owner review 2, R3 | §14.3, §14.4, §14.8 | Upload from the admin panel into an existing or a new sequence (file picker, drag and drop, no folders), hashed in the browser by a self-tested in-house SHA-256 in a module worker, the capture time read from Exif, sent in resumable chunks through the upload API and verified by the server; `server/info` lists the photo extensions; hidden dot files are refused for every client. |
| 2026-10-26 | Owner review 2, R7 (Reorganize) | §5, §7, §12.2, §12.5, §12.8, §14.3, §14.5, §14.8 | Reorganize on the desktop (Archive manager, Library, the toast of Settings › Archive) and the admin panel (Library, the toast of Archive): folder, file and title templates applied to sequences already filed, behind a dry run that lists each sequence's changes, the photos that keep their names and why (in place outside `originals/`, never hashed, missing) and the sequences that stay whole (unreadable sidecar); applied by the `move` job of exactly the confirmed plan (fingerprint), which holds the rest when paused, cancelled or failed and lets a sequence still receiving photos keep its file names; crash-safe plan and file journals (two-phase renames through hidden temporary names, recovery by the next writer); a sequence of the plan left as it was inside a moving folder goes with it; the index, frames and exports follow a moved folder in one transaction, on this index and at another index's next scan; writers take the folder under the lease, never create a left one again and never write into a folder another sequence took; `POST /api/v1/archive/reorganize` with a kept, bounded plan cache and `sequenceChanged` `reorganized`; Rename… and Move… replaced. |
| 2026-10-26 | Owner review 2, R7 (naming) | §7.1, §13, §14.3 | One naming rule for import, upload and Reorganize: the sequence's camera and lens, `{n}` its place, a frame without a time at the sequence's start; template rules everywhere a template is typed or sent (no folder level scans skip, one a value such as a title gives escaped with `_`; a file template keeps the extension, tells photos apart, holds no slash; long names shortened before `.{ext}`; titles as text), held to a template only when it is given anew; `invalid_template` names the rule. |
| 2026-10-26 | Owner review 2, R7 (conversion) | §5, §7, §8.1, §8.3, §8.7, §9, §12.2, §12.4, §12.5, §13, §14.3, §14.4, §14.5, §14.8, §14.9 | Convert after import on the desktop (the Archive manager's set, the Library's selection) and the admin panel (the Library's selection): JPEG with a quality, TIFF-16 or linear DNG (the archival choice, scene-referred so a RAW's highlights above white and colours outside sRGB survive), Replace or New sequence chosen at every run and never remembered, behind a dry run that lists each sequence's photos, sizes and the photos that stay as they are with why, and the free space where the conversion writes; Replace confirmed by typing; the `convert` job (stored as 19) converts exactly the photos confirmed, one sequence at a time and all or nothing, resumable through its journals and staging, never twice at once; full-resolution decodes only (the managed decoders first, never a 16-bit file from an 8-bit RAW development; the server leaves what it cannot read to a PC), what Chronos reads from a photo never changed (profiles carried, a linear DNG of sRGB values only), Exif carried, every file verified by the server's decoders; Replace swaps the files of the frames in place under a crash-safe journal, the originals going into a replaced trash entry that Undo or Restore swaps back and that Empty erases only while the archive on disk shows each conversion intact, or deleted on its own word (a tombstone, the trash, an erasure record); import still copies byte for byte and the card keeps a converted photo's copy; sync and the ingest count every encoding of a photo as one; `POST /api/v1/archive/convert` with the plan cache it shares with Reorganize, `sequenceChanged` `converted` and `created`, the audit `archive_converted`. |
## Appendix A — `CLAUDE.md` content (create verbatim in Phase 0, keep updated)