fix(server): isolate remote web session cookies - #208
Merged
Conversation
Remote `akeru serve` instances on the same hostname all used `t3_session`. Browsers do not scope cookies by port, so one server could overwrite another. Remote production cookies now use the persisted environment ID. Valid legacy cookies still migrate when they authenticate the request. CLI pair and auth load that identity without launcher IPC. Adapted from pingdotgg#8085. Implemented with Grok 4.6 High in Grok Build via Orca.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR isolates remote production browser sessions by deriving cookie names from a persisted environment identity while retaining authenticated migration from the former shared cookie.
Confidence Score: 5/5No confirmed issues require changes before merging. There are no outstanding prior findings, confirmed new behavioral issues, or repository-rule violations. Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/remote-sess..." | Re-trigger Greptile |
This was referenced Sep 10, 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.
Problem
Remote
akeru serveinstances on the same hostname all usedt3_session. Browsers do not scope cookies by port, so one server could overwrite another server session.Fix
Remote production web cookies now use the persisted environment ID. The name survives state-directory moves and stays distinct for separate environments that share the same host.
Valid legacy
t3_sessioncookies still migrate, but only when the legacy cookie authenticated the request. Current cookies and Bearer tokens take precedence.Environment identity persistence is separate from the full server descriptor.
akeru authandakeru paircan load the saved ID without checking launcher IPC. The running server still performs launcher checks for launcher-dependent capabilities.Desktop and development cookie behavior stays unchanged.
Adaptation
Reviewed port of pingdotgg/t3code#8085. Akeru has no hosted account path, so remote production no longer keeps a shared cookie name. DPoP credential selection was not added; Akeru's request auth remains cookie, bearer, then legacy cookie.
Scope
This PR is only remote cookie isolation and environment-identity persistence. SSH runner ownership, LAN vs Tailscale pairing, Zed remote open, media assets, and preview recordings are separate PRs.
Verification
vp test runonutils,EnvironmentAuthPolicy,SessionStore,EnvironmentAuth,EnvironmentAuthAdmin,ServerEnvironment,server,bin, andpairtests: 171 passed.vp run --filter akeru-bot typecheckexited 0.This is a server cookie and identity change. No live bot/group UI surface changed. Two-environment browser pairing remains for later remote-connection PRs.
Limitations
Implemented with Grok 4.6 High in Grok Build via Orca.