feat(processing): selective render claims, analysis follow-ups, per-sequence failures

- JobEngine: ISelectiveJobHandler lets a host decline jobs of a kind it runs;
  declined jobs stay queued for other claimers without holding up the rest.
  JobContext.EnqueueFollowUpAsync queues follow-up work on the same engine.
- Server renders the jobs whose every output a managed encoder produces
  (ManagedRenderJobHandler); MP4 jobs stay for render nodes. Program.cs
  registers ProcessingModule next to ArchiveModule. Server renders ignore a
  client's export folder.
- Light analysis is queued after imports and after scans that indexed new
  sequences, so the advisor's Auto values exist without user action.
- Analysis jobs log a failing sequence and go on; the job then fails and a
  retry analyses only the failed ones. The advised frame rate follows the
  user's fit-to duration.
- ProcessingJobs.RenderEach splits a batch into one job per preset for
  servers; render nodes say which batch presets they did not render, fetch
  each content once and stop on a changed certificate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 17:01:50 +00:00
1 parent d729d2d09c
commit 14cdbf1f7d
30 files changed
+572 -85

No files matched your search

@@ -1,3 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Titano.Core.Archiving;
using Titano.Core.Codecs.Jpeg;
using Titano.Core.Diagnostics.Synthetic;
@@ -13,10 +14,17 @@ namespace Titano.Server.Tests.Storage;
[Category("processing")]
public sealed class ProcessingModuleTests(TestContext context)
{
/// <summary>The registrations of Program.cs.</summary>
private static void Production(IServiceCollection services)
{
ArchiveModule.Register(services);
ProcessingModule.Register(services);
}
[Test]
public async Task UploadedFramesAreLightAnalysedAndAdvised()
{
await using var server = await TestServer.StartAsync(context, services: ArchiveModule.Register);
await using var server = await TestServer.StartAsync(context, services: Production);
var (editor, _, _) = await server.UserAsync("alberto", "editor");
var scene = SyntheticSequence.Create(new SyntheticSequenceOptions { FrameCount = 10, StartEv = 0.5, EndEv = -0.5 });
Guid sequenceId = default;