Spaces:
Paused
Paused
Commit History
-
fix: resolve all identified backend and frontend bugs
dushyantsingh0 +1: Claude Sonnet 4.6Backend fixes: - agents/nexus_master.py: Wrap each tool task with asyncio.wait_for(15s) so slow KB/embedding calls cannot stall the entire LangGraph graph (B2). Add outer + per-block try/except in sanitize_mermaid so a bad diagram never crashes the responder (B8). Reduce identity cache TTL from 3600s to 300s so role changes propagate to the agent within 5 minutes (B12). - core/config.py: Strengthen SECRET_KEY guard — now raises RuntimeError whenever DEBUG=False regardless of NEXUS_ENV, catching any non-dev deployment that ships with the insecure default key (B5). - core/token_blocklist.py: On Redis failure in blocklist_token, write to in-memory cache (TTL capped at 300s) so revocations are honoured within the process even when Redis is unavailable (B6). Also populate L1 cache on successful Redis write to avoid an immediate Redis round-trip. - core/websockets.py: _dispatch_local now captures dead connections returned by _send_all and removes them from the appropriate…9eaba40
-
fix: use local Redis for WebSocket pub/sub, not Upstash
dushyantsingh0 +1: Claude Sonnet 4.6The previous approach (polling get_message every 100ms across 4 workers) would have consumed ~3.5M Upstash commands/day — far beyond any free tier. Root cause was using CACHE_REDIS_URL (Upstash) for pub/sub. Upstash is a serverless/HTTP Redis designed for short request-response operations. It imposes a 30-second idle-connection timeout and bills per command, making it fundamentally unsuitable for a persistent pub/sub listener. Fix: route WebSocket pub/sub through LOCAL_REDIS_URL (localhost:6379). The local Redis is already started by run_prod.sh and all 4 Gunicorn workers share the same host, so local pub/sub fan-out works correctly. Zero Upstash commands consumed. No idle timeouts. No polling hacks needed. Changes: - main.py: pass settings.LOCAL_REDIS_URL to ws_manager.start_pubsub() instead of settings.clean_cache_redis_url - core/websockets.py: revert subscriber to clean listen() loop (no polling, no keepalive PING), simplify _get_pub_redis() to use local URL directly Note…5df217f -
fix: prevent Upstash pub/sub idle-disconnect with 20s keepalive PING
dushyantsingh0 +1: Claude Sonnet 4.6Upstash Redis closes idle TCP connections after 30 seconds. The previous listen() loop had no way to send keepalive traffic, so each worker's WebSocket subscriber would timeout and reconnect every ~30 s, causing: - Noisy WARNING logs every 30 s per worker process - 2-second gap per reconnect where cross-process WS delivery fell back to local-only mode Fix: replace listen() with a get_message(timeout=0.1) polling loop that sends pubsub.ping() every 20 s on the pub/sub connection itself. PING resets Upstash's server-side idle timer, so the connection stays open indefinitely. Also removes socket_timeout from the subscriber connection config since the 100 ms poll interval now controls responsiveness. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b34dce7 -
feat: scale backend to 10K concurrent users via Redis pub/sub + ARQ streaming
dushyantsingh0 +1: Claude Sonnet 4.6Four root bottlenecks addressed: 1. WebSocket cross-process delivery (core/websockets.py, main.py) - ConnectionManager now publishes broadcasts to Redis pub/sub channels (nexus:ws:workspace/user/role/ticket:{id}) instead of delivering directly to in-process sockets. - Each API worker runs a background subscriber task that receives published messages and delivers them to its own WebSocket objects. - Fallback to local-only delivery when Redis is unreachable. - Without this, multi-worker deployments silently dropped most WebSocket messages because each process held its own isolated connection map. 2. SSE streaming decoupled from HTTP workers (tasks/nexus_ai.py NEW, api/v1/nexus_stream.py) - POST /nexus/stream/ now: auth → rate-limit → enqueue nexus_stream_task to ARQ heavy queue → return SSE that reads Redis Stream via XREAD. - nexus_stream_task (new ARQ heavy task) runs LangGraph and publishes each SSE event to nexus:stream:{job_id} vi…356a201
-
backend stabilization
dushyantsingh0c65ce91 -
backend stabilization
dushyantsingh04a6adfb
-
fix: resolve typescript build errors in internal portal navigation
dushyantsingh01049d57
-
backend stabilization
dushyantsingh06ba1c48
-
backend stabilization
dushyantsingh0e440c64
-
Beta 1.0: Pure Backend Release (Excluding Frontend)
dushyantsingh05eb4857