Skip to content

fix: MiniMax stubs, PKCE cleanup, driver defaults, sandbox tests#1116

Open
AlexZander85 wants to merge 2 commits intoRightNow-AI:mainfrom
AlexZander85:fix/driver-defaults-pkce-v2
Open

fix: MiniMax stubs, PKCE cleanup, driver defaults, sandbox tests#1116
AlexZander85 wants to merge 2 commits intoRightNow-AI:mainfrom
AlexZander85:fix/driver-defaults-pkce-v2

Conversation

@AlexZander85
Copy link
Copy Markdown
Contributor

Summary

  • Remove unused generate_pkce / generate_state functions and their tests from oauth_providers.rs
  • Add 6 provider_defaults tests (codex, gemini, qwen, minimax, copilot, vertex-ai)
  • Add 2 shell-wrapper regression tests in subprocess_sandbox.rs
  • Clean MiniMax OAuth: replace dead Ok branches with minimal stub implementations + TODO comments (Rust requires exhaustive match)
  • Fix copilot driver: key_required=false, vertex-ai default port 8600

Changed files

  • crates/openfang-runtime/src/oauth_providers.rs - PKCE removal, doc comment cleanup
  • crates/openfang-runtime/src/drivers/mod.rs - copilot key_required, vertex-ai defaults, 6 provider_defaults tests
  • crates/openfang-runtime/src/subprocess_sandbox.rs - 2 shell-wrapper tests
  • crates/openfang-api/src/routes.rs - MiniMax stub implementations

Test plan

  • cargo build --workspace --lib - compiles clean
  • cargo test -p openfang-api -p openfang-runtime -p openfang-types - all 910+ tests pass
  • cargo clippy --workspace --all-targets -- -D warnings - zero warnings

Part of #1030 OAuth providers review split (PR 2 of 3)

…with vault token persistence

Adds a new oauth_providers module with device-flow implementations for
OpenAI Codex, Google Gemini, Qwen (DashScope), and MiniMax. Tokens are
persisted to both the in-memory vault and secrets.env for dual-write
durability. The Copilot flow is preserved unchanged.

New routes:
  POST /api/providers/openai-codex/oauth/start
  GET  /api/providers/openai-codex/oauth/poll/{poll_id}
  POST /api/providers/gemini-oauth/oauth/start
  GET  /api/providers/gemini-oauth/oauth/poll/{poll_id}
  POST /api/providers/qwen-oauth/oauth/start
  GET  /api/providers/qwen-oauth/oauth/poll/{poll_id}
  POST /api/providers/minimax-oauth/oauth/start
  GET  /api/providers/minimax-oauth/oauth/poll/{poll_id}

UI: Settings page shows Login buttons for each provider with device-code
display and polling feedback.
- Replace MiniMax dead-code Ok branches with minimal stub implementations + TODO
- Add State(_state) to minimax_oauth_poll for future token persistence
- Remove unused PKCE generate_pkce/generate_state functions and their tests
- Clean up doc comments (remove redundant blank lines, update module description)
- Fix copilot provider_defaults: key_required=false (uses OAuth, not API key)
- Add vertex-ai provider_defaults (GOOGLE_APPLICATION_CREDENTIALS)
- Add 4 OAuth provider_defaults tests (codex, gemini, qwen, minimax)
- Add copilot + vertex-ai provider_defaults tests
- Add 2 shell-wrapper regression tests in subprocess_sandbox
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