Skip to content

Add durable control-plane state storage#179

Open
jynbil1 wants to merge 1 commit into
XortexAI:mainfrom
jynbil1:codex-durable-control-plane-161-v2
Open

Add durable control-plane state storage#179
jynbil1 wants to merge 1 commit into
XortexAI:mainfrom
jynbil1:codex-durable-control-plane-161-v2

Conversation

@jynbil1
Copy link
Copy Markdown

@jynbil1 jynbil1 commented May 13, 2026

Summary

  • add a Mongo-backed control-plane store for single-use OAuth/MCP tokens, admin sessions, and shared rate-limit counters
  • extend API keys with scopes, expiry, org/project bindings, and production fail-fast behavior for durable storage
  • wire auth/admin/rate-limit paths to durable state and add focused regression coverage

Verification

  • uv run --extra dev python -m pytest tests/unit/test_control_plane_store.py tests/unit/test_database_stores.py tests/api/test_dependencies_and_routes.py
  • uv run --extra dev ruff check src/database/control_plane_store.py src/database/api_key_store.py src/api/dependencies.py src/api/routes/auth.py src/api/routes/admin.py src/api/routes/api_keys.py tests/unit/test_control_plane_store.py tests/unit/test_database_stores.py tests/api/test_dependencies_and_routes.py

/claim #161

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a ControlPlaneStore to manage short-lived state such as admin sessions, OAuth tokens, and rate limits using MongoDB, replacing several in-memory implementations. API keys are enhanced with support for scopes, expiration, and organization/project bindings, including validation logic in the request dependencies. The update also enforces durable storage requirements for production environments and includes comprehensive unit tests for the new functionality. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant