-
Notifications
You must be signed in to change notification settings - Fork 4
Add CI guard for ws-types.ts against ws-schema.json drift #457
Description
Description
frontend/src/api/ws-types.ts (106 lines) is hand-authored TypeScript that mirrors frontend/ws-schema.json. There is no CI step that validates the two stay in sync. A field rename in any WS payload type (e.g., AppStatusChangedData) updates ws-schema.json via export_schemas.py but leaves ws-types.ts stale — the frontend compiles with old field names and fails at runtime, not build time.
This was identified during the challenge review of #415 (decouple core from web layer) but deferred as a pre-existing gap.
Context
The REST API side now has full codegen: openapi.json → openapi-typescript → generated-types.ts, validated by CI. The WS side has the schema guard (check_schemas_fresh.py validates ws-schema.json) but no type generation from that schema.
Acceptance Criteria
-
ws-types.tsis either generated fromws-schema.json(preferred) or validated against it in CI - A field rename in a WS payload type fails CI if
ws-types.tsis not updated - The existing
ws-schema.jsonfreshness check continues to work
Metadata
Metadata
Assignees
Labels
Projects
Status