Repository navigation
Conversation
…e-pair, and backfill the WSL registration id
…ngrades, and remember several re-pairs - A WSL pairing only hands its cookie jar to the stable identity when it was made under the same registration GUID. Pairings now record their GUID; ones that recorded none count only when the GUID was captured when the host was added. A GUID backfilled later, or a re-import observed from the registry, starts a fresh jar. - Adoption adds the stable fingerprint as an alias on the existing binding instead of overwriting it, so an older build still resolves the same partition with no binding conflict. - Keep up to four replaced pairings, so repeated re-pairs before the first page still adopt the original jar.
…t on the registration read A WSL host's browser partition now trusts the distro's registration GUID only when this process just read it from the registry and it matches the record. A failed, timed-out, or mismatched read keeps the revision-scoped identity and adopts nothing. Starting the browser host for a WSL environment waits (bounded) for that read, then re-reads the record it may have updated.
nwparker
force-pushed
the
nwparker/stable-runtime-browser-partition
branch
2 times, most recently
from
October 21, 2026 01:20
a27588f to
b77de09
Compare
8 of 9 tasks
nwparker
force-pushed
the
nwparker/stable-runtime-browser-partition
branch
from
October 21, 2026 01:39
b77de09 to
57fe0cd
Compare
Contributor
Author
|
Superseded by #29610: the browser partition identity no longer uses the WSL registration GUID; it keys on the environment id and the server's pinned key, so this gate is no longer needed. |
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.
Shared paths this PR touches
startPairedRuntimeBrowserClientHost(the callruntimeEnvironments:prepareBrowserClientHostPlacementmakes) now takesuserDataPath. For WSL environments only, it waits for the distro's registration read before it picks a partition. Other hosts return immediately and nothing about them changes.persistWslHostConnectionnow also runs on a dropped connection (null) so it can forget that connection's registry read.WslHostService.handleConnectionChangecalls it withnulltoo.ELI5
The risk: a WSL distro that was re-imported, or whose registration Orca couldn't read, could reuse another distro's browser logins.
#29610 gives each WSL host's in-app browser a cookie jar keyed by the distro's Windows registration ID. A distro that is unregistered and re-imported under the same name gets a new ID, and so a new, empty jar. #29610 had a hole, though. When the registry read failed, Orca used the ID it had saved earlier. That saved ID could belong to the distro that existed before the re-import, so the new distro could open the old one's signed-in jar.
With this PR the browser trusts the ID only when Orca has just read it from the registry and it matches what's saved. Otherwise the browser falls back to today's per-pairing jar and takes nothing over from the stable one.
What Changed
paired-runtime-browser-authority-identity.ts):liveWslDistroId: the registration ID this process read from the registry.wsl-host-connection-record.ts):reg.exefailure doesn't keep the user on the fallback jar for the whole connection.paired-runtime-browser-client-host-runtime.ts):reg.exeitself times out at 5s. On timeout or failure the start takes the fail-closed path, so the browser never hangs.browser_client_host_pairing_changed, the same error placement already uses.observeWslHostRegistration. It claimed an unreadable registry "changes nothing, so identity fails closed", but the saved GUID was still used.When the registry read recovers
Why
reg.exe, so the read stays fire-and-forget there. Browser start is the only consumer that needs the result, so it waits there, bounded.Known limitations
Linked Issue
N/A (maintainer; follow-up to #29610's re-review).
Visual Proof
N/A: no UI change. The behaviour is in partition selection, which the tests cover.
Testing
Automated tests:
Verification:
pnpm tcpnpm test src/main/browser src/main/wsl src/main/ipc/runtime-environments(3082 passed)pnpm run check:code-quality:changedReview: an adversarial review found two MEDIUM issues (the 30s shared cache, and a failed read pinning the fallback jar for the whole connection). Both are fixed here. Its LOW notes are listed above as known limitations.
Platforms: macOS locally (unit level). WSL behaviour is covered by tests with the registry read injected.
ORCA_INTERNAL_WSL_HOSTSwas not enabled.Review
Agent skill upstream boundary
Notes
reg.exeper WSL connection update, plus a retry only after a failure.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)