You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Two OpenAPI audiences (internal + tenant-public) and the CI breaking gate over both #861
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
athvin commentedon Nov 9, 2026
Claimed — working in #1064 (draft), 2026-11-09T21:38:00Z. Closing that PR releases the claim.
wip: claim #861 — split API audiences and compare both contracts
feat(api): publish internal and tenant-public OpenAPI contracts