Route computer and playwright calls directly to the VM - #164
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 default now includes computer and playwright, not just curl.
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 2e664a9 with unit, race, server-side, and live testing.
go test ./...andgo test -race ./...passed.- Three live browser sessions confirmed direct routing for screenshot, mouse position, batch, and Playwright execution.
- Request traces showed
{base_url}/browser/kernel/...with the session JWT and noAuthorization. - Process, filesystem, and telemetry-events calls remained on the API origin with authorization intact.
- Empty and computer-only env overrides behaved correctly.
- 16 concurrent computer/Playwright operations completed without failure.
- All test sessions were deleted afterward.
The server exposes the full computer/* surface and playwright/execute, and the metro proxy handles the complete /browser/kernel/* path. The only nit is that the PR description understates the scope by naming screenshot rather than the whole computer prefix.
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)
Same hop skip as the Node/Python SDKs. Comparison script: https://gist.github.com/tnsardesai/6704dfc86e2c0785e03beaf274aa672d
Same
eu-westsession. Published SDK still hitsapi.onkernel.com; this allowlist rewrite hits metro-api.Test plan
curl,telemetry/stream,computer,playwrightNote
Medium Risk
Changes where computer/playwright traffic is sent and how it is authenticated (JWT vs API key). Env override remains a kill switch.
Overview
Expands the default direct-to-VM allowlist so
computerandplaywrightrequests skip the control plane, same ascurlandtelemetry/stream.Those calls rewrite to the session
base_urlwith the session JWT and dropAuthorization.process,fs, andtelemetry/eventsstill hit the API.KERNEL_BROWSER_ROUTING_SUBRESOURCESstill overrides the list; empty still disables routing.Reviewed by Cursor Bugbot for commit 7f8a78d. Bugbot is set up for automated code reviews on this repo. Configure here.