Skip to content

refactor(mvp): harden runtime and streaming flow - #9

Merged
talhasarit merged 5 commits into
mainfrom
codex/reliable-mvp-hardening
Mar 10, 2026
Merged

refactor(mvp): harden runtime and streaming flow#9
talhasarit merged 5 commits into
mainfrom
codex/reliable-mvp-hardening

Conversation

@talhasarit

@talhasarit talhasarit commented Mar 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • add lifespan-managed app settings/runtime resources, explicit store selection, and honest health/readiness semantics
  • harden adapters, pipeline state transitions, and SSE replay/error handling for a reliable PRD-only MVP
  • narrow the frontend/docs/package surface to implemented behavior and add regression coverage for runtime, streaming, pipeline, frontend helpers, and CLI wiring

Verification

  • ruff check .
  • ruff format --check .
  • mypy backend frontend tests
  • pytest -q

Note

Medium Risk
Touches core request/streaming flow, runtime lifecycle, and LLM adapter error handling; regressions could break PRD runs or SSE replay despite added test coverage.

Overview
Refactors the backend into a lifespan-managed runtime with centralized AppSettings, structured logging, and explicit state-backend selection (redis/memory/auto fallback) plus a new /ready endpoint that reflects store health.

Hardens generation/streaming by persisting richer PRDState (adds idea + terminal error), broadcasting via a shared fan-out StreamerService, and making /api/v1/stream/{run_id} replay the latest persisted state before streaming subsequent revisions (including terminal completion/error states).

Updates vanilla LLM adapters to use typed AdapterError, configurable models/timeouts, the google-genai SDK, and structured success/failure logging; pipeline execution now records truthful step transitions and persists terminal errors without faking successful content. Frontend/docs/env/Docker packaging are narrowed to shipped PRD-only behavior, and extensive unit/integration tests are added for runtime selection, SSE replay, pipeline transitions, CLI wiring, and frontend helpers.

Written by Cursor Bugbot for commit bb46c14. This will update automatically on new commits. Configure here.

Comment thread frontend/app.py Outdated
Comment thread backend/pipelines/pipeline_runner.py
Comment thread backend/pipelines/pipeline_runner.py Outdated
Comment thread backend/runtime.py
Comment thread backend/routes/generation.py
Comment thread backend/routes/generation.py Outdated
Comment thread backend/main.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread backend/runtime.py
Comment thread backend/pipelines/pipeline_runner.py
@talhasarit
talhasarit merged commit 671fa60 into main Mar 10, 2026
5 checks passed
@talhasarit
talhasarit deleted the codex/reliable-mvp-hardening branch March 10, 2026 22:09
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