fix(reorganize): a rename journal that cannot be read no longer stops the archive from opening

An archive open lists the pending rename plans; one journal that was not valid JSON threw out of
ArchiveService.OpenAsync, so the archive (and the server, at boot) did not open until the file was
removed by hand. It is now logged and left in place; its own job fails with the reason instead of
planning again over a half-applied plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-27 19:50:32 +01:00
1 parent 074d09839a
commit 0c2bdedfdf
5 files changed
+59 -8

No files matched your search

+3 -1
View File
@@ -484,7 +484,9 @@ step being one sequence and the sequences nested in a folder that moves with it:
- `journal/rename-<plan>.json` holds the plan (its steps, templates and the sequences it was
made for), the steps completed and what they did; it is written before the first step and
deleted after the last. A plan whose job was paused, cancelled or failed is marked held and
waits for that job; any other is completed at the next archive open.
waits for that job; any other is completed at the next archive open. A journal that cannot be
read is logged and left where it is: the archive opens, the plan is not resumed and its job
fails with the reason.
- Each step takes the leases of its sequences, then their thumbnail leases, and checks under
them, before anything of it moves, that the plan still fits: the sequences where the index
had them, nothing indexed since inside a folder that moves or at its new place, no sidecar of