Files
DocsGPT/application/api/user
Alex 5483eb0e27 refactor(mcp-oauth): read status from SSE journal, drop polling endpoint
MCPOAuthManager.get_oauth_status now walks the per-user SSE Streams
journal (user:{user_id}:stream) for the latest mcp.oauth.* envelope
matching the task id, returning the status string derived from the
event type suffix and the payload fields. The worker is the single
source of truth — its publish_user_event calls write the same
record the SSE client receives live.

Removed:
- /api/mcp_server/oauth_status/<task_id> route in
  application/api/user/tools/mcp.py
- mcp_oauth_status worker function and mcp_oauth_status_task Celery
  wrapper
- All mcp_oauth_status:{task_id} Redis setex writes (4 in mcp_oauth,
  2 in DocsGPTOAuth.redirect_handler / callback_handler)
- The update_status closure in mcp_oauth that wrote the polling
  payload

Tests updated:
- get_oauth_status now takes (task_id, user_id); new coverage walks
  a fake xrevrange response for the completed envelope, the no-match
  case, and a Redis-down case
- Removed TestMCPOAuthStatus route tests and TestMcpOauthStatusTask
  celery-wrapper test
- Removed the two oauth_status methods from the integration runner

mcp_oauth:auth_url/state/code/error Redis keys remain — they are
the OAuth flow's own state (not the dropped polling payload).
2026-05-12 16:01:31 +01:00
..
2026-04-18 13:13:57 +01:00
2026-05-12 14:29:45 +01:00
2026-04-27 22:09:33 +01:00
2026-04-18 13:13:57 +01:00
2026-04-18 13:13:57 +01:00
2026-05-12 14:29:45 +01:00
2026-04-27 22:09:33 +01:00
2026-04-18 13:13:57 +01:00
2026-02-11 14:15:24 +00:00
2026-04-18 13:13:57 +01:00