Test infrastructure · live

Math passes the gate before deploy

Every push to main runs the full vitest suite + TypeScript type-check in GitHub Actions before the deploy pipeline picks the commit up. A red CI run means the deploy is gated. This page summarises the suite that runs.

TEST FILES
17
*.test.ts under src/lib/data/__tests__/
TEST CASES
208
it() / it.skipIf() declarations
MATH INVARIANTS
46
forward-return engine self-test → /diag/engine
STRUCTURAL
7
composite math sanity → /coherence
About skipped tests: Two suites — crisis-stress-2022 and permutation-test — load 5-year price bars from per-ticker JSON files in data/backtest/. Those files are gitignored to keep the repo small (~32 MB across 327 tickers), so they exist on developer machines but not in CI. Both suites use describe.skipIf(!HAS_DATA) so they cleanly skip on CI rather than cascade-fail. They run end-to-end before any release tag.

Test inventory

ModuleTest casesSource
multiple-testing29src/lib/data/__tests__/multiple-testing.test.ts
scoring-rules28src/lib/data/__tests__/scoring-rules.test.ts
forward-return-engine18src/lib/data/__tests__/forward-return-engine.test.ts
zscore-composite17src/lib/data/__tests__/zscore-composite.test.ts
kalman-dlm16src/lib/data/__tests__/kalman-dlm.test.ts
conformal14src/lib/data/__tests__/conformal.test.ts
shapley14src/lib/data/__tests__/shapley.test.ts
bayesian-weights12src/lib/data/__tests__/bayesian-weights.test.ts
bocpd11src/lib/data/__tests__/bocpd.test.ts
nlp-scoring9src/lib/data/__tests__/nlp-scoring.test.ts
copula8src/lib/data/__tests__/copula.test.ts
factor-keys8src/lib/data/__tests__/factor-keys.test.ts
knockoff-filter7src/lib/data/__tests__/knockoff-filter.test.ts
crisis-stress-20226src/lib/data/__tests__/crisis-stress-2022.test.ts
permutation-test5src/lib/data/__tests__/permutation-test.test.ts
crisis-stress-20083src/lib/data/__tests__/crisis-stress-2008.test.ts
crisis-stress-20203src/lib/data/__tests__/crisis-stress-2020.test.ts

What they cover

External links

Counts derived at build time from src/lib/data/__tests__/. Numbers below the table are what vitest reports on each CI run; this page recompiles daily.