Repository navigation
feat(api): split internal and tenant-public OpenAPI contracts (#861) - #1064
Merged
Merged
Conversation
athvin
marked this pull request as ready for review
November 9, 2026 22:17
athvin
force-pushed
the
issue/861-api-audiences
branch
from
November 9, 2026 22:17
4cc9d27 to
d415cb7
Compare
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #861
What
Generate internal and tenant-public OpenAPI documents from the same source derivation. The public contract excludes operator and internal attempt routes; compatibility checks cover both audiences.
Why
Tenant consumers need a contract scoped to their credentials, while frontend TypeScript retains the complete internal surface. Component-only compatibility checks missed operation and request-input breaks.
Proof
make check,make frontend, andmake skills-checkpassed locally. CI is green ond415cb75; three independent house reviewers found no candidates. Both leak guards and strict route-removal checks were observed failing before restoration.Risk & rollback
Contract tooling and generated artifacts only. CI remains advisory; arbitrary schema compositions and query compatibility are still outside its coverage. Revert the squash commit to roll back.
Post-merge ledger
Closed by: Codex · session
Codex:01a1be1b-0c92-7703-a4c2-25cb2c999baaonMac-46· 2026-11-09T23:04:51Zmainis green with this change on it — merged3ed9cc4fac28cb99eebba0d14476c96346c8de9; rust 42712946825, frontend 42712946875, infra 42712946776 and devcontainer 42712946842 all succeeded. The full 30-minute watch completed at 2026-11-09T23:03:29Z with no new main failures, including descendant merges.imagesbuilt successfully for d3ed9cc in run 42712947055.deployconverged — exact merge d3ed9cc deployed to dev/prod in 42713719655, confirmed by both deploy-SHA log lines and preview API/readyz200. Later 42713998469 deployed descendant 83ffb0a with the same successful API probes. Peer PR #1069 records live dev-blue/prod-green selectors, ready replicas and zero restarts, and process-emitted web startup linesReady in 0ms: dev podweb-api-blue-6f47689bd-cx6zrat 22:45:19Z and prod podweb-api-green-55d9864f9d-kskw5at 22:45:02Z on 2026-11-09. This is attributed peer startup evidence from the colocated web process plus API readiness, not a direct er-server log read by this session; ancestry was verified locally.Donethrough automation — Two OpenAPI audiences (internal + tenant-public) and the CI breaking gate over both #861 is closed; its closing event names PR feat(api): split internal and tenant-public OpenAPI contracts (#861) #1064, and its project item reads Done.Specific to this change
Context — plan, discoveries, measurements, files
Plan
Decisions and limits
Internal has 97 paths / 113 operations; public has 84 paths / 98 operations. The four attempt operations use a distinct
attemptAuthscheme describing projected ServiceAccount or per-attempt fallback tokens. The shared response classifier follows returnedmap_or_elseclosures while excluding unrelated callbacks/background blocks.Request compatibility follows local references, nested objects/arrays and the emitter's nullable shape. It is bounded detection, not a complete schema-language compatibility engine. No handler behavior, branch protection or strict-mode policy changed. A missing public baseline is explicitly reported as initial publication; later PRs compare it against its own snapshot. TypeScript remains generated from internal.
Validation
make checkpassed after rebasing onto80c674ecand building its new native DuckDB profile.make skills-checkpassed.make frontend: 75 files / 922 unit-component tests; production build; 662 browser passes / 133 expected skips. Mac visual baseline comparison was skipped. Frontend content is byte-identical across the subsequent rebases.GET /healthzcaused strict exit 2 for both audience checkers; original sources restored.80c674ec, HEADd415cb75: instrumentation, tier and reuse each found no candidates, with separate derivation/adapter passes. No SQL changes; no verifiers needed. Review excluded gate-owned failures and general compatibility completeness.Files
Shared derivation in
er-api-spec; audience generation, compatibility and CLIs iner-server; both OpenAPI snapshots and internal TypeScript; advisory CI/classification helpers; the API-contract skill. The logging guard allowance is tightened to the actual CLI call count.