From 01d0668ac5f5e9384437c653422733294b7a4adf Mon Sep 17 00:00:00 2001 From: Alberto Balbo Date: Tue, 27 Oct 2026 14:16:44 +0100 Subject: [PATCH] docs: BRIEF, DECISIONS, CHANGELOG and STATUS for owner review 2 phase 3 Co-Authored-By: Claude Opus 5.5 --- docs/BRIEF.md | 297 +++++++++++++++++++-- docs/CHANGELOG.md | 51 ++++ docs/DECISIONS.md | 24 ++ docs/STATUS.md | 14 +- docs/requests/2026-10-26-owner-review-2.md | 4 +- 5 files changed, 367 insertions(+), 23 deletions(-) diff --git a/docs/BRIEF.md b/docs/BRIEF.md index 6ee61eaf..4440aaf9 100644 --- a/docs/BRIEF.md +++ b/docs/BRIEF.md @@ -306,7 +306,9 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st width, height, fps, duration, bytes, created, produced by (client id / server / node). - **Job** — id, kind (scan, rebuild, verify, light-analyse, deep-analyse, proxies, thumbs, render, import, upload-commit, maintenance; backup, cleanup, and the read-only - duplicates and orphans reports), target ids, state (queued, running, paused, done, failed, + duplicates and orphans reports; empty-trash, stored as 18, which erases exactly the trash + entries of a confirmed plan, erases nothing when the trash changed since, and is never + scheduled: amended 2026-10-26, R6), 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 @@ -318,6 +320,11 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st jobs, enabled, next run (none while disabled), last run, last job id, last outcome (queued, skipped-pending, skipped-offline, skipped-nothing, unavailable, failed:), created by, created, updated. +- **FrameRemoval** (amended 2026-10-26, R6) — the tombstone of a photo removed from a + sequence: sequence id, sha256, replacement sha256 (the converted file that replaced it, + R7), reason (deleted, replaced), removed at. Written from the sidecar's `removed` list (§7) + at every index sync, so a rebuild keeps it, leaving out content a frame of the sequence + holds again; it goes with its sequence row and outlives the trash entry. - **MediaCard** (client) — id, volume serial, filesystem label, capacity, nickname, camera identity (Make/Model/BodySerial from first file), profile JSON, first/last seen, import history (job ids). @@ -334,7 +341,9 @@ Primary entities (identical concepts in SQLite and PostgreSQL; ids are UUIDv7 st Indexes: `frame(sequence_id, index)`, `frame(sha256)`, `frame(captured_at)`, `sequence(archive_id, first_capture)`, `sequence(camera_model)`, tags, jobs by state and by -schedule, `schedules(enabled, next_run)` (amended 2026-10-26, R10). +schedule, `schedules(enabled, next_run)` (amended 2026-10-26, R10), +`frame_removals(sequence_id, sha256)` (the key) and `frame_removals(sha256)` (migration 0008; +amended 2026-10-26, R6). Paging everywhere (keyset pagination on `(first_capture, id)`). --- @@ -411,7 +420,8 @@ The archive is the source of truth; the database is an index that can be rebuilt ├── .chronos/ │ ├── 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) +│ ├── locks/ lease files for concurrent writers (server + client on same share) +│ └── trash/ deleted sequences and photos, kept until Empty (below; amended 2026-10-26, R6) ├── 2026/ │ └── 2026-09-28 Canon EOS R5 - Harbour sunset/ folder = expanded FolderTemplate │ ├── originals/ IMG_0001.CR2 … names = expanded FileTemplate @@ -421,13 +431,48 @@ The archive is the source of truth; the database is an index that can be rebuilt │ ├── sequence.json sidecar manifest (below) │ ├── analysis.json full deep-analysis report │ ├── project.json render settings (the "project") -│ └── thumbs.pack packed thumbnails (one file per sequence, indexed; avoids 100k tiny files on SMB) +│ ├── thumbs.pack packed thumbnails (one file per sequence, indexed; avoids 100k tiny files on SMB) +│ └── *.pending.json journals of an ingest, a photo deletion or a restore a crash interrupted (below) ``` `sequence.json` (canonical, versioned, written atomically): `{ id, title, camera, lens, frames: [{ i, file, size, sha256, capturedAt, exposure, fNumber, -iso, focal, bias, wb, orientation, w, h, format, previewOffset, previewLength, flags }], -tags, rating, notes, status, versions, createdBy, updatedAt }`. +iso, focal, bias, wb, orientation, w, h, format, previewOffset, previewLength, flags, source? }], +tags, rating, notes, status, versions, createdBy, updatedAt, removed? }`. Amended 2026-10-26, +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. + +Trash (amended 2026-10-26, R6). Nothing in it is erased except by *Empty* (§12.5, §14.8): +- `trash/[-