Repository navigation
feat(producer): fail a render that cannot finish within its maxRenderMs budget - #6224
miguel-heygen wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head 473ecff6
The guard keeps running after capture finishes, so it fails renders during encode and assemble. That contradicts the PR body's "Encode and assemble time after capture is not counted." Details are inline.
Scope
Read the full diff. Checked that every framesRendered writer and every abortSignal: executionSignal site picks up the combined signal (capture HDR, segmented, streaming and disk, plus assemble). Checked that publicMetadata reaches errorMetadata through server.ts. renderEtaGuard.test.ts and captureStreamingStage.test.ts (bun) pass locally. server.renderTooSlow.test.ts could not run here because of unbuilt workspace packages; I left that to CI, which was still in progress. No prior reviews.
— Genesis reviewer
Edit accuracy: accurate 271 (base branch 271), smooth 138 of thoseThe gate passes. Quarantined, measured but not gated (0) |
There was a problem hiding this comment.
Verdict: APPROVE — 1 resolved, 0 open, 0 new · 473ecff6 → caa5b3dc
My simulated-clock repro no longer trips after capture completes, and the new test fails without the fix. Required checks are green. The non-required Fallow audit fails on 5 items in the new code: 3 unused exports or members, and CRAP 31.6 against a threshold of 30 on the guard's timer.
— Genesis reviewer
What changes for users
A render request can now carry a time budget (
maxRenderMs). If the render is projected to take clearly longer than the budget, the producer stops early and says why, instead of crawling until the caller's own timeout kills it. WithoutmaxRenderMsnothing changes, so local CLI renders are unaffected.How it works
checkRenderEta) is used at two points:RENDER_TOO_SLOW(not retryable, owner user), with the stage, frames done and total, ms per frame, ETA and budget in the message and inerrorMetadata. It is on the producer server's safe-error-code list, so it reaches the JSON and SSE error events.maxRenderMsis validated on the render routes (non-negative integer, 0 means no guard).Verification
tsc --noEmitclean.Not covered
renderOrchestrator.tsthat turns the guard's abort into the finalRENDER_TOO_SLOWerror has no test (it needs a real browser render); it is covered by the type check and review only.maxRenderMs.