v1.60.1.1 feat: allow Emulation.setEmulatedMedia on the CDP allowlist - #2419
Open
meshailabs wants to merge 1 commit into
Open
v1.60.1.1 feat: allow Emulation.setEmulatedMedia on the CDP allowlist#2419meshailabs wants to merge 1 commit into
meshailabs wants to merge 1 commit into
Conversation
browse cannot currently test any CSS media-feature branch. Under the deny-default CDP allowlist, Emulation.setEmulatedMedia 403s, so prefers-reduced-motion, prefers-contrast, prefers-color-scheme, and forced-colors are all unreachable. /qa and /design-review can see that a reduced-motion rule exists in the stylesheet but cannot prove it fires. Found while QA'ing a site whose CRT scanline overlay is suppressed under prefers-reduced-motion. There was no way to verify the suppression short of adding the method by hand and rebuilding. Scoped tab/trusted, matching the three Emulation entries already allowed (setDeviceMetricsOverride, clearDeviceMetricsOverride, setUserAgentOverride). The method returns an empty result and leaks no page content, so it is the same risk class. Like setUserAgentOverride the override persists on the tab until cleared with an empty features array, which the justification notes. Verified: cdp-allowlist + adversarial-security suites pass (8/8), the skill-docs freshness gate reports 0 stale, and bun run build produces no generated drift.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
The gap
browse cannot test any CSS media-feature branch today. Under the deny-default CDP allowlist,
Emulation.setEmulatedMedia403s:That makes
prefers-reduced-motion,prefers-contrast,prefers-color-scheme, andforced-colorsall unreachable./qaand/design-reviewcan see that a reduced-motion rule exists in the stylesheet, but cannot prove it fires. For skills whose stated job is live visual and accessibility QA, that is a real hole.I hit it QA'ing a site whose CRT scanline overlay is suppressed under
prefers-reduced-motion. There was no way to verify the suppression short of adding the method by hand and rebuilding.The change
One allowlist entry, scoped
tab/trusted, matching the threeEmulationentries already present (setDeviceMetricsOverride,clearDeviceMetricsOverride,setUserAgentOverride).Why
trustedis right here: the method returns an empty result. It emits no page content, so there is no marker-injection or exfil vector to wrap. Whytabis right: it mutates only the active tab's render state, exactly likesetDeviceMetricsOverride.The justification notes the one sharp edge, mirroring the existing
setUserAgentOverridenote: the override persists on the tab until cleared with an emptyfeaturesarray.Verification
browse/test/cdp-allowlist.test.ts(the 4-field CI lint)browse/test/adversarial-security.test.tsbun run gen:skill-docs --dry-run(skill-docs CI)bun run buildWorking end to end after a rebuild, against a live site:
body::afterdisplayprefers-reduced-motion: reducenoneprefers-contrast: morenonefeatures)blockEvery gate above was run per-file on purpose. A bare
bun testexits 0 after roughly 23 of 409 files regardless of failures (#2421), so a full-suite run is not evidence of anything here. Per-file runs return a real exit code and a summary line.Pre-existing failures, unrelated to this PR
mainis currently red: 87 test failures across fourbrowse/test/sidebar-*.test.tsfiles, from the v1.14.0.0 sidebar rip (#1216) removing endpoints andbrowse/src/sidebar-agent.tswithout removing their tests. Filed as #2420 with the full root cause.None of it is from this PR. I verified by running the affected files with this change applied and on a pristine
maincheckout: identical results either way (sidebar-integration.test.ts= 2 pass / 11 fail in both).Correction to an earlier revision of this description: I first wrote "11 failures", having only seen the tail of the output. The true figure is 87 across four files.
Notes
a325940(currentmain), not from my fork's stale default branch.1.60.1.1viabin/gstack-next-version --bump micro, which reportedno collision; clean bump from baseagainst the live queue.### Addedform used by other micro releases (e.g.0.18.0.1).