test(processing): render node loop, batch note, complete partial downloads

A light analysis that overlaps a deep one of the same sequence re-reads the
report before recording its status, so it neither drops the deep status nor
undercounts warnings.

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:07:54 +00:00
1 parent db98385eb0
commit ccb7e03fee
2 files changed
+63 -6

No files matched your search

@@ -44,7 +44,6 @@ internal sealed class SequenceAnalyser(TitanoDatabase db, ProcessingOptions opti
? await AnalyseDeepAsync(frames, metadata, folder, progress, cancellationToken).ConfigureAwait(false)
: ReadReport(folder, frames.Count);
var context = SequenceContext.FromFrames(frames.Frames, options.AdvisorCodecs);
var warnings = Advisor.Recommend(light, report, context).Findings.Count(f => f.Severity >= FindingSeverity.Warning);
bool changed, unreadable = false;
try
@@ -60,6 +59,9 @@ internal sealed class SequenceAnalyser(TitanoDatabase db, ProcessingOptions opti
(changed, unreadable) = (false, true);
}
// A deep analysis of the same sequence may have finished meanwhile: count its findings and keep its status.
report ??= ReadReport(folder, frames.Count);
var warnings = Advisor.Recommend(light, report, context).Findings.Count(f => f.Severity >= FindingSeverity.Warning);
var set = SequenceStatus.AnalyzedLight | (report is null ? SequenceStatus.None : SequenceStatus.AnalyzedDeep)
| (warnings > 0 ? SequenceStatus.HasWarnings : SequenceStatus.None);
// Without a current report (none, or made before frames were added) the deep status no longer holds.