Skip to content

Add CI guard for ws-types.ts against ws-schema.json drift #457

@jessica-claude

Description

@jessica-claude

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.jsonopenapi-typescriptgenerated-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.ts is either generated from ws-schema.json (preferred) or validated against it in CI
  • A field rename in a WS payload type fails CI if ws-types.ts is not updated
  • The existing ws-schema.json freshness check continues to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    CICDCI/CD pipelines and release automationarea:uiWeb UI / dashboardenhancementNew feature or requestsize:smallQuick win, < 1 hour

    Projects

    Status

    Refinement

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions