feat: build the portable Claude account wallet - #1
Merged
Conversation
이미 열려 있던 터미널은 다른 터미널의 cct <라벨> 전환을 자동으로 따라가지 않는다. cct refresh 가 cct-active 의 활성 라벨을 읽어 현재 셸 env 에 재적용하고, 활성이 없으면 셸의 cct 인증 환경을 해제한다. - 예약어 목록·도움말·헤더 주석에 refresh 추가 - README(한/영)·CHANGELOG 명령 계약 표에 반영 - test_sticky 에 재적용·해제·사용법 오류 케이스 추가 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Product contract
cctremains an explicit, portable Claude account wallet: authenticate each account once with a long-lived setup token, keep the canonical wallet outside Git, and switch accounts on demand from the terminal across macOS, Linux, and WSL2.Scope
F2-G concurrency hardening
This draft now contains 24 scoped commits. The latest runtime fix closes the remaining wallet-lock ownership and active-state races while preserving the explicit account-selection contract. It serializes affected state transitions, refuses unsafe ownership handoffs, and preserves the current active state when a stale lifecycle action completes.
This follows the earlier runtime, installer, documentation, wallet-hardening, failure-path CI, and ShellCheck compatibility remediations already present in the draft. The two final CI-only follow-ups scope hosted ShellCheck diagnostics to their exact intentional constructs and make the Perl-fallback fixture explicitly bypass the production absolute GNU-timeout resolver; they do not change runtime behavior or test expectations.
RED → GREEN evidence
Each corrected race was first reproduced by a focused regression and then driven green by the minimal remediation. Local validation at the final head passes the clean full suite at 523/523, the inherited-environment full suite at 523/523, the dedicated race suite at 53/53, the final4 suite at 58/58, and the hosted failure-path selectors at 50/50, 20/20, 22/22, 38/38, and 106/106. ShellCheck 0.9 and current ShellCheck, Bash parsing, Zsh parsing, and whitespace checks also pass.
Final hosted validation is green on both macOS and Ubuntu: static checks pass, both complete environment variants pass 523/523 assertions, and the five established failure-path selectors pass 50/50, 20/20, 22/22, 38/38, and 106/106 on each operating system. The dedicated race and final4 suites are covered by the complete suite and remain separately recorded as focused local evidence.
Security and OSS boundary
The canonical wallet stays outside Git. Tests and CI use isolated fake fixtures and do not read or mutate a user wallet. The implementation adds no proxy, daemon, automatic routing, OAuth refresh storage, Keychain requirement, or new runtime dependency.
Rollback
Before merge, close this draft and delete the feature branch. After merge, revert the 24 scoped commits in reverse order if needed. Any local rollout remains deferred until separate release approval.