Skip to content

Two OpenAPI audiences (internal + tenant-public) and the CI breaking gate over both #861

Closed

Description

@athvin

API product implementation work · roadmap #1008 · use parent dependency order; not a separate product rank.

Part of #857. Stack rank 4 of 13. Depends on: T3.

Color

The CI ticket. One document for the frontend and agents, one for tenants — and the public filter is derived, not curated: drop role: operator routes (operator is not mintable as an API key — Role::parse_key_role refuses it, so those routes are structurally unreachable by any tenant credential) and /v1/internal/* (the per-attempt token channel, already excluded from the MCP manifest with a stated reason). Internal-visibility columns are already gone via T1, so the public document needs no schema-level curation either.

Scope

  • openapi_json(Audience) with Internal (everything) and Public (filtered as above).
  • er-openapi --audience public|internal; commit frontend/src/lib/api/openapi.public.json; one snapshot test per document.
  • breaking_changes gains path-level classes its component-schema list cannot see: an operation removed, a path parameter added, a required request property added. Runs over both documents.
  • scripts/ci/api-breaking-gate.sh diffs both documents against origin/main.
  • The gate stays advisory — strict flips at the first external org key, per the rationale already committed in rust.yml and the check binary. schema.d.ts keeps generating from the internal document (the frontend is an internal consumer).

Out of scope

Making any check required (branch protection is out of scope for the epic). The docs UI (T10).

Testing

  • Tests riding the existing entities job (no new required check): public ⊆ internal; zero operator routes and zero /v1/internal/* paths in the public document.
  • Observe the gate failing: remove a route locally, watch er-openapi-check report the removed operation against both documents, restore.
  • make check.

Definition of done

Epic DoD, plus: both documents committed and snapshot-pinned; api-breaking-gate.sh output visibly covers both in a PR run; the public-document leak assertions exist and have been seen failing.

Activity

  1. added
    rust
    mvp
    on Nov 8, 2026
  2. self-assigned this
    on Nov 9, 2026
  3. athvin commented on Nov 9, 2026

    @athvin
    OwnerAuthor

    Claimed — working in #1064 (draft), 2026-11-09T21:38:00Z. Closing that PR releases the claim.

  4. added 2 commits that reference this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

mvprust

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions