Skip to content

fix: fix auth setup gating#119

Open
NianJiuZst wants to merge 1 commit intoMiniMax-AI:mainfrom
NianJiuZst:codex/fix-auth-setup-gating
Open

fix: fix auth setup gating#119
NianJiuZst wants to merge 1 commit intoMiniMax-AI:mainfrom
NianJiuZst:codex/fix-auth-setup-gating

Conversation

@NianJiuZst
Copy link
Copy Markdown
Contributor

Summary

  • skip API-key setup for dry-run commands so request previews work without credentials
  • allow auth status and auth refresh to run their own auth handling
  • treat saved OAuth credentials as satisfying auth setup for API commands
  • add CLI-level regression tests for dry-run, auth status, and OAuth credentials

Root cause

The main entrypoint ran ensureApiKey for most commands before command-specific dry-run or auth handling could execute. ensureApiKey also only recognized API keys, so OAuth-only sessions were blocked before request credential resolution.

Validation

  • bun test test/main.test.ts
  • bun run typecheck
  • bun test
  • bunx eslint src/main.ts src/auth/setup.ts test/main.test.ts

Note: full repository lint still has pre-existing failures in unrelated tests: test/auth/timeout-fix.test.ts and test/client/stream.test.ts.

@NianJiuZst NianJiuZst changed the title [codex] fix auth setup gating fix auth setup gating Apr 29, 2026
@NianJiuZst NianJiuZst changed the title fix auth setup gating [codex] fix auth setup gating Apr 29, 2026
@NianJiuZst NianJiuZst marked this pull request as ready for review April 29, 2026 18:04
@NianJiuZst NianJiuZst changed the title [codex] fix auth setup gating fix: fix auth setup gating Apr 29, 2026
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.

1 participant