Commit Graph

1 Commits

Author SHA1 Message Date
Elie Habib
4eb1d292eb fix(simulation): add TypeScript types for simulation pipeline + remove dead legacy fallbacks (#2414)
- Add scripts/seed-forecasts.types.d.ts with ambient interfaces for all
  simulation data structures (CandidatePacket, TheaterResult, SimulationOutcome,
  ExpandedPath, SimulationEvidence, SimulationAdjustmentDetail)
- Add // @ts-check + @param JSDoc to contradictsPremise, negatesDisruption,
  computeSimulationAdjustment, applySimulationMerge
- Add scripts/jsconfig.json to enable tsc --checkJs on seed-forecasts.mjs
- Remove dead legacy fallbacks candidatePacket?.topBucketId and
  candidatePacket?.topChannel (these fields were never at top level in
  production; the correct path is candidatePacket.marketContext.topBucketId).
  TypeScript now enforces this at write time.
- Update all test fixtures to use marketContext: { topBucketId, topChannel }
  shape, matching production CandidatePacket structure
2026-03-28 13:05:18 +04:00