Repository navigation
feat(api): OpenAPI component schemas for the 15 wire:[json] entities (#762) - #900
Merged
Merged
Conversation
2 tasks
athvin
marked this pull request as ready for review
November 8, 2026 20:19
athvin
force-pushed
the
issue/762-openapi-schemas
branch
from
November 8, 2026 20:49
75954af to
001e3f6
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 #762
What
Register all 15
wire: [json]entities that had no component schema —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— inApiDoc, and emptyJSON_WIRE_WITHOUT_SCHEMA(the gate stays; the backlog goes to zero). Regenerateopenapi.jsonandschema.d.ts.Why
Undocumented wire shapes are invisible to three gates:
schema.d.tsgeneration, theer-openapi-checkbreaking-change diff, and any consumer reading the document. Every one of the 15 is in fact served as JSON today (evidence in Context), so the right move is registration, not droppingwire: [json].Proof
Work in progress — claim commit only.
Risk & rollback
Additive only: new component schemas, no path or handler change, no behavior change.
er-openapi-checkreports additions as compatible.git revertis the rollback.Post-merge ledger
Closed by: the post-merge watch on
6844d956and its successor7cfeafc8mainis green with this change on it —6844d956's ownrustpush run was concurrency-cancelled when
fda2fb65landed behind it, so theproof is the successor
7cfeafc8(has6844d956as an ancestor):rustsuccess,
frontendsuccess,infrasuccess,devcontainersuccess — and6844d956's ownfrontend/infra/devcontainer/imageswere greenbefore the cancel:
imagesbuilt — success on6844d956(er-server's openapi.rs isin the api image):
deployconverged — success on6844d956itself, and again on thesuccessor
7cfeafc8; the helm upgrade completed and the new colour rolledout (same proof shape as fix(schema): a NOT NULL column with a declared default is additive (#904) #905's REVISION-162 deploy):
6844d956and7cfeafc8;driftlatest success;kindnightly latestsuccess:
Donethrough the automation and 15 entities declare wire: [json] with no OpenAPI component schema — an in-code backlog with no ticket #762 isclosed (verified on the board, not by hand):
owed beyond what the issue already tracked; the projection-vs-entity
caveat is recorded in this body's Context for the future per-path
operations work, which has no ticket yet and needs none until paths are
added to the document:
this body's Discoveries;
JSON_WIRE_WITHOUT_SCHEMA's doc comment recordsthat the list emptied here and why de-wiring was rejected for all 15:
Specific to this change
Context — plan, discoveries, measurements, files
Plan
openapi.rs: add the 15 generated structs toApiDoc'scomponents(schemas(...)); emptyJSON_WIRE_WITHOUT_SCHEMA(keep the constant + both guard tests — the must-not-grow gate is the thing that stops this regressing).cargo run -q -p er-server --bin er-openapi > ../frontend/src/lib/api/openapi.json, thencd frontend && corepack pnpm gen:api.cargo test -p er-server openapi(snapshot + both gap guards), the frontend drift check (git diff --exit-code -- src/lib/api/schema.d.tsafter gen),make check.Discoveries — why all 15 register, none drop
wire: [json]Every entity on the list has a live read path in
er-serverwhose rows are served as JSON:profile_run,column_profile,profile_finding,record_quality) —read.rsserves them through the profile/explain and quality endpoints;VALUE_BEARING_COLUMN_FIELDSexists precisely because these rows reach viewers redacted.pair_label— review/labeling path (16 refs inlib.rs).tag/tagging— the tag service merged in feat(tags): reserved system tags, per-tag permission, tags in export (#805) #875 (taggings_index, per-subject reads).entity_link,matching_model— link/model surfaces inlib.rs.ingest_batch,metric_snapshot,metric_snapshot_source,candidate_key—read.rs: ingest activity feed, metrics endpoint, per-run source metrics, and the profile explain endpoint's blocking-key candidates.webhook_delivery— the webhook delivery log (pg.rs/webhook.rs).s3_ingest_cursor— the S3 sources endpoint hand-maps cursor rows into its JSON (lib.rs:7760); the entity's columns ARE the wire shape.Discoveries — the projection caveat
The registered component is the entity struct; several endpoints serve a projection instead:
candidate_key,metric_snapshot,metric_snapshot_sourcereads return generated row types (ForRunRow,RecentRow,ByRunRow) — subsets.S3IngestCursorrows into a custom object (lib.rs:7760); the profile endpoints redact value-bearingcolumn_profilefields for viewers (VALUE_BEARING_COLUMN_FIELDS).No contradiction results while
openapi.jsoncarries"paths": {}— the components are a vocabulary, not an operation contract. When per-path docs arrive, an operation serving a projection must reference a projection schema, not the entity component. Noted here so the operations ticket starts from it.Files
rust/crates/er-server/src/openapi.rs— registrations + emptied backlog.frontend/src/lib/api/openapi.json,frontend/src/lib/api/schema.d.ts— regenerated.