Expand description
The operation-coverage gate.
Vendoring a contract invites a quieter failure than drift: an operation the
server grows that a client silently never exposes. The gate partitions every
operationId in the vendored document into exposed and deliberately
unexposed, and fails — naming the unmapped ids — the moment a contract bump
adds one that is in neither list.
§The tables stay with the consumer
Only the mechanism lives here. EXPOSED / UNEXPOSED are a statement
about one client’s surface: a CLI that authors skills locally deliberately
does not expose a server-side skills store, and a client that does would
have to. Sharing the tables would make the gate report on the union of two
surfaces and silently stop protecting whichever client differs — which is
precisely the failure the gate exists to prevent, reintroduced one layer up.
§Usage
Each consumer keeps its own tables and calls check from a test:
const EXPOSED: &[(&str, &str)] = &[("listSessions", "sessions list")];
const UNEXPOSED: &[(&str, &str)] = &[("ping", "liveness probe; no CLI health verb asked for")];
coverage::check(EXPOSED, UNEXPOSED)?;Structs§
- Coverage
Report - What a coverage check found wrong.
Functions§
- check
- The assertion form of
report:Ok(())when the tables and the contract agree, and the rendered report as an error otherwise. - operation_
ids - Every
operationIdin the vendored contract, sorted. - report
- Compare a consumer’s coverage tables against the vendored contract.
Type Aliases§
- Table
- A coverage table:
operationIdpaired with prose for the reviewer and the failure message.