Skip to content

Build Stage 8 API v2 platform foundation #3792

Description

@anth-volk

Summary

Implement Stage 8 of the unified API v2-alpha migration plan: establish the dormant v2 data and cache platform without cutting production traffic away from the existing API v1 owners.

Scope

  • Provision and qualify a dedicated Supabase project used as direct Postgres and private object storage.
  • Add a canonical SQLModel v2 schema with stable reports separated from versioned, independently rerunnable report runs.
  • Add a distinct Postgres-only Alembic v2 chain, including autogenerated schema and data migrations, while leaving the v1 MySQL chain untouched.
  • Replace writable runtime SQLite and per-container Redis with managed, shared Redis-backed cache repositories.
  • Add Cloud Run, App Engine, CI, startup, lifecycle, cache-loss, and migration qualification coverage.
  • Preserve Cloud SQL, Flask/API v1 routes, Simulation Entrypoint selection, compute routing, and public response contracts as the production authorities.

Acceptance criteria

  • The Supabase v2 schema remains dormant during Stage 8.
  • Durable domain data never uses Redis, and cache loss is recoverable as a miss.
  • Production containers do not launch Redis or create a writable SQLite database.
  • V2 report and report-run identifiers and rerun idempotency keys use native UUIDs.
  • V1 MySQL migrations and existing API behavior remain unchanged.
  • Focused unit, Postgres lifecycle, migration-contract, formatting, and lint checks pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions