Repository navigation
Fetch configure extensions by reference from the metro API - #502
Merged
Merged
Conversation
/chromium/configure accepts extensions.ref parts naming an extension, its sha256 and a grant. kernel-images-api fetches each from the metro API's extension cache with its instance token before applying anything, verifies the checksum, and treats it as an uploaded extension. A failed fetch returns 500 with step extension_fetch and leaves the instance unchanged, so the caller can resend the request with the archives uploaded.
masnwilliams
force-pushed
the
hypeship/configure-extension-refs
branch
from
November 2, 2026 19:01
1f6fbb0 to
edae3ce
Compare
Each reference starts a fetch, so limit references plus uploaded extensions to the same 20 the upload endpoint allows.
Count uploaded and referenced extensions together once parsing finishes, so part order cannot get more than 20 through.
Only proxy-v3 variants boot with KERNEL_METRO_API_BASE_URL. Every VM boots with SESSION_INTEL_URL, which the same metro API serves, so a non-forked VM without the metro URL can still fetch extensions instead of sending every create down the upload fallback.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 558a347. Configure here.
An extension grant now carries a presigned URL for the object the metro fills its cache from, which with temporary credentials runs to a few KiB. Raise the per-reference cap from 8 KiB to 16 KiB.
hiroTamada
approved these changes
Nov 19, 2026
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
/chromium/configurecan now take anextensions.refpart instead of an uploaded zip. Each part names an extension, its sha256 and a grant. kernel-images-api fetches the archive from the metro API's extension cache (GET {KERNEL_METRO_API_BASE_URL}/extension-archive/{name}), authenticating with its instance token and the grant. It verifies the checksum and then handles the extension exactly like an uploaded one.This lets the control plane skip downloading, decrypting and uploading extension archives on every browser create. The caller and the metro API side are in kernel/kernel (linked below).
Behavior
prefer_cdp) is decided afterwards, from the fetched extensions.500with the new stepextension_fetchand leaves the instance unchanged. The caller can resend the same request with the archives uploaded. A failure can be a non-200, a checksum mismatch, an archive over 64 MB, or a missing metro URL or instance token.400 unknown form field "extensions.ref", also before applying anything./chromium/configuretoo, which had no limit before. The API already caps extensions per browser at 20.instanceIdentityProvider, so a forked VM uses the identity it was given after boot.KERNEL_METRO_API_BASE_URL, while every VM boots withSESSION_INTEL_URL, served by the same metro API. The fetcher falls back to it, so non-forked VMs without the metro URL can fetch too. Other users of the metro URL (the WebAuthn hook) are unchanged.Changes
lib/extensionfetch: the fetch client (single attempt, 30s timeout, sha256 verify, size cap,0600output file).chromium_configure.go: parseextensions.ref(16 KiB cap, validated name and checksum), thenfetchExtensionRefsbefore configure. The grant is opaque to the VM. It now carries a presigned URL for the metro's cache fill, about 3.5 KiB in practice, hence the larger cap.openapi.yaml: documents the part and addsextension_fetchto the error step enum.lib/oapiis regenerated; the only changes are the new enum constant and the embedded spec.api.Newtakes the fetcher;main.gowires it to the instance identity.Testing
go test -race ./cmd/api/... ./lib/extensionfetch/ ./lib/oapi/passes.extItems; a failing fetch reported asextension_fetchwith nothing applied; the fetch client's headers, checksum, refusal and unconfigured cases.make oapi-generatesteps on the base commit reproduce the committedoapi.gobyte for byte. The regenerated file in this PR comes from the same steps.