fix(engine): cap static-frame dedup verification at 60 s so it cannot outlast the first-frame stall (#7532)

Long caption overlays plan thousands of verification screenshots, so the
verification budget clamped at its 300 s ceiling in every render worker. That
equals the producer's 300 s first-frame and session-init stall floor, so the
stall always won and the render failed before its first frame. Verification
fails closed on exhaustion (dedup is disabled for unverified runs and normal
capture proceeds), so a lower ceiling costs only some frame reuse.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-11-11 01:49:42 +00:00
committed by GitHub
co-authored by Claude Sonnet 5.5
parent 941049a844
commit f78da2d674
2 changed files with 7 additions and 7 deletions
@@ -135,8 +135,8 @@ describe("verifyStaticFramesSafe catches drift the old fixed-point density would
expect(result.outcome).toBe("time_budget");
expect(result.verifiedFrames.size).toBe(0);
// 8 s shots: the 300 s ceiling, not the 15 s floor, ends it
expect(pageScreenshotCapture).toHaveBeenCalledTimes(38);
// 8 s shots: the 60 s ceiling, not the 15 s floor, ends it
expect(pageScreenshotCapture).toHaveBeenCalledTimes(8);
});
});
@@ -256,7 +256,7 @@ describe("composition-wide static verification planner", () => {
{
now: () => nowMs,
capture: async () => {
nowMs += 1_000;
nowMs += 500;
return Buffer.from("same");
},
},
+4 -4
View File
@@ -3929,12 +3929,12 @@ export async function computeStaticFrameSet(
const STATIC_VERIFY_REFERENCE_STRIDE = 24;
// Wall budget for verification: 15 s is the floor; above it the budget is 1.5x
// planned shots x the first shot's seek+capture time, capped at 300 s (nothing
// was gained past 600 s on a 4K job). Exhaustion fails closed: dedup is
// disabled for the unverified runs and normal capture proceeds.
// planned shots x the first shot's seek+capture time, capped at 60 s so it ends before
// the producer's 300 s first-frame stall that every worker's verification runs inside.
// Exhaustion fails closed: dedup is disabled for unverified runs and capture proceeds.
const STATIC_VERIFY_MAX_MS = 15_000;
const STATIC_VERIFY_HEADROOM = 1.5;
const STATIC_VERIFY_CEILING_MS = 300_000;
const STATIC_VERIFY_CEILING_MS = 60_000;
// Two captures (anchor + comparison) are the minimum proof for a run. Four hundred
// therefore permits 200 fully verified runs while bounding pathological schedules.
const STATIC_VERIFY_MIN_SCREENSHOT_CAP = 400;