fix: stalled jobs, editor cancellation stops and GoPro DNG decoding
Owner review 1, phase 1 (docs/requests/2026-10-15-owner-review-1.md). Thumbnail and proxy jobs over several sequences counted sequences while they checkpointed inside one: the rate decayed until the time left overflowed TimeSpan, the job failed while publishing progress and again while saving it, and stayed Running. The throughput is now seeded by the first window with progress, the time left is bounded (JobEta), saving progress never throws, image passes count frames, and job speeds use the right unit (bytes for verify and import). The debugger stops in WicDecoderProvider.cs when presets changed were cancelled preview decodes leaving synchronous thread-pool delegates; the editor's sources, LatestRunner and the render node's proxy task now keep them in their own tasks, and a cancellation is never an unreadable frame. GoPro DNGs converted by Adobe software were classified GPR and read only through their 8-bit preview, and Windows' preview-only DNG decoder was reported as a native decode. A DNG is GPR only when its raw image is VC-5, WIC decodes RAW only through the Raw Image Extension and never DNG, analyses and previews take an adequate embedded preview by choice while renders develop natively, and frames already indexed as GPR are reclassified by the next light analysis. Also records the owner's request (docs/requests), the BRIEF amendments (§8.1, §8.2, new §24), DECISIONS, CHANGELOG, STATUS and ARCHITECTURE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19265b36c2
commit
34d03051f5
77 files changed
+785
-94
No files matched your search
@@ -289,6 +289,44 @@ public sealed class ProjectStoreTests(TestContext context)
|
||||
}
|
||||
|
||||
/// <summary>A temporary archive with one adopted folder of synthetic JPEGs, indexed.</summary>
|
||||
/// <summary>
|
||||
/// A decode superseded by a newer edit (R4, owner review 1): the caller sees a cancellation, never an unreadable frame,
|
||||
/// and the provider's cancellation stays inside the source's own task.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public async Task ACancelledDecodeIsACancellationNotAnUnreadableFrame()
|
||||
{
|
||||
var (db, sequenceId, _) = await ArchiveAsync(4);
|
||||
await using (db)
|
||||
{
|
||||
var entered = new TaskCompletionSource();
|
||||
var blocking = new ImageDecoder([new BlockingProvider(entered)]);
|
||||
var options = new ArchiveServiceOptions { Owner = "test", LeaseWait = TimeSpan.FromSeconds(20) };
|
||||
await using var source = new LocalSequenceSource(db, sequenceId, blocking, null, options);
|
||||
await source.LoadAsync(context.Cancellation);
|
||||
using var cts = new CancellationTokenSource();
|
||||
var decode = source.DecodeAsync(1, 64, DecodePurpose.Proxy, cts.Token).AsTask();
|
||||
await entered.Task.WaitAsync(TimeSpan.FromSeconds(10));
|
||||
await cts.CancelAsync();
|
||||
await Assert.ThrowsAsync<OperationCanceledException>(() => decode);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Decodes nothing until its token is cancelled, then throws the cancellation, as WIC does between bands.</summary>
|
||||
private sealed class BlockingProvider(TaskCompletionSource entered) : IImageDecoderProvider
|
||||
{
|
||||
public string Name => "blocking";
|
||||
public DecodeTier? TierFor(ImageFileFormat format) => DecodeTier.Native;
|
||||
|
||||
public DecodedImage? Decode(DecodeRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
entered.TrySetResult();
|
||||
cancellationToken.WaitHandle.WaitOne(TimeSpan.FromSeconds(10));
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<(TitanoDatabase Db, Guid SequenceId, string Root)> ArchiveAsync(int frames)
|
||||
{
|
||||
var directory = context.CreateTempDirectory("editor");
|
||||
|
||||
Reference in new issue
Block a user