pi: honor BETTERWRIGHT_PROFILE for a separate persistent identity - #75
Open
ekenberg wants to merge 1 commit into
Open
pi: honor BETTERWRIGHT_PROFILE for a separate persistent identity#75ekenberg wants to merge 1 commit into
ekenberg wants to merge 1 commit into
Conversation
The CLI and the MCP server already read BETTERWRIGHT_PROFILE so two processes on one home can run as different signed-in identities; the Pi extension silently ignored it, so a second Pi session always contended for the default profile and fell over to an ephemeral, signed-out one. Resolve the profile eagerly (options.profile over the env var) so an invalid name fails at extension load, and pass it to the browser like the other env-resolved options.
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.
The CLI and the MCP server both read
BETTERWRIGHT_PROFILEso two processeson one home can run as different signed-in identities; the docs describe the
env var as setting "the identity for a whole shell". The Pi extension
silently ignored it — so a second concurrent Pi session always contended for
the default profile and fell over to the ephemeral, signed-out fallback,
with no way to opt into a named persistent profile.
Resolve the profile eagerly (
options.profileover the env var, mirroringthe MCP server's
profileFromEnvsemantics) so an invalid name fails atextension load rather than as a mysteriously signed-out browser later, and
pass it to the constructed BetterWright alongside the other env-resolved
options. The three doc references to "which the MCP server reads too" now
include the Pi extension.
Testing
npm run release:checkgreen.env) throws at extension load; a valid name is accepted.
default profile, one with
BETTERWRIGHT_PROFILE=scratch— no lockcontention, both persistent, vault shared across both.