Skip to content

feat(api): typed response structs, batch 5 — config versions (#1195) - #1207

Merged
athvin merged 2 commits into
mainfrom
issue/1195-typed-config-versions
Nov 24, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/1195-typed-config-versions

Conversation

@athvin

@athvin athvin commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #1195

Part of #864 (batch 5 of 10: config versions).

🚧 Claimed by an agent session — 2026-11-24T15:45:35Z, session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac.
The claim is this open draft PR: closing it releases the ticket.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Batch 5 of #864 converts the active config, the version list, one version, draft creation, publish, and the lexicon get/put to typed structs. 7 more operations now publish a $ref success schema (45 → 52 of 119).

Why

OpenAPI is the customer integration contract (#857), and configuration is step 3 of the documented workflow.

Proof

  • make check: 1,153 passed, 0 failed.
  • er-server --tests against Postgres: 387 passed.
  • Frontend tsc --noEmit is clean against the regenerated schema.d.ts.
  • envelopes.json is unchanged.
  • The /docs mobile baseline was regenerated in the pinned image and came out byte-identical.

Risk & rollback

Bodies are value-equal to the old ones; only key order changes. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:d1e3b2dc-3174-4091-9c30-c08fc4820306 on Mac · 2026-11-24T16:26:03Z

Specific to this change

Context — plan, discoveries, measurements, files

Plan

  • Add ConfigVersionView and ConfigVersionItem, each From the pg rows. These replace config_detail_json and the inline list map.
  • Add ConfigDraftCreated and ConfigPublished.
  • Add Lexicon and LexiconSaved over the existing request-side LexiconPair, which now also derives Serialize + ToSchema.
  • Value-equality tests in response_shape_tests.

Discoveries

Measurements

Files

rust/crates/er-server/src/{lib.rs,openapi.rs}, frontend/src/lib/api/{openapi.json,openapi.public.json,schema.d.ts}

…con (#1195)

The active config, the version list, one version, draft creation,
publish, and the lexicon get/put now return Serialize + ToSchema structs:
ConfigVersionView/ConfigVersionItem (From the pg rows), ConfigDraftCreated,
ConfigPublished, and Lexicon/LexiconSaved over the existing LexiconPair,
which now derives Serialize too and is the same shape in both directions.
7 more operations publish a $ref success schema (45 -> 52).

Value equality against the previous json! builds is pinned in
response_shape_tests; envelopes.json is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The marketing preview was removed because this PR is closed or merged.

@athvin
athvin merged commit e75f80d into main Nov 24, 2026
46 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 24, 2026 16:15 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — 860bf360 Deployed Nov 24, 2026 by athvin via remove closed PR previews #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#864 batch 5: typed responses for config versions

2 participants