Files
Chronos/tests/Chronos.Data.Tests/Archiving
Alby96 d0da224de5 fix(reorganize): take along a sequence left inside a moving folder; keep a plan whose archive is offline
A selected sequence nested in another selected sequence's moving folder moves
out first. When the templates no longer gave it its folder (its first photo
gone, or an earlier one filed), it stayed inside, and the outer step then found
it as a stranger: StaleRenamePlanException at every retry, the plan held forever.

- A moving folder now takes along the sequences of earlier steps that stayed
  inside it (their index row still there): locked, moved and recorded with it,
  keeping their title and file names. They are reported TitlesKept instead of
  Dropped; a carried sequence whose carrier stayed is simply changed (or
  TitlesKept when it was to change more than its folder); Newer stays Newer.
  RefuseStaleAsync exempts exactly those, so a held plan either fits or is given up.
- MoveJobHandler: a journal not found on an offline archive tells nothing. A
  failed job keeps its plan:<id> checkpoint instead of becoming 'applied', and a
  retry while the archive is offline fails with "archive offline" instead of
  logging ReorganizedEarlier and ending done.
- The Fit.Names warning now says what happens to the folder (moved already,
  carried, or not moved to the planned one); stale ApplyAsync, RefuseStaleAsync,
  FitAsync and job docs corrected.

Tests: the nested case (fresh run and held retry, three levels), the same through
a held job, a carrier named otherwise with a carried sequence, Fit.Names on a
resumed step whose folder moved (held and not), and an offline retry that keeps
its plan and completes it once the archive is back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c5ffc87f1a3900442920693763fd04d28cb43aee)
2026-10-27 19:46:16 +01:00
..