Skip to content

fix(auth): recover OAuth flows after transient failures#2060

Merged
wbxl2000 merged 4 commits into
MoonshotAI:mainfrom
wbxl2000:codex/fix-oauth-401-recovery
Apr 24, 2026
Merged

fix(auth): recover OAuth flows after transient failures#2060
wbxl2000 merged 4 commits into
MoonshotAI:mainfrom
wbxl2000:codex/fix-oauth-401-recovery

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

  • N/A

Summary

  • route connection recovery retries back through the full auth recovery path so a post-timeout 401 can force-refresh OAuth instead of immediately surfacing /login
  • refresh managed-platform models through OAuthManager and retry once on 401 so startup model sync can recover stale access tokens
  • add regression coverage for both retry paths

Testing

  • uv run pytest tests/core/test_auth_error_handling.py tests/core/test_kimisoul_retry_recovery.py tests/auth/test_platforms.py
  • uv run ruff check src/kimi_cli/soul/kimisoul.py src/kimi_cli/auth/platforms.py tests/core/test_kimisoul_retry_recovery.py tests/auth/test_platforms.py

Open in Devin Review

Copilot AI review requested due to automatic review settings April 24, 2026 12:33

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@wbxl2000
wbxl2000 force-pushed the codex/fix-oauth-401-recovery branch from cc4f0d6 to 96f8c92 Compare April 24, 2026 14:13
@wbxl2000
wbxl2000 merged commit b5f48ef into MoonshotAI:main Apr 24, 2026
14 checks passed
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.

2 participants