[FEAT] fresh-user origin accounts (claude/codex/gemini) - #22
Merged
Conversation
…keychain) Adds the claude + idempotency/edge tests and fixes seedsCodex/seedsGemini to pass a no-login fake keychain. The seeder loops all tools, so a real .live keychain in any test lets the claude branch copy the real Claude Code-credentials item into a stray per-account service — the macOS keychain is global and NOT isolated by ORRERY_HOME. All seeder tests now inject a fake; verified the keychain item count is unchanged across the run.
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.
Implements
docs/superpowers/specs/2026-07-07-fresh-origin-account-design.md(spec + plan committed on this branch).What
For a user who never used Orrery, takeover already moves
~/.<tool>into the origin workspace, but nothing created an account. This adds a tool-genericOriginAccountSeeder.seedOriginAccountsIfNeeded()(run frommain.swiftright beforeenforceOriginClaudeDir) that, per tool with no origin account and a capturable login:originaccount,auth.json/oauth_creds.jsonviaAccountLoginFlow.importFrom; macOS claude:copyKeychainItemfrom the defaultClaude Code-credentialsservice),ClaudeAccountMigration.migrateAccount→ link-only account;enforceOriginClaudeDirthen repoints~/.claude.Idempotent + best-effort; existing installs untouched (guarded on "no origin account"). New installs only.
Keychain testability
KeychainAccessis an injectable seam overClaudeKeychain. Every seeder test injects a fake — the macOS login keychain is global and NOT isolated byORRERY_HOME, so.livein a test creates strayClaude Code-orrery-*items. Verified: the seeder-only test run leaves the keychain item count unchanged.Test plan
pluginsmirrored) + keychain copiedClaude Code-credentials→ per-account service (fake keychain records the call)🤖 Generated with Claude Code