Skip to content

Add guided multi-account setup and evaluation - #14927

Draft
williammartin wants to merge 4 commits into
williammartin-multiaccount-draft-07-explainfrom
williammartin-multiaccount-draft-08-evaluation
Draft

williammartin wants to merge 4 commits into
williammartin-multiaccount-draft-07-explainfrom
williammartin-multiaccount-draft-08-evaluation

Conversation

@williammartin

@williammartin williammartin commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Prototype overview and documentation

DO NOT MERGE. This stack is almost entirely vibe coded. These drafts are for handy review and prototyping, not merging as-is.

Expect the code to be really bad in places: highly coupled, handling edge cases that do not really matter, or doing suspiciously fragile things like parsing GraphQL request bodies.

I suspect some of the suspicious code also exposes the complexity of this feature set, because account selection, Git configuration, scope precedence, worktrees, SSH and API requests all interact.

The prototype experience is the purpose, not the code. I want to find out whether the experience is useful, not defend this implementation or treat it as a design to preserve.

Description

Follow on from #14926

Evaluating persistent authentication changes needs a clear setup path and a way to isolate the experiment. This PR adds guided setup, developer evaluation tools and debug-only keyring isolation.

Layer 8 of an eight-part prototype review stack. This is a way to review the design and implementation in smaller pieces, not a proposal to merge the current stack as-is.

How did you test this change?

I exercised the debug keyring-isolation capability and reset in disposable configuration. I read the actual global and managed files before reset, then saw the user include remain and authenticated with the retained real account.

$ cat ~/.gitconfig; cat ~/.ordinary.gitconfig
[include]
	path = /Users/Shared/gc-H8vKqb/r-5aVX8u/home/.ordinary.gitconfig
[user]
	name = Ordinary Author
	email = ordinary@example.invalid

Reset privately before returning to stable gh

multiaccount-layer-8-02-Reset-privately-before-returning-to-stable-gh.mp4

Verify the debug runner prerequisite before using accounts

multiaccount-layer-8-03-Verify-the-debug-runner-prerequisite-before-using-accounts.mp4

Key points

This layer adds evaluation and setup tooling, not a new identity storage format. The reset recording exercises cleanup already available in the stack so reviewers can see how to return to ordinary configuration.

Live evaluation tools are optional and can create GitHub resources. The offline review scripts use synthetic accounts and deny network and Keychain access. Real-account recordings are separate from those scripts.

Notes for reviewers

Start with the setup approval boundaries, then isolation and cleanup. The guided-agent workflow and full live acceptance runner were not exercised for these recordings. Reset managed configuration before removing a prerelease executable referenced by Git.

The recordings use the product code at this layer, not a later stack endpoint. The included offline replay scripts are supplementary and do not reproduce the live-account recordings.

Offline replay on macOS

Build this layer, then run its synthetic scenario with an absolute executable path. This is a replay instruction, not a claim that the command below was used to make the videos.

make
env -i HOME="$HOME" PATH=/usr/bin:/bin:/opt/homebrew/bin \
  /bin/bash script/multiaccount-review/08-reset.sh --gh "$PWD/bin/gh" --stable-gh /absolute/path/to/stable/gh

Authorship and follow-up

Who wrote this:

  • A human wrote it.
  • An agent wrote it under close human direction.
  • An agent wrote it independently, and no human has guided the implementation beyond the initial prompt.

Who answers review comments:

  • @username will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted.
  • Nobody has explicitly committed to replying.

Acceptance Criteria

Prototype behaviour under review:

Given a developer explicitly chooses to evaluate the prototype.

When the isolated workflow is used and the experiment is reset.

Then managed identity wiring is removed while ordinary user configuration and saved accounts remain.

DO NOT MERGE

williammartin and others added 4 commits November 3, 2026 22:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 965836ef-19ac-4473-ba1f-e326ce0f106b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 965836ef-19ac-4473-ba1f-e326ce0f106b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 965836ef-19ac-4473-ba1f-e326ce0f106b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 965836ef-19ac-4473-ba1f-e326ce0f106b
Copilot AI balanced review requested due to automatic review settings November 3, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Offline fixtures still access the operator’s native keyring, while other active findings identify broken standard acceptance runs, lost API gateway routing, and missing direct capability-output coverage.

4 open issues
What changed in this PR

This final layer of the multi-account prototype stack adds guided setup and evaluation tools around the existing identity system. It remains a draft experiment, not a merge-ready design.

Changes:

  • Adds approval-focused onboarding guidance and evaluation scenarios.
  • Introduces live walkthroughs, offline regression journeys, and reset/downgrade checks.
  • Adds debug-only keyring isolation and a protected acceptance lifecycle.
File Description
script/​multiaccount-review/​08-reset.sh Replays reset and stable-binary recovery.
script/​identity-e2e/​runner_test.go Tests runner setup, interaction, isolation, and cleanup.
script/​identity-e2e/​runner_helper_test.go Supplies fake gh and SSH executables.
script/​identity-e2e/​run.sh Adds guided live identity journeys and resource cleanup.
script/​identity-e2e/​reset_downgrade_test.go Checks configuration preservation across reset and downgrade.
script/​identity-e2e/​README.md Documents setup, evaluation, limitations, and recovery.
script/​identity-e2e/​offline_test.go Adds offline identity and routing regression journeys.
script/​identity-e2e/​fixture_test.go Provides synthetic accounts and simulated Git transports.
script/​identity-e2e/​bootstrap.sh Implements account selection, isolated setup, and guided prompts.
pkg/​cmd/​version/​version.go Reports when debug keyring isolation is enabled.
internal/​keyring/​keyring.go Blocks keyring operations under debug isolation.
internal/​keyring/​isolation_test.go Checks isolation preserves existing keyring credentials.
internal/​debug/​config.go Adds the debug keyring-isolation setting.
internal/​debug/​config_test.go Clears the new setting during test setup.
internal/​config/​identity_isolation_test.go Checks isolated login/logout preserves operator tokens.
acceptance/​testdata/​identity/​identity-lifecycle.txtar Exercises identity lifecycle and worktree behavior.
acceptance/​README.md Documents lifecycle isolation and credential requirements.
acceptance/​acceptance_test.go Adds isolation gating and private token-file helpers.
.github/​skills/​setting-up-identites/​tests/​scenarios.json Defines offline onboarding and approval-boundary cases.
.github/​skills/​setting-up-identites/​SKILL.md Adds guided prototype setup and scoped undo instructions.
.github/​skills/​setting-up-identites/​references/​workflow.md Provides inspection, setup, verification, and cleanup examples.

Review effort: Balanced

Comment on lines +132 to +133
f.executable("security", "exit 44\n")
f.executable("secret-tool", "exit 1\n")
Comment on lines +938 to +939
if !debug.Enabled {
ts.Fatalf("this lifecycle requires -tags=acceptance,ghdebug to isolate OS keyring access")
Comment on lines +22 to +23
mkdir identity-config
env GH_CONFIG_DIR=$WORK/identity-config
Comment on lines +30 to +31
if disabled, _ := debug.Config().DisableKeyring.Value(); disabled {
output += "OS keyring: disabled (isolated debug workflow)\n"

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants