ship: v0.2 P3 API layer + integration #12
Reference in New Issue
Block a user
Delete Branch "phase/03-api-integration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
REQ-25/26/33: FastAPI routes (runs, methodologies with ETA/cost cards, lifecycle, SSE events with seq-watermark replay + terminal drain, config status with cost counters), openapi.json snapshot + openapi-typescript/openapi-fetch generated client, GeneratedApiClient live binding behind NEXT_PUBLIC_RESEARCHX_API_MODE (mock default), pauseRun/resumeRun extension (G-003), live exportReport. Verify: 1 P0 (browser-invisible mode flag) + 4 P1 fixed in-phase. Gates: 115 backend + 95 frontend. Tag target v0.2.3.
---ci--- phase: 3 milestone: v0.2 status: execute persona: backend-engineer task: T-3.2 requirements: covered: [REQ-25] ---/ci--- FastAPI app: POST /api/runs (201, fake adapters default, env-ready for live), GET /api/methodologies (cards with ETA minutes, token cost estimates labeled as estimates, why-recommended, resolved dials), GET /api/runs/{id} + approve/pause/cancel/resume lifecycle, GET /api/runs/{id}/events (sse-starlette; state replay on connect; stream terminates at terminal states - finished runs never hang a reconnecting client), GET /api/config (adapter status + G-007 cost counters), GET report + ledger artifacts. CORS localhost:3000 only. In-memory run registry, single uvicorn worker (single-user). Route tests via httpx ASGITransport on the same loop: full lifecycle over HTTP, SSE replay assertion, pause/resume/cancel, 404s, unknown- methodology rejection. 115 backend tests green.