Route computer and playwright calls directly to the VM - #170
Merged
Conversation
Add computer and playwright to the default browser routing allowlist so screenshot and execute traffic can skip the control plane once metro-api records activity on the kernel proxy.
The asserted list can grow; the test name should not.
tnsardesai
marked this pull request as ready for review
August 20, 2026 23:06
sjmiller609
approved these changes
Aug 21, 2026
rgarcia
approved these changes
Aug 21, 2026
rgarcia
left a comment
Contributor
There was a problem hiding this comment.
QA’d commit 8439fe5 from a developer’s perspective.
- Full Jest suite: 408 passed.
- Focused routing experiments covered all 12
computer/*methods,playwright/execute, request bodies, headers, VM errors, cache eviction, pool acquisition, env overrides, and control-plane fallback. - Direct requests use
{base_url}, inject the session JWT, and removeAuthorization. process/*,fs/*,telemetry/events, logs, and replays remain on the API origin.- Missing
base_urlandKERNEL_BROWSER_ROUTING_SUBRESOURCES=""correctly disable direct routing.
Non-blocking: the PR description mentions screenshot/execute, but the computer prefix routes the entire computer/* surface. It would be useful to state that explicitly and add a nested-path test such as computer/clipboard/read.
No blocking findings.
3 tasks
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.
Summary
Default direct-to-VM routing now includes
computerandplaywrightin addition tocurlandtelemetry/stream.computer/screenshotandplaywright/executerewrite to{base_url}/...with the session JWT and dropAuthorization.process/*,fs/*, andtelemetry/eventsstay on the API origin.KERNEL_BROWSER_ROUTING_SUBRESOURCESstill overrides the default list. An empty value still disables routing.Metro-api activity recording for
/browser/kernel/*has been merged in kernel/kernel#3417. That was the hard gate for this allowlist flip. The kill switch is leavingbase_urlunset or settingKERNEL_BROWSER_ROUTING_SUBRESOURCESto empty.Latency (eu-west)
Comparison script: https://gist.github.com/tnsardesai/6704dfc86e2c0785e03beaf274aa672d
Same
eu-westsession. Published@onkernel/sdk@0.93.0still hitsapi.onkernel.com; this branch rewrites to metro-api.Test plan
curl,telemetry/stream,computer,playwrightNote
Medium Risk
Changes default request routing for computer and Playwright APIs (auth header dropped, JWT on VM URL). Env kill switch remains; process/fs/events stay on the control plane.
Overview
Default direct-to-VM routing now includes
computerandplaywrightalongsidecurlandtelemetry/stream. Screenshot and Playwright execute calls rewrite to the sessionbase_urlwith a JWT query param and dropAuthorization.process,fs, andtelemetry/eventsstill go to the control plane.KERNEL_BROWSER_ROUTING_SUBRESOURCESstill overrides the list (empty disables routing).Reviewed by Cursor Bugbot for commit 386880d. Bugbot is set up for automated code reviews on this repo. Configure here.