docs: phase 4a fix rounds 4 and 5

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)
This commit is contained in:
Alby96 committed 2026-10-27 20:57:25 +01:00
1 parent 8c2b9f1bfe
commit 23403f1c07
6 files changed
+71 -46

No files matched your search

+9 -6
View File
@@ -503,16 +503,19 @@ One line per decision: date · decision · alternative · reason.
| 2026-10-26 | A step's file renames run under `.chronos/rename-files.json` (the frames version, the phase, every file's old, temporary and new name): every file first to a hidden temporary name beside it (`.chronos-rename-<token>-<n>.tmp`), the journal then at phase 2, then every file to its new name, never with overwrite; then the sidecar (frames version + 1, frame order and ids unchanged, so an editor holding the old version reloads once), the index (`FrameRepository.RenameFilesAsync`, only from the version the renames started at), and the journal goes. A failure while files move puts every file back; when one cannot go back, the journal completes the renames at once. After a crash the next writer of the sequence (`SequenceWriter.ReadLocked`; the plan's resume; an archive open for a held plan's unfinished steps) rolls forward, safe to run again from any point: phase 1 becomes phase 2 once every file is at its temporary name, a new name taken meanwhile sends the photo and its companions together back to their old names or the first free `_n` (journaled before they move), and the journal stays while a temporary file is left; the index follows at the plan's resume or the next scan. (Owner review 2, R7.) | Rename one file at a time in place; roll a crash back | Chains (A→B, B→C) and swaps never meet a name another file holds and nothing is ever written over; once files reached their new names, rolling forward is the shorter way to a sidecar that matches the disk. |
| 2026-10-26 | Each step (a sequence and those nested in a folder that moves with it) takes the sequence leases, then the thumbnail leases, by id, and checks under them, before anything of it moves: the sequences where the plan has them, no sequence indexed since inside a folder that moves, nothing at its new folder (`TargetTaken`: a folder on disk, or an index row there, around or inside it), no sidecar of a newer format to rewrite, the title it was planned from where it changes the title or names the folder or files after it (`NamedByTitle`), the folder and title the templates give from the settled sidecar, and the file renames planned again (by digest). Those that refuse (all but the names and the file renames) also run up front, without the leases, before a fresh or a held plan starts. Then the folder moves, every index row of the step follows (folder and title, frame paths, export paths, one transaction), and only then are files renamed; once its folder moved, a step goes to its end whatever is cancelled. A sidecar that cannot be read or written after the move still has its row follow (title kept, no scan stamps), every sequence of the step is told, and the step fails so the job holds the plan. (Owner review 2, R7.) | Rename the files first; check only when the plan starts | Nothing of a step is half-applied when the plan no longer fits, the index never names a folder the sequence left, and no writer works in a folder while it moves or its files are renamed. |
| 2026-10-26 | A Reorganize is confirmed by its plan's fingerprint: the SHA-256 of the file template and of the steps as the dry run shows them (ids, folders, titles, carried, file count, samples, what stays and why) with each step's file renames as one digest (`RenameStep.FileDigest`), not the frames version. The `move` job's parameters (`MoveJobParameters`) carry the templates, the sequences that have a step in the order the plan was made for (which decides the folder that gets " (2)") and the fingerprint, no file list; the job plans again and applies only a plan of the same fingerprint, else fails with "The archive changed after this plan was made" and nothing changes, naming in its log a sequence deleted since. The server answers a confirmation whose plan differs 409 `plan_changed` with the fingerprint now. (Owner review 2, R7.) | Store the plan or its file list in the job; include the frames version | The change made is exactly the one shown (destructive operations rule); the parameters stay small for 100,000 photos; photos uploaded under the names the plan leaves them (the archive's file template is the Reorganize's, the usual case after saving templates) must not refuse it. |
| 2026-10-26 | Photos changed after the plan (received, removed, hashed or copied in, so that the renames planned again differ) refuse nothing: under its leases that sequence keeps its file names (`FilesKept`), and its folder and title change as planned while the templates still give them from its first photo as it is now (the plan journals its folder and title templates; `RenamePlanner.Names`, `Gives`: the expansion or its " (n)"); otherwise it stays as it was (`Dropped`; `TitlesKept` when an interrupted run moved its folder already), and so do the sequences its folder was to carry (`CarriedKept`). A selected sequence that so stays inside a folder that was to move keeps that folder in place, with what it carries, instead of failing every retry. The other steps go on, and the job fails at the end saying how many sequences were not reorganized as planned. A title edited since, a folder taken, a sequence moved or indexed inside a moving folder, or a sidecar of a newer format refuse the rest of the plan instead (a plan an interruption left drops that step, or keeps what no longer fits). A plan journaled before its templates were kept is applied as planned. (Owner review 2, R7.) | Refuse the step, or the whole plan, as soon as a photo arrives | A time-lapse camera uploading every few seconds would make a file Reorganize impossible; a folder or title must never be named after a photo that is no longer first; a user's title edit is never written over. |
| 2026-10-26 | Reorganize is a job on both hosts: `JobKind.Move` (stored 14, wire `move`, now labelled *Reorganize*), user priority, target the archive, handled by `MoveJobHandler` through `ArchiveService.CreateJobHandlers`; the desktop dialog keeps its dry run in-window and Apply queues the job. Progress counts the steps that change; the checkpoint is `plan:<id>` once the plan's journal exists. Paused or cancelled by the user, or failed, the job stops between two steps and holds the plan (`RenameJournal.Held`): an archive open leaves it to the job (completing only file renames a step left half-way), and the job's resume or retry completes it while it still fits, else gives it up (journal deleted). A yield to another job or a host that stops leaves it unheld, completed at the next open. A failed job whose plan is over (completed with sequences kept, or given up) checkpoints `applied`, so its retry plans again; one that failed because the archive's volume went away keeps its plan, and its retry completes it once the volume is back. Deleting sequences of the archive is refused while the job runs or is paused. (Owner review 2, R7.) | Apply inside the dialog, as the 2026-10-03 and 2026-10-06 rename dialog did; complete held plans at the next open | A Reorganize can rename every photo of an archive: as a job it is paused, resumed after a restart, followed and retried in Jobs, on the same path as the panel; an archive open must not finish behind the user's back what they paused. |
| 2026-10-26 | Photos changed after the plan (received, removed, hashed or copied in, so that the renames planned again differ) refuse nothing: under its leases that sequence keeps its file names (`FilesKept`), and its folder and title change as planned while the templates still give them from its first photo as it is now (the plan journals its folder and title templates; `RenamePlanner.Names`, `Gives`: the expansion or its " (n)"); otherwise its title and file names stay, and its folder too (`Dropped`; `TitlesKept` when an interrupted run moved its folder already), and so do the sequences its folder was to carry (`CarriedKept`). A sequence so left inside the folder of a later step that moves goes with that folder (next row); the folder around it is never kept in place for it. The other steps go on, and the job fails at the end saying how many sequences were not reorganized as planned. A title edited since, a folder taken, a sequence moved or indexed inside a moving folder, or a sidecar of a newer format refuse the rest of the plan instead (a plan an interruption left drops that step, or keeps what no longer fits). A plan journaled before its templates were kept is applied as planned. (Owner review 2, R7.) | Refuse the step, or the whole plan, as soon as a photo arrives | A time-lapse camera uploading every few seconds would make a file Reorganize impossible; a folder or title must never be named after a photo that is no longer first; a user's title edit is never written over. |
| 2026-10-26 | A sequence of the plan that an earlier step left as it was (it changed after the plan, such as photos that make the templates name it otherwise now, or, when a plan resumes, whatever drops a step), or that stayed with a folder that was to carry it, is taken along by a later step whose folder moves while the index still has it inside that folder (at its own folder, or where an interrupted run's move took it): `MassRenamer.LeftInsideAsync` adds it to that step as a carried sequence with its title and file names as they are, locked, leased, moved and recorded with the folder. The tally counts it as titles kept (`TitlesKept`, logged "Title and file names kept, changed after the plan") instead of dropped; one whose carrier stayed is no longer kept when it was only to move, and is titles kept when it was to be retitled or renamed too; one a newer Chronos wrote stays counted as newer. Before a held plan resumes, the check without the leases (`RefuseStaleAsync`) accepts inside each moving folder only the sequences of the remaining steps and the completed ones so left there; any other refuses the plan, which is given up. (Owner review 2, R7.) | Refuse the outer step, which failed the plan at every retry; keep the outer folder in place with all it holds | Nested sequences move out first, so one that stayed was found inside the outer folder as a stranger and the plan stayed held for ever; the outer folder's change does not depend on the nested one's, and moving the nested sequence with its index row leaves no row behind. |
| 2026-10-26 | Reorganize is a job on both hosts: `JobKind.Move` (stored 14, wire `move`, now labelled *Reorganize*), user priority, target the archive, handled by `MoveJobHandler` through `ArchiveService.CreateJobHandlers`; the desktop dialog keeps its dry run in-window and Apply queues the job. Progress counts the steps that change; the checkpoint is `plan:<id>` once the plan's journal exists. Paused or cancelled by the user, or failed, the job stops between two steps and holds the plan (`RenameJournal.Held`): an archive open leaves it to the job (completing only file renames a step left half-way), and the job's resume or retry completes it while it still fits, else gives it up (journal deleted). A yield to another job or a host that stops leaves it unheld, completed at the next open. A failed job whose plan is over (completed with sequences kept, or given up) checkpoints `applied`, so its retry plans again; one that failed because the archive's volume went away keeps its plan, and its retry completes it once the volume is back. A plan journal not found on an archive that cannot be reached (`ArchiveVolume.Probe` offline) tells nothing: a failed job then keeps its `plan:<id>` checkpoint instead of `applied`, and a retry while the archive is offline fails as offline ("The archive … is offline") instead of logging that the plan was completed at an archive open and ending done. Deleting sequences of the archive is refused while the job runs or is paused. (Owner review 2, R7.) | Apply inside the dialog, as the 2026-10-03 and 2026-10-06 rename dialog did; complete held plans at the next open | A Reorganize can rename every photo of an archive: as a job it is paused, resumed after a restart, followed and retried in Jobs, on the same path as the panel; an archive open must not finish behind the user's back what they paused; an unplugged drive must not make a held plan look completed. |
| 2026-10-26 | The plan's journal keeps a tally of the whole plan (`RenameJournal.Done`: changed, files, dropped, files kept, titles kept, files busy, newer, carried kept), so the job log covers every run: "Sequences changed: N, files renamed: M", then one line per sequence not changed as planned, with why. The job then fails with one error: kept first ("changed after the plan"), then newer (a sequence file from a newer Chronos, met only when resuming), then busy (a photo in use or its new name taken); sequences kept because the folder around them stayed follow their carrier's reason. (Owner review 2, R7.) | Report only the last run; one generic error | A plan applied over several runs reports what it did as a whole, and each sentence must be true. |
| 2026-10-26 | Each sequence a Reorganize changed is told through `ArchiveServiceOptions.SequenceChanged` (change `reorganized`) once its step is journaled, by its job or by an archive open that completed an interrupted plan, and at once for a step that failed after its folder moved; a failure to tell is logged, never passed on. The server publishes `sequenceChanged` `reorganized` with the row's versions (its open at start has no hook: no client is connected yet); the desktop raises `AppServices.SequenceReorganized`, and an editor open on that local sequence reloads where it is now while the job goes on (`LocalSequenceSource` reads the frames again when the folder changed while it listed them). (Owner review 2, R7.) | One event when the job ends | Steps done before a pause or a failure are told; an open editor would otherwise decode from paths that moved. |
| 2026-10-26 | A folder move rebases the archive-relative paths of the exports inside it in the same transaction as the sequence row and its frames (`RenderRepository.RebaseFolderAsync`, `ArchiveIndexer.RebaseRendersAsync`). An export is a file, or a folder for an image sequence. The sequence's own exports follow unless one was written at the old place after the move (there and not at the new place, the old folder not another sequence's now), and so does one whose old path another sequence's export now names; another sequence's export saved inside (the Export folder picker) follows only when it moved with the folder; absolute paths and other folders stay. A scan that finds a sequence in another folder (another index's Reorganize, a folder moved by hand) applies the same rule. (Owner review 2, R7.) | Leave render rows to be recorded again; rebase by sequence only | Exports must stay downloadable and syncable on every host after a move, and a row must keep naming where its file is. |
| 2026-10-26 | A writer takes a sequence's folder from the index row read under the sequence's lease (`SequenceWriter.FolderAsync`; renders a client or a node sends through `ArchiveService.UnderLeaseAsync`), so it writes where a Reorganize put the sequence and never creates the folder it left. A folder another index moved is not where this index has it until its next scan: the editor's saves, *Take server* and *Save both*, exports fetched by sync, proxies received or made, the server's render filing and a render job as it starts refuse it (on the desktop with "The folder of this sequence is not where the index has it; try again after the next scan"), and a deep analysis records nothing. Render filing that meets a sequence held past the lease wait, an offline archive or such a moved folder answers 503 and puts the upload back to receiving, the node keeping its job while its client retries; a proxy upload answers 503 `sequence_busy`, or 404 `frame` once its sequence or folder is gone. (Owner review 2, R7.) | Let writers create the old folder again; answer 409, or 500 as before | A folder created again holds files no index row names; `ChronosClient` retries only 503s and a render node fails its job on any other error, which would discard a finished render (a 500 left the upload stuck in Committing until a restart). |
| 2026-10-26 | The proxy pass holds the thumbnail lease one batch at a time: a quarter of the lease wait (30 s by default), at least one photo, then lets it go for 750 ms (1.5 × `LeaseFile.LongestPoll`, 500 ms) and reads the folder, sidecar and companions again; a folder gone stops the job with the folder-moved error (resumed from its checkpoint after the scan), and photos changed between batches leave `ProxiesBuilt` unset. File renames take the thumbnail leases too; the thumbnail pass still holds its lease for its whole run. Cost: up to about 2.5 % on long passes. Another process's thumbnail pass may take the lease in a gap, and one longer than the lease wait then fails the running proxy pass, which resumes from its checkpoint. (Owner review 2, R7.) | Hold the lease for the whole pass; no lease | Another program's Reorganize, sequence deletion or pack compaction waits for one batch instead of failing after two minutes behind an hours-long pass, and no pass writes proxies into a folder that moved. |
| 2026-10-26 | A folder move rebases the archive-relative paths of the exports inside it in the same transaction as the sequence row and its frames (`RenderRepository.RebaseFolderAsync`, `ArchiveIndexer.RebaseRendersAsync`). An export is a file, or a folder for an image sequence. The sequence's own exports follow unless one was written at the old place after the move (there and not at the new place, the old folder not another sequence's now), and so does one whose old path another sequence's export now names; another sequence's export saved inside (the Export folder picker) follows only when it moved with the folder, and never one of the sequence that holds the old folder now (next row); absolute paths and other folders stay. A scan that finds a sequence in another folder (another index's Reorganize, a folder moved by hand) applies the same rule. (Owner review 2, R7.) | Leave render rows to be recorded again; rebase by sequence only | Exports must stay downloadable and syncable on every host after a move, and a row must keep naming where its file is. |
| 2026-10-26 | When another index moved a sequence out of its folder and another sequence into that folder, this index's rebase of the first one reads once which other sequence the old folder holds now (`SequenceFolders.OtherSequence`, the id its sidecar names): the first sequence's own exports follow to its new folder even when an export of that name is at the old path (it is the other sequence's), and a render row of the sequence that holds the old folder never follows, whatever the scan order (`RenderRepository.RebaseFolderAsync` gives the rule each row's owner). Known limitation: an export that sequence had saved through the Export folder picker into the first one's folder, before it took that folder, keeps naming the old path; the file is intact in the first sequence's new folder, and no scan repairs the row. (Owner review 2, R7.) | Let every row under a taken old folder follow; keep any row whose path still holds a file | When the scan rebased the holder first, its row then followed the other sequence and named that sequence's file, its own export left without a row for good; a row must never name another sequence's file, and the case left out needs an export saved into another sequence's folder before two moves by another program. |
| 2026-10-26 | A writer takes a sequence's folder from the index row read under the sequence's lease (`SequenceWriter.FolderAsync`; renders a client or a node sends through `ArchiveService.UnderLeaseAsync`), so it writes where a Reorganize put the sequence and never creates the folder it left. A folder another index moved is not where this index has it until its next scan, and neither is one that holds another sequence now (next row): *Take server* and *Save both*, exports fetched by sync, proxies made and a render job as it starts refuse it with "The folder of this sequence is not where the index has it; try again after the next scan" (`Errors.Archive.FolderMoved`), proxies received with 404 `frame`, the server's render filing with 503 `folder_moved` (`FolderMovedException`) and the editor's save with "This sequence is no longer in the archive"; a deep analysis records nothing. Render filing that meets a sequence held past the lease wait, an offline archive or such a folder answers 503 (`sequence_busy`, `archive_offline`, `folder_moved`) and puts the upload back to receiving, the node keeping its job while its client retries (about 30 s; a node then reports the job failed, and its retry renders again); a proxy upload answers 503 `sequence_busy`, or 404 `frame` once its sequence or folder is gone. (Owner review 2, R7.) | Let writers create the old folder again; answer 409, or 500 as before | A folder created again holds files no index row names; `ChronosClient` retries only 503s and a render node fails its job on any other error, which would discard a finished render (a 500 left the upload stuck in Committing until a restart). |
| 2026-10-26 | A sequence is in the folder the index has for it only while that folder exists and its sidecar, when it has one, names no other sequence (`SequenceFolders.Holds`; a sidecar that cannot be read does not count as another's). Every writer that files into a sequence's folder asks it, so a folder another index moved the sequence out of, and another sequence into, is refused exactly like a missing folder until this index's next scan: settings sync and *Take server* (nothing written), *Save both*'s copy and its clean-up (which deletes nothing in such a folder), exports fetched by sync (the download stays staged), the server's render filing, a render job as it starts, proxies received, proxy passes, the deep analysis's checkpoint and the editor's save; a thumbnail pass refuses a sidecar of another sequence before it opens the pack. (Owner review 2, R7.) | Check only that the folder exists; check the sidecar's id in some writers | With only the folder checked, *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; one check shared by every writer leaves none out. |
| 2026-10-26 | The proxy pass holds the thumbnail lease one batch at a time: a quarter of the lease wait (30 s by default), at least one photo, then lets it go for 750 ms (1.5 × `LeaseFile.LongestPoll`, 500 ms) and reads the folder, sidecar and companions again; a folder gone, or holding another sequence now, stops the job with the folder-moved error (resumed from its checkpoint after the scan), and photos changed between batches leave `ProxiesBuilt` unset. File renames take the thumbnail leases too; the thumbnail pass still holds its lease for its whole run. Cost: up to about 2.5 % on long passes. Another process's thumbnail pass may take the lease in a gap, and one longer than the lease wait then fails the running proxy pass, which resumes from its checkpoint. (Owner review 2, R7.) | Hold the lease for the whole pass; no lease | Another program's Reorganize, sequence deletion or pack compaction waits for one batch instead of failing after two minutes behind an hours-long pass, and no pass writes proxies into a folder that moved. |
| 2026-10-26 | A sequence keeps its folder when it already is what the template gives, or that name with the " (n)" filing or an earlier Reorganize gave it, in the template's case; a change of case only is planned while no other folder holds that exact name (another sequence's, or on a case-sensitive file system a folder on disk beside the sequence's own: `RenamePlanner.ExistsExactly` compares every level exactly) and moves through a temporary name. No two sequences of a plan get folders that differ only in case. Under the step's leases a case-only target that now exists beside the sequence's own folder refuses the step (dropped when resuming), as `MoveFolder` would; a change of case in an outer level moves on every file system. (Owner review 2, R7.) | Compare folder names without case; make every target unique again | A second Reorganize must plan nothing (a folder flipped between " (2)" and " (3)" before); NTFS ignores case and Linux does not; a plan that fails at every archive open must never be journaled. |
| 2026-10-26 | Template rules (`TemplateRules`, checked on three sample photos two seconds apart): a folder template may not write a level scans never enter (`ReservedFolder`: starting with `.`, or `originals`, `proxies`, `exports`, `.chronos`); a file template may hold no slash (`FileSeparator`), must keep the photo's extension (`Extension`: `PathTemplate.KeepsExtension`, the extension appended or after `.{ext}`) and must give a session's photos different names (`NotUnique`). What a template does not write itself is made safe instead: a folder level a title gives that scans skip gets a leading `_` (`ExpandFolder`, for import, upload and Reorganize alike), a file name over 200 characters is shortened before its `.{ext}` without splitting a surrogate pair, and a title template expands as text (`ExpandText`: control characters as spaces, at most 200 characters, no file-name sanitizing). Each rule has its sentence (`Errors.Template.<Rule>`). (Owner review 2, R7.) | Check only that a template parses | `{n}{ext}` drops the dot, and with it the extension every decoder goes by; a folder scans skip vanishes from a rebuilt index; repeating names fill a session with `_2`, `_3`; titles became `Paris_ night`. |
| 2026-10-26 | The rules hold wherever a template is typed or sent: the desktop's Settings › Archive, Import and Reorganize fields (`NamingPreview`), the server's Reorganize and `PUT /archive/settings`, and the archive engine (`ArchiveSettings.Problem`, `CheckTemplates`). A template `archive.json` already holds (saved by 0.1.0-rc.5 or earlier) is held to them only when an edit changes it: the engine's `UpdateSettingsAsync` and the server's PUT check the rules only for templates that differ from the stored ones, every template still having to be non-blank, valid and expandable; `CreateAsync`, and so adopting a new folder, holds both to every rule (this PC's templates saved by an older version then refuse Welcome › Create, the toast naming the rule, fixed in Settings › Archive). A broken rule is a `TemplateRuleException` (an `ArgumentException` naming the field, with the rule), whose sentence the desktop's toasts show; the API's `invalid_template` details are `<field>:<rule>` (`fileTemplate:extension`) with that sentence in the request's language, a blank or invalid template keeping the bare field and the generic message. (Owner review 2, R7.) | Refuse every save while a stored template breaks a rule; check the rules in the user interfaces only | A pre-rules template must not block an edit of the name, the proxy size or the other template, on the desktop or the panel; neither the engine nor the server accepts from another client what the fields refuse. |
| 2026-10-26 | The rules hold wherever a template is typed or sent: the desktop's Settings › Archive, Import and Reorganize fields (`NamingPreview`), the server's Reorganize and `PUT /archive/settings`, and the archive engine (`ArchiveSettings.Problem`, `CheckTemplates`). A template `archive.json` already holds (saved by 0.1.0-rc.5 or earlier) is held to them only when an edit changes it: the engine's `UpdateSettingsAsync` and the server's PUT check the rules only for templates that differ from the stored ones, every template still having to be non-blank, valid and expandable (the PUT compares with the archive as the server last read `archive.json`; when that file changed since, a desktop's edit say, and the engine refuses a template the form still sends, the answer is still `invalid_template` with the rule, never 409 `archive_policy`); `CreateAsync`, and so adopting a new folder, holds both to every rule (this PC's templates saved by an older version then refuse Welcome › Create, the toast naming the rule, fixed in Settings › Archive). A broken rule is a `TemplateRuleException` (an `ArgumentException` naming the field, with the rule), whose sentence the desktop's toasts show; the API's `invalid_template` details are `<field>:<rule>` (`fileTemplate:extension`) with that sentence in the request's language, a blank or invalid template keeping the bare field and the generic message. (Owner review 2, R7.) | Refuse every save while a stored template breaks a rule; check the rules in the user interfaces only | A pre-rules template must not block an edit of the name, the proxy size or the other template, on the desktop or the panel; neither the engine nor the server accepts from another client what the fields refuse. |
| 2026-10-26 | The server keeps Reorganize dry runs (`ReorganizePlanCache`), keyed by the archive, the selection (all, or the ids in their order), the templates and `SequenceRepository.GetStampAsync`: a SHA-256 of what the planner reads from the index (every row's id and folder; for the planned rows their title, first capture, camera make and model, lens, photo count, frames version and how many of their photos are hashed; for others inside a planned folder their title). Uploads into other sequences, ingest status writes, verifies of other sequences and tag or note edits keep a plan; a verify that hashed planned photos plans again. A plan, or a refusal (`nested_target`, `not_found`), is kept 5 minutes from when it was made (a timer per plan, checked again on access); failures and stopped plans are not. Plans are made apart from the request (a request cut off only stops waiting), once per key, at most 2 at once (`Concurrency`) and 8 kept or being made (`Capacity`: a new one lets go the kept plan asked for first, else the one being made asked for first, which stops); one still being made 15 minutes after it was asked (`PlanTimeout`, the wait for a turn included), let go, or running when the server stops is cancelled and answered 503 `plan_dropped`. The confirmation forgets its key once the job is queued. (Owner review 2, R7.) | Plan again at every request; plan in a background job with progress | An `all` dry run reads every sidecar and photo folder, minutes over SMB, and behind a proxy's timeout it was never shown; the job plans again and compares fingerprints, so a kept plan that is stale can only fail, never change what the dry run did not show (a change made on disk alone answers 202, then the job fails changing nothing). |
| 2026-10-26 | `POST /api/v1/archive/reorganize` (ManageArchive): exactly one of `sequenceIds` (1–1,000) and `all`, a null template kept, at least one given; a dry run answers the plan (`ReorganizePlanDto`: steps with folders, titles, carried, frames version, file count, up to 3 samples and what stays, its reason in snake case with a sentence in the request's language; totals; fingerprint); the change answers 202 with the `move` job. 400 `bad_request` (`sequenceIds`, `templates`, `fingerprint`), `invalid_template`; 404 `not_found` (`sequence`); 409 `nested_target` (details: the folder), `plan_changed` (details: the fingerprint now), `job_unavailable`; 503 `archive_offline`, `plan_dropped`. Audited `archive_reorganized` ("sequences · files · folder, file and title templates"), which the panel's audit log and Dashboard show as a sentence. (Owner review 2, R7.) | Separate rename and move endpoints; every planned name in the answer | One request carries the three templates as both programs do; a dry run of 100,000 photos answers counts and samples, not every name. |
| 2026-10-26 | Panel: the Library's *Reorganize…* sends the selected ids, up to 1,000, and `all: true` only above that while the selection is exactly *Select all* without a filter and the total has not changed; any other larger selection is refused with a toast, never split into several plans or jobs. The dialog's switches start on for the parts with a template (Titles off and empty, the archive having no title template; from the Archive page's toast only the changed parts), templates are sent trimmed, a dry run runs 400 ms after typing (Enter at once) with one request in flight and a change meanwhile planned right after, an older request's refusal is not shown, and Apply runs only while the shown plan is the fields' and changes a sequence. The confirmation has two buttons and asks for nothing typed (nothing is deleted); a different plan answered during it is shown, not applied. `toast(message, isError, action)` takes an optional link or button; such toasts stay 15 s and pause under the pointer or the keyboard focus. (Owner review 2, R7.) | Split a large selection into several jobs; a typed confirmation | One dialog is one plan and one job, and separate plans could give two sequences one destination; a typed word is for what cannot be undone. |