fix(producer): verify sequential disk drawElement samples too

This commit is contained in:
Vance Ingalls
2026-07-23 15:07:35 -07:00
parent ec791e91d9
commit 9fc1c2f159
3 changed files with 21 additions and 1 deletions
+1
View File
@@ -210,6 +210,7 @@ export {
calculateOptimalWorkers,
computeWorkerSizing,
selectVerifySampleIndicesForTask,
verifyDiskDrawElementSamples,
distributeFrames,
distributeFramesInterleaved,
executeParallelCapture,
@@ -646,7 +646,7 @@ async function psnrForDiskSample(
// per-sample skip/breach) — already decomposed into psnrForDiskSample +
// assertDiskSampleAboveFloor; further splitting obscures the check.
// fallow-ignore-next-line complexity
async function verifyDiskDrawElementSamples(
export async function verifyDiskDrawElementSamples(
session: CaptureSession,
task: WorkerTask,
streaming: boolean,
@@ -44,6 +44,7 @@ import {
type EngineConfig,
captureFrame,
captureFrameToBufferPipelined,
verifyDiskDrawElementSamples,
writeCapturedFrame,
closeCaptureSession,
completeDeferredDrawElementInit,
@@ -331,6 +332,24 @@ export async function runCaptureStage(input: CaptureStageInput): Promise<Capture
reportFrame(i);
}
}
// Sequential disk drawElement self-verification (PRINFRA-352 follow-up):
// the sequential disk path — reachable under the explicit fast-capture
// opt-in, including via probe-session reuse — armed ground-truth samples
// but never checked them, exactly like the parallel disk workers before
// #2749. Same synthetic-task shape the parallel verify uses; a breach
// throws DrawElementVerificationError and the orchestrator's disk-stage
// retry re-renders via screenshot.
await verifyDiskDrawElementSamples(
session,
{
workerId: 0,
startFrame: rangeStart,
endFrame: rangeEnd,
outputDir: framesDir,
outputFrameOffset: rangeStart,
},
false,
);
// Capture the sequential session's static-dedup perf before close (the
// counters are valid only while the session is live).
dedupPerfs.push(getCapturePerfSummary(session));