Skip to content

fix(test): tolerate stale screencast frames in viewport e2e test#1245

Merged
ctate merged 1 commit intomainfrom
ctate/fix-flaky-stream-viewport-test
Apr 16, 2026
Merged

fix(test): tolerate stale screencast frames in viewport e2e test#1245
ctate merged 1 commit intomainfrom
ctate/fix-flaky-stream-viewport-test

Conversation

@ctate
Copy link
Copy Markdown
Collaborator

@ctate ctate commented Apr 16, 2026

Summary

  • Fix flaky e2e_stream_frame_metadata_respects_custom_viewport test that intermittently fails on CI with wrong JPEG dimensions (e.g. 361 instead of 600 height). Chrome's Page.startScreencast maxWidth/maxHeight are upper bounds, and early frames can arrive before the viewport resize fully takes effect. Instead of asserting exact JPEG dimensions on the first frame, skip frames with stale dimensions and wait for one that matches within the existing 15s deadline.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-browser Ready Ready Preview, Comment Apr 16, 2026 5:39am
agent-browser-env-demo Ready Ready Preview, Comment Apr 16, 2026 5:39am

Chrome's `Page.startScreencast` `maxWidth`/`maxHeight` are upper bounds,
and early frames can arrive before the viewport resize fully takes effect.
Instead of asserting exact JPEG dimensions on the first frame, skip frames
with stale dimensions and wait for one that matches.
@ctate ctate force-pushed the ctate/fix-flaky-stream-viewport-test branch from 17e664d to cc489d6 Compare April 16, 2026 05:38
@ctate ctate merged commit dba3823 into main Apr 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant