Repository navigation
Description
Gap against the closed shipped card #575 ("Typed API contract — OpenAPI to
TypeScript, drift-gated"). The contract and its drift gates are real; 15
entities cross the JSON wire with nothing in the document describing them.
The code says so itself —
rust/crates/er-server/src/openapi.rs:146-155, verbatim:
Entities that declare
wire: [json]but carry no component schema.This is a backlog, not a design.
Wire::Jsonmeans the entity's payloads
cross the JSON wire, so every name here is reachable as JSON with nothing in
the document describing it. The list may shrink — register theToSchema
above and delete the line — and must not grow.
The list
JSON_WIRE_WITHOUT_SCHEMA, openapi.rs:156-171:
candidate_key column_profile entity_link ingest_batch
matching_model metric_snapshot metric_snapshot_source
pair_label profile_finding profile_run record_quality
s3_ingest_cursor tag tagging webhook_delivery
Why it costs something
Three consequences, none of which go red today:
- No generated TypeScript.
openapi-typescriptemits from
frontend/src/lib/api/openapi.json, so a BFF handler or component touching
any of these shapes is hand-typing it — andfrontend.yml:158's
git diff --exit-code -- src/lib/api/schema.d.tscannot notice a type that
was never generated. This is the same shape as the full-stack-tier bug class
already recorded in this repo: the mock asserts the frontend's belief, not
the server's behaviour. er-openapi-checkcannot track them for breaking changes. It diffs
component schemas (scripts/ci/api-breaking-gate.sh); an entity with no
schema has nothing to diff, so a removed field or a retype on any of these 15
is invisible to the gate. Noteprofile_run,profile_finding,
column_profileandrecord_qualityare the whole of the Data profiling and quality #580 profiling
surface, andpair_labelis on the review/labeling path.- The gate forces a decision but does not force a good one — adding
wire: [json]to a new entity fails the test until someone adds a line to
this list, and adding the line is the cheap way out.
Do
Per entity, decide and act — this is a sequence of small independent changes,
not one big one:
- Register the
ToSchemainApiDocand delete its line (the documented
shrink path), or - Drop
wire: [json]from itsentity.yamlif its payloads do not in fact
cross the wire — which is the real question fors3_ingest_cursor,
candidate_keyandmetric_snapshot_source, all of which look internal.
Registering one is a public-API decision (openapi.rs:153): it becomes a
documented schema er-openapi-check then tracks. So take them in order of
exposure — the profiling four and pair_label first, since those have screens
behind them.
Verify
cargo test -p er-server openapi and
cd frontend && corepack pnpm gen:api && git diff --exit-code -- src/lib/api/schema.d.ts.
Each registration regenerates openapi.json and schema.d.ts; both are
committed artifacts and both are drift-gated, so a partial regeneration fails.
Activity
athvin commentedon Nov 8, 2026
Claimed — working in #900 (draft). Closing that PR releases the claim.
feat(api): register the 15 wire:[json] entities as component schemas (#…
wip: claim #762 — OpenAPI component schemas for the 15 wire:[json] en…
feat(api): register the 15 wire:[json] entities as component schemas (#…
feat(api): OpenAPI component schemas for the 15 wire:[json] entities (#…