Skip to content

Freeze the egress control-plane contract in api-spec as the SSOT and generate the server and client scaffolding from it #29

Description

@yakimoto

Pillar: co-development.

WHY — Framing the deliverable as "API surface (axum/tonic)" is a trap: those are the most boringly production-grade, least differentiating parts of any Rust stack, and claiming them as WAVE value reads as padding. What is genuinely unowned and genuinely hard is the contract: what a viewport is as a resource, what a scope means, what a meter emits, what an activation decision returns. WAVE's differentiation is contract-first generation, not framework typing.

GROUNDEDopenapi.yaml — 2,744 lines, 34 path groups — is already the SSOT generating 5 SDK languages (sdks/sdk-{typescript,python,go,ruby,rust}). The single-source-of-truth discipline is proven in code: wave-gateway/src/scopes.ts:116 PROTOCOL_RESOURCES feeds both SKU-to-scope grants (catalog.ts:58) and per-protocol meters (usage.ts:102) so scope and billing cannot drift; scopes.ts:58 gates 139 /v1 groups; scopes.ts:22 denies any unmapped path, and a live probe confirms fail-closed behaviour end to end. The gRPC half is honestly G0: zero .proto files tree-wide, verified 2026-07-24.

BOUNDARY — WAVE does not own a third party's internal module API, an AI director's decision API, or NMOS/Catena/Ember+ schema authoring — that is the standards pillar, and it is claimed as the authorization and mapping layer, never as an implementation vendor. Do not claim gRPC production experience — there are no .proto service definitions in this tree and that is a five-minute check.

TAXONOMY — Third-party platform engineers; WAVE SDK consumers across 5 languages; broadcast integrators writing against an appliance; and every agent class — director, egress and metering agents all read this contract rather than a private API.

GATE — Entry G0 for the gRPC surface, G1 GROUNDED for the REST/OpenAPI surface, since the SSOT and generators exist and ship today → target G3.

DONE-WHEN — A new egress .proto plus the OpenAPI delta generate, in CI, both a compiling tonic server stub and a compiling sdk-rust client; and a round-trip test drives viewport.list / viewport.subscribe / meter.report against a mock and asserts the same wire shape from both generators. CI log captured as the receipt.

DEPENDENCIES — Consumes the viewport-ID codec grammar and the egress trait's type names so the wire contract and the linkable trait do not disagree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageOn the board but missing Type/Area/Priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions