Problem
PR #49 routes Playwright browser-context permission and cookie commands through a Browser Control-owned root, but routing still relies on ownership alone.
- Explicit
browserContextId parameters are forwarded without validating that they match the selected root. Chromium can reject storage commands sent through a page target for another context, while permission commands may affect the wrong context.
- Multi-page named sessions choose the first owned root even when that target is crashed, so a healthy sibling cannot keep context APIs working.
- Raw clients fail as ambiguous whenever more than one root is visible, even when all roots belong to one Chromium context.
- Coverage sends synthetic CDP commands to a fake extension. It does not exercise Playwright
context.cookies(), addCookies(), grantPermissions(), or clearPermissions() against Chromium.
Desired behavior
Route by validated Browser Control ownership, Chromium context identity, and target health. Prefer the durable healthy default root for named sessions, reject mismatched explicit context IDs, and continue failing closed when roots span unrelated contexts. Keep Storage.clearCookies blocked by guardrails.
Coverage
Add a mandatory real-browser smoke case that:
- Adds, reads, and expires a uniquely named cookie through Playwright context APIs.
- Grants, queries, and clears geolocation permission.
- Repeats with a second session-owned page.
- Covers an explicit mismatched context ID and a crashed-first/healthy-second root.
- Verifies raw clients group roots by validated context identity without guessing across contexts.
Also decide whether Browser Control pins the supported Playwright version or tests the declared minimum and newest compatible release whenever root-routable methods change.
Problem
PR #49 routes Playwright browser-context permission and cookie commands through a Browser Control-owned root, but routing still relies on ownership alone.
browserContextIdparameters are forwarded without validating that they match the selected root. Chromium can reject storage commands sent through a page target for another context, while permission commands may affect the wrong context.context.cookies(),addCookies(),grantPermissions(), orclearPermissions()against Chromium.Desired behavior
Route by validated Browser Control ownership, Chromium context identity, and target health. Prefer the durable healthy default root for named sessions, reject mismatched explicit context IDs, and continue failing closed when roots span unrelated contexts. Keep
Storage.clearCookiesblocked by guardrails.Coverage
Add a mandatory real-browser smoke case that:
Also decide whether Browser Control pins the supported Playwright version or tests the declared minimum and newest compatible release whenever root-routable methods change.