Skip to content

Generate TypeScript API types from the Rust schema - #57

Merged
melonamin merged 1 commit into
masterfrom
bb/generate-api-types-and-test-real-wasm-thr_bu5z2gsjvq
Aug 12, 2026
Merged

Generate TypeScript API types from the Rust schema#57
melonamin merged 1 commit into
masterfrom
bb/generate-api-types-and-test-real-wasm-thr_bu5z2gsjvq

Conversation

@melonamin

Copy link
Copy Markdown
Member

What changed

  • add a deterministic generator from docs/api_schema.json to committed packages/core/src/generated/api-types.ts
  • retain packages/core/src/types.ts as the ergonomic browser/WASM layer for encoding, completion, splitting, exports, runtime constants, helpers, and narrow public refinements
  • check generated declarations in schema compatibility and core TypeScript typecheck paths
  • expand schema compatibility coverage to every Rust schema root/definition and the complete runtime dialect enum
  • add a headless Chromium integration harness that loads the real built WASM, initializes it, and analyzes a representative join query
  • document regeneration, checks, and the real-WASM test command

Why

The public TypeScript models were handwritten mirrors of Rust and could drift silently; the previous schema tests validated only three sample values and most package tests mocked WASM.

Validation

  • just update-schema
  • just check-schema
  • yarn workspace @pondpilot/flowscope-core build
  • yarn workspace @pondpilot/flowscope-core build:no-wasm
  • yarn workspace @pondpilot/flowscope-core typecheck
  • yarn workspace @pondpilot/flowscope-core lint
  • yarn workspace @pondpilot/flowscope-core test --silent (46 tests)
  • just test-wasm-browser
  • yarn workspace @pondpilot/flowscope-react build
  • yarn workspace @pondpilot/flowscope-react lint
  • yarn workspace @pondpilot/flowscope-react test --silent (204 tests)
  • yarn workspace @pondpilot/flowscope-app typecheck
  • just fmt-check-ts
  • codex review --uncommitted — clean after fixing both accepted findings

@melonamin
melonamin marked this pull request as ready for review August 12, 2026 13:07
@melonamin
melonamin merged commit 8009446 into master Aug 12, 2026
7 checks passed
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.

1 participant