A conversion job could still do something its confirmed dry run did not show,
or refuse what it should have converted:
- An upload landing between the confirmation and the sequence's turn made the
sequence Changed at every retry. Each ConvertSequence now names the photos
the plan converts (Photos, their frame ids); the job takes those from its
re-plan, checks their content against the confirmed digest and leaves photos
that came in since as they are. A photo the plan did not list is never
converted, whatever changed on disk or in the index since the dry run.
- A file another program held during the dry run was planned as Missing and
then converted or not depending on the re-plan. It is now its own reason
(inaccessible, "held open or cannot be opened"); a truncated file reads as
undecodable. At job time a confirmed photo that cannot be opened leaves the
sequence Blocked for the retry; a held photo the job does not convert does
not hide a real change.
- The same sequences could be converted twice (two dialogs or tabs, a lost
answer, no dry run at all). MassConverter.QueueAsync checks the queued,
running and paused conversions and queues under one lock, in the caller's
context (the desktop's enqueue shows a toast on the UI thread); a job's own
re-plan treats sequences of conversions queued before it as busy.
- The per-photo space check reserved a full batch of photos even when fewer
were left, so a job whose preview had the space could stop at every retry.
It now reserves the photo and those after it that may convert at once.
- New sequence now says in the dry run, the panel's totals and confirmation,
and a new desktop confirmation, how many photos each new sequence lacks;
only sequences that are copied use those words.
- On the server, a confirmation takes only the plan kept for the index as it
is now (503 plan_dropped otherwise, never a plan made inside the request),
and busy sequences and free space are as they are at every request. The
panel's Apply asks the dry run again first, with Close still available,
and confirms only the same fingerprint.
- Maintenance keeps another host's conversion staging as long as its journal
and purges both together; the unstaged-copy failure and blocked sequences
are logged in catalog sentences.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit fefd9c34ebfeed1f9e84161610ef286026d38355)
The convert endpoint planned the whole selection inside the HTTP request, again for
every mode, quality keystroke and confirmation, with no limit: behind a proxy an
all-sequence conversion could never get past its dry run or its apply.
- ReorganizePlanCache becomes PlanCache, shared by Reorganize and Convert: one plan
per key made apart from the request, two at once across both kinds, eight kept,
15-minute timeout, 5-minute lifetime, 503 plan_dropped. Keys are typed records
(ReorganizePlanKey, ConvertPlanKey) that also say which exceptions are refusals.
- A conversion plan is keyed by archive, a convert stamp of the index
(SequenceRepository.GetConvertStampAsync: the Reorganize stamp plus, per planned
sequence, the photos' count, sizes, formats, pixel sizes and missing, corrupt,
preview-only and undecodable flags), the sequences and the target with the
quality that counts. Not the mode: the request's mode and options are set on the
kept plan, and the free space is measured again at every request through the
engine. A plan made while the volume was away is not kept (503 archive_offline).
- New sequence holds the converted copies alone: the dry run says the skipped
photos are not copied into it (Archive.Convert.NotCopied.*, Server.Convert.OnPcNew),
the panel's totals, column and confirmation give the count, and so does the
desktop's summary.
- Panel: the preview is asked in Replace's neutral words; a dry run cut off by a
proxy is asked again while the totals show how long it takes, plan_dropped is
retried once; an apply the server let go plans again, a changed one shows
Admin.Convert.PlanChanged, and one with no answer is not resent (its job may be
queued).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f0b1e379ce7c08b6d3459ab25ca6214c8f366f6c)