fix(ts): wire schema.forecast_nwp.v1 into TS codegen pipeline#72
fix(ts): wire schema.forecast_nwp.v1 into TS codegen pipeline#72zax0rz wants to merge 4 commits into
Conversation
…stlyrightmd#63) - Resolve the latent GFS precipitation twin bug by adding a `_pick_record` helper to forecast_nwp.py. It filters duplicates by prioritizing instantaneous records and breaking ties using lowest `record_no`. - Implement `cloud_cover_pct`, `visibility_m`, and `cloud_ceiling_m` for GFS and HRRR. - Define and integrate physics-bounds QC rules for the three new fields. - Regenerate schema.forecast_nwp.v1 JSON schemas. - Add comprehensive test coverage in test_qc_rules_nwp.py, test_forecast_nwp.py, and test_forecast_nwp_multi_cycle.py. - Include planning artifacts and research briefs in .briefs/ directory.
Reverted accidental inclusion of all extras in root dependency list. The [nwp] extra pulls eccodes which is not available in CI without the full extra install, causing test detection guards to pass while the actual eccodes binary fails to load.
Addresses P2 review finding on PR mostlyrightmd#68: NWP schema was exported to schemas/json/ but not listed in SCHEMA_FILES, so pnpm codegen never emitted ForecastNwpV1 types or validators for TS consumers. Changes: - Add schema.forecast_nwp.v1.json to SCHEMA_FILES in codegen.ts - Regenerate all generated TS files (codegen --check passes) - ForecastNwpV1 interface, ajv validator, and format-map entry now emitted Existing validator function renumbering (ajv internal) is cosmetic and expected when adding a schema to the standalone compilation batch.
|
Closing as superseded by v1.6.0 (already on This PR wires The generated TS surface here is byte-identical to |
Summary
Addresses P2 review finding on PR #68:
schema.forecast_nwp.v1was exported toschemas/json/but not listed inSCHEMA_FILES, sopnpm codegennever emittedForecastNwpV1types or validators for TS consumers.Per CLAUDE.md dual-SDK rule, TS codegen parity is required when new schemas are added.
Changes
schema.forecast_nwp.v1.jsontoSCHEMA_FILESinpackages-ts/codegen/src/codegen.tscodegen --checkpasses — 31 files byte-equal across runs)ForecastNwpV1interface, ajv standalone validator, and format-map entry now emittedVerification
pnpm --filter @mostlyrightmd/codegen run codegen:check # 31 files byte-identical ✅Existing validator function renumbering in ajv standalone output is cosmetic (internal function refs shift when a new schema joins the compilation batch) — same behavior seen in prior schema additions.
Resolves: P2 finding on #68