Repository navigation
test(engine): the decode timeout warning reaches every caller - #7119
Open
miguel-heygen wants to merge 5 commits into
Open
miguel-heygen wants to merge 5 commits into
miguel-heygen wants to merge 5 commits into
Conversation
…r stalls the frame
…ode timeout report
Contributor
There was a problem hiding this comment.
Approved at d5b7ede7.
This PR only adds tests, and the three of them cover the three recordBackgroundDecodeTimeouts call sites in frameCapture.ts: init (line 1385), the per-frame seek (line 3405) and the batch loop (line 5268). I checked them locally with vitest:
- On this head: 6 of 6 pass, on two separate runs.
- Breaking one call site at a time: I changed each
recordBackgroundDecodeTimeouts(...)tovoid (...). Each time exactly its matching test went red (1 failed, 5 passed), for init, the per-frame seek and the batch loop. - Turning off sanitizing: with
urls.map(sanitizeDiagnosticUrl)changed tourlsinrecordBackgroundDecodeTimeouts, all 3 "reported, sanitized" tests went red. So the credentials, query and fragment check really is enforced. - The
fails without the fix:line names the batch-loop case, and that case fails when its call site is removed. The other two cases fail the same way for their own call sites.
Nits, not blocking:
- The
backgroundPagedocstring says "the any url() background"; one of those words is extra. /SECRET|user|pw@|frag/matches the bare worduser. If a sanitized warning ever contains that word, the check will fail even though nothing leaked.user:oruser:pwwould be a tighter match.
miguel-heygen
dismissed
heygengenesis[bot]’s stale review
November 4, 2026 20:58
The base branch was changed.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds
packages/engine/src/services/frameCapture-decodeTimeoutCallers.test.ts, the connected tests left as a gap on #6972. Each drives the real caller and proves a non-empty background-decode timeout list reaches the sessionmedia_readiness_timeoutwarning with the url's credentials, query and fragment removed, and that an empty list adds none:completeDeferredDrawElementInitwith a page whose url() background never finishes decoding (realdecodeDynamicCssBackgroundImages, fake timers).captureFramethroughprepareFrameForCapture, same stuck page.captureFramesBatchPipelinedwithproduceDrawElementFrameBatchreturninglateBackgrounds.Tests only, no production change.
What I measured
What I did NOT exercise
captureFrameToBufferwraps the frame in a 15000ms deadline, equal to the decode timeout, so the test uses screenshot mode, which sharesprepareFrameForCapture.fails without the fix: packages/engine/src/services/frameCapture-decodeTimeoutCallers.test.ts "the batch loop: the late backgrounds of a batch are reported, sanitized"