Skip to content

gut(onboard-auth): remove dead onboard-auth.* cluster (#2338)#2349

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/2338-onboard-auth-cluster
Apr 13, 2026
Merged

gut(onboard-auth): remove dead onboard-auth.* cluster (#2338)#2349
alexey-pelykh merged 1 commit intomainfrom
gut/2338-onboard-auth-cluster

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

Closes #2338.

Deletes the entire src/commands/onboard-auth.* cluster — 13 files, ~3,500 LoC — plus 2 cascade files, totaling 15 files and 3,765 deletions. The cluster was a parallel credential-management layer with zero production callers. The live onboarding wizard (src/wizard/onboarding.ts) writes credentials directly via upsertAuthProfile in src/agents/auth-profiles.ts and never touches any of these files.

Deletions

Primary cluster (13 files, per issue body):

  • src/commands/onboard-auth.ts (barrel)
  • src/commands/onboard-auth.config-core.ts
  • src/commands/onboard-auth.config-core.kilocode.test.ts
  • src/commands/onboard-auth.config-gateways.ts
  • src/commands/onboard-auth.config-litellm.ts
  • src/commands/onboard-auth.config-minimax.ts
  • src/commands/onboard-auth.config-opencode.ts
  • src/commands/onboard-auth.config-shared.ts
  • src/commands/onboard-auth.config-shared.test.ts
  • src/commands/onboard-auth.credentials.ts
  • src/commands/onboard-auth.models.ts
  • src/commands/onboard-auth.test.ts
  • src/commands/onboard-non-interactive.provider-auth.test.ts

Cascade (2 files, flagged as "Cascades Unlocked" in the issue):

  • src/commands/zai-endpoint-detect.ts — imports 4 ZAI_*_BASE_URL constants from the deleted onboard-auth.models.ts; zero production callers (only its own test)
  • src/commands/zai-endpoint-detect.test.ts

Verification

  • git grep \"onboard-auth\" src/0 hits
  • git grep \"from.*commands/onboard-auth\" src/0 hits
  • git grep \"zai-endpoint-detect\" src/0 hits
  • pnpm check (format + tsgo + lint) → clean
  • pnpm test725 files, 6341 passed, 2 skipped, 0 failures

A fresh-context adversarial review dispatched as a workflow-polish subprocess independently verified symbol-level grep for every export (writeOAuthCredentials, applyOnboardAuthAgentModelsAndProviders, all 20 apply*Config functions, all 22 set*ApiKey setters, build*ModelDefinition helpers, detectZaiEndpoint, resolveZaiBaseUrl) — all zero hits. The live onboarding path via src/wizard/onboarding.ts was confirmed to reach upsertAuthProfile without touching any deleted file.

Sibling Coordination

Out of Scope

  • Manual remoteclaw onboard wizard smoke test (from issue AC) — recommended to run manually before merge, though no middleware code is touched so LIVE=1 pnpm test:live is not required by the project CI gate.

Test Plan

Deletes the entire src/commands/onboard-auth.* cluster (13 files,
~3,500 LoC) — a parallel credential-management layer with zero
production callers. The live onboarding wizard
(src/wizard/onboarding.ts) writes credentials directly via
upsertAuthProfile in src/agents/auth-profiles.ts and never touches
any of these files.

Also sweeps the cascade dependency src/commands/zai-endpoint-detect.ts
(and its test) — the file imports four ZAI URL constants from the
deleted onboard-auth.models.ts and has no production callers, making
it dead after the cluster removal.

Deletions (15 files total):

- onboard-auth.ts (barrel)
- onboard-auth.config-core.ts
- onboard-auth.config-core.kilocode.test.ts
- onboard-auth.config-gateways.ts
- onboard-auth.config-litellm.ts
- onboard-auth.config-minimax.ts
- onboard-auth.config-opencode.ts
- onboard-auth.config-shared.ts
- onboard-auth.config-shared.test.ts
- onboard-auth.credentials.ts
- onboard-auth.models.ts
- onboard-auth.test.ts
- onboard-non-interactive.provider-auth.test.ts
- zai-endpoint-detect.ts (cascade)
- zai-endpoint-detect.test.ts (cascade)

Verification:

- git grep "onboard-auth" src/ → 0 hits
- git grep "from.*commands/onboard-auth" src/ → 0 hits
- pnpm check: format + tsgo + lint all clean
- pnpm test: 725 files, 6341 passed, 2 skipped, 0 failures

The Pi-era provider-stub cascade files (src/agents/{huggingface,
synthetic,together,venice}-models.ts, models-config.providers.ts,
src/secrets/provider-env-vars.ts) become orphaned after this change
and will be swept in the parallel sibling issue #2337.
@alexey-pelykh alexey-pelykh merged commit b8fbefd into main Apr 13, 2026
10 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/2338-onboard-auth-cluster branch April 13, 2026 12:19
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.

gut: delete dead onboard-auth.* cluster (13 files, ~2,500 LoC orphaned credential layer)

1 participant