Skip to content

build: OpenAPI-generated TS client + CI drift gate #191

Closed

Description

@CameronBrooks11

Part of the local-API GUI architecture epic. This is the single-source-of-truth contract — the "treat-as-separate-repo" enforcement.

Scope

  • Generate the frontend client + types from the FastAPI OpenAPI spec (openapi-typescript or similar).
  • CI regenerates and fails on drift, and fails if the frontend references anything off-spec.
  • Retire the hand-written zod response schemas (lib/schemas.ts) and the mislabeled "auto-generated" Marlin interfaces (lib/tauri-types.ts) — the generated types supersede both.

Why

Today the response contracts are hand-maintained copies of the backend shapes (and already drift: plan camelCase vs simulate snake_case). The repo already has precedent for generated types (wind-schema.ts).

Acceptance

  • A backend schema change fails CI on any frontend code that's out of sync; no hand-maintained response types remain.

Activity

  1. added
    python
    gui
    ci
    on Jun 26, 2026
  2. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Plan-review verdict (2026-06-25): KEEP, but continuous (not Phase-A-complete). Gate infra + compute-route client land in Phase A; 'no hand-maintained response types remain' must trail #190/#199 (Phase B) — retirement of lib/schemas.ts/lib/tauri-types.ts follows the job routes. Generated client must take runtime baseUrl + Authorization (Tauri injects the #192 port + token); no hand-patched header. Depends on #141 landing a single canonical $id + one schema generator first — two generator scripts currently overwrite the same file and disagree.

  3. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    PR #205 delivers the first two parts of this issue: the OpenAPI-generated TS client (fiberpath_gui/src/api/, from a committed openapi.json) and the CI drift gate (backend regenerates the spec, GUI regenerates the client, each fails on git diff — verified to catch drift both ways).

    Left open here for the third acceptance item: retire the hand-maintained response types (lib/schemas.ts zod response schemas, lib/tauri-types.ts) and fail CI on off-spec frontend references. That can only happen once the GUI actually consumes the generated client, so it lands with #193. This issue closes when #193 retires those types.

  4. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Closed: the hand-maintained GUI response types were retired in #193 (merged via #208) — the OpenAPI-generated client types now supersede them. The client + drift gate landed earlier in #205.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciguipython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions