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

+14 -2
View File
@@ -55,12 +55,22 @@ public sealed record ArchiveServiceOptions
/// <summary>
/// Told after a Reorganize changed a sequence's folder, title or file names (change <c>reorganized</c>), once its step is
/// journaled, or once its folder moved and its index row followed when the step then failed: by its job, or by an archive
/// open that completed a plan an interruption left (<see cref="ArchiveService.OpenAsync"/>).
/// open that completed a plan an interruption left (<see cref="ArchiveService.OpenAsync"/>). Told too after a conversion
/// replaced a sequence's frames (<c>converted</c>) or made a new sequence of them (<c>created</c>).
/// A server tells its connected clients (BRIEF §14.3); the service it opens its archive with at start sets none, as no
/// client is connected yet. The desktop reloads an editor open on the sequence. A failure is logged and never fails the job.
/// </summary>
public Func<Guid, string, CancellationToken, Task>? SequenceChanged { get; init; }
/// <summary>
/// The free bytes a write under a folder of an archive (its root, its staging folder) may count on, as the host counts
/// them: a server takes the tighter of its space volume (owner review 2, R2) and the folder's own volume, the desktop asks
/// Windows, which measures a network share too; null: the folder's drive (<see cref="DriveInfo"/>). A conversion checks its
/// estimate against it before it starts, before each sequence and before each photo (R7). The function returns null when
/// the space cannot be measured.
/// </summary>
public Func<string, long?>? FreeSpace { get; init; }
/// <summary>Half the logical cores, at least one: the parallelism when the host sets none.</summary>
public static int DefaultParallelism => Math.Max(1, Environment.ProcessorCount / 2);
@@ -99,7 +109,8 @@ internal sealed class SequenceWriter(ArchiveServiceOptions options)
/// <summary>
/// Reads the sidecar of a locked sequence, completing an interrupted Reorganize of its files (<see cref="FileRenameJournal"/>),
/// undoing an interrupted photo deletion (<see cref="FrameRemovalJournal"/>), settling an interrupted restore from the
/// undoing an interrupted photo deletion (<see cref="FrameRemovalJournal"/>), undoing or completing an interrupted frame
/// replacement (<see cref="FrameReplaceJournal"/>, a conversion or its undo), settling an interrupted restore from the
/// trash (<see cref="FrameRestoreJournal"/>; left for later while its trash entry is busy) and completing an interrupted
/// ingest batch first. A sidecar a rename recovery rewrites leaves the index behind it until the rename resumes or the
/// next scan reads it.
@@ -121,6 +132,7 @@ internal sealed class SequenceWriter(ArchiveServiceOptions options)
FileRenameJournal.Delete(sequence);
}
FrameRemovalJournal.Recover(sequence, manifest);
FrameTrash.RecoverReplace(sequence, manifest, heldEntryLease);
FrameTrash.RecoverRestore(sequence, manifest, heldEntryLease);
if (IngestJournal.Recover(sequence, manifest) is { } recovered)
{