refactor(provider): rename subscription-provider symbols, files and directories - #2018
Merged
Merged
Conversation
…irectories Behaviour-free internal rename completing senpi#1989: TypeScript symbols, file names, the builtin extension directory and the matching test/QA script names now speak the canonical provider ids. - `CLAUDE_SDK_OAUTH_*` -> `ANTHROPIC_SUBSCRIPTION_*`, `ClaudeSdkOauth*` -> `AnthropicSubscription*`, `OpenAICodex*`/`openaiCodex*` -> `ChatGptSubscription*`/`chatgptSubscription*`, including the SCREAMING variants (`OPENAI_CODEX_MODELS`, `OPENAI_CODEX_PROVIDER_ID`, `OPENAI_CODEX_PROVIDER_LABEL`, the login-method and auth-claim constants). - `builtin/claude-sdk-oauth/` -> `builtin/anthropic-subscription/` (56 files), the provider/oauth/util modules and the catalog shard, plus the matching test and senpi-qa script names; the bundle script's oauth module map and every import follow. NOT renamed, because the symbol names the frozen WIRE API rather than the provider: `OPENAI_CODEX_RESPONSES_API`, `OpenAICodexResponsesOptions`, `CLAUDE_SDK_OAUTH_API_ID`, the `legacy-api-aliases.ts` export family, and the `api/openai-codex-responses/` directory itself. NOT renamed, because the NAME IS the compatibility window: the settings property `claudeSdkOauthProvider`, which `settings.ts` reads as `anthropicSubscriptionProvider ?? claudeSdkOauthProvider`. Renaming it would close the two-release legacy-read window early. Only the wrapping type symbol `SettingsWithClaudeSdkOauthProvider` was renamed. Every persisted VALUE is byte-identical: the seven frozen tokens, the `LEGACY_PROVIDER_IDS` map keys, and `claude-sdk-oauth-tool-watch`. Symbols holding those values were renamed; their string contents were not. Part of #1989
This was referenced Sep 22, 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.
Behaviour-free internal rename completing the senpi side of #1989 (todo 10). 280 files, 130
git mvmoves, one atomic commit.What renamed
Symbols (
CLAUDE_SDK_OAUTH_*->ANTHROPIC_SUBSCRIPTION_*,ClaudeSdkOauth*->AnthropicSubscription*,OpenAICodex*/openaiCodex*->ChatGptSubscription*/chatgptSubscription*, incl. the SCREAMING constants), the builtin extension directoryclaude-sdk-oauth/->anthropic-subscription/(56 files), the provider/oauth/util modules, the catalog shard, the matching test +senpi-qascript names, and the bundle script's oauth module map.What did NOT rename, and why
OPENAI_CODEX_RESPONSES_API,OpenAICodexResponsesOptions,CLAUDE_SDK_OAUTH_API_ID,api/openai-codex-responses/,legacy-api-aliases.tsfamilyclaudeSdkOauthProvider(the settings property)settings.tsreadsanthropicSubscriptionProvider ?? claudeSdkOauthProvider— that name IS the two-release compatibility window. Renaming it logs out every user whose settings predate the migration. Only the wrapping typeSettingsWithClaudeSdkOauthProvidermoved.Frozen VALUES are byte-identical
All 8 present verbatim in
packages/*/src:openai-codex-responses×100,claude-sdk-oauth-managed×10,claude-sdk-oauth-compact×4,senpi.claude-sdk-oauth.compact-boundary.v1×4,.claude-sdk-oauth-binding.json×3,CLAUDE_CODE_OAUTH_TOKEN×25,claude_sdk_oauth_×20,claude-sdk-oauth-tool-watch×3.LEGACY_PROVIDER_IDSkeys intact. Symbols holding a frozen value were renamed; their string contents were not.Numeric before/after (the acceptance criterion)
packages/aipackages/coding-agentThe coding-agent baseline is not clean: 4 known local-env failures (
agent-session-compaction4010>4000,terminal-bash-session-env$HOME/$TMPDIR,process-teardownrace,mcp/reconnecttiming) that pass on CI. Comparing names, not counts, caught two real regressions this pass:settings-provider-key-migration-offdisk.test.ts— the sweep rewrote the string"openaiCodexProvider", but there it is a legacy settings KEY, not a symbol; the assertion then contradicted the line above it. Restored.gpt-6-astra-context-window.test.ts— the shard filename was replaced in place, leaving the sorted list out of order.chatgpt-subscription.jsonre-sorted afterbai.json.A count-only check would have read "4 failed before, 4 failed after" and shipped both.
Gates (scoped)
bunx tsc --noEmit -p tsconfig.json— exit 0. That config'sincludeispackages/*/src/**/*andpackages/*/test/**/*, so it covers both packages and the ~83 renamed test files.bunx biome check --error-on-warnings— 0 errors (6 pre-existing infos in untouched files)bun run check:model-data— PASS; manifest regenerated, 42/42 sha256 entries match, 0 orphanschanges.mdmoved with its directory, no orphan at the old pathPart of #1989
Summary by cubic
Behaviour-free internal rename that switches subscription-provider symbols, files, and directories to the canonical names from #1989.
ClaudeSdkOauth*/CLAUDE_SDK_OAUTH_*becomesAnthropicSubscription*/ANTHROPIC_SUBSCRIPTION_*andOpenAICodex*/openaiCodex*becomesChatGptSubscription*/chatgptSubscription*across 280 files — the builtin extension directory, provider/oauth/util modules, the model-data catalog shard, tests, and senpi-qa scripts. Test pass counts are identical before and after.Refactors
claude-sdk-oauth/->anthropic-subscription/, the provider and OAuth modules, the catalog shard, and the matching test and script names in both packages.OPENAI_CODEX_RESPONSES_API,OpenAICodexResponsesOptions,CLAUDE_SDK_OAUTH_API_ID, andapi/openai-codex-responses/.settings-provider-key-migration-offdisk.test.tsand an out-of-order catalog list ingpt-6-astra-context-window.test.ts.Migration
openai-codex-responses,claude-sdk-oauth-managed,claude-sdk-oauth-compact,CLAUDE_CODE_OAUTH_TOKEN, andLEGACY_PROVIDER_IDS— only the symbols holding them were renamed.claudeSdkOauthProviderkeeps its name becausesettings.tsreadsanthropicSubscriptionProvider ?? claudeSdkOauthProvider; renaming it closes the two-release compatibility window and logs out users whose settings predate the migration.Written for commit 3c816ea. Summary will update on new commits.