- cockpit_models.py: ForwardNavRow.date changed from String(10) to Date so
TimescaleDB create_hypertable('forward_nav', by_range('date')) accepts the
column; Mapped type updated to dt.date accordingly.
- forward_nav.py: upsert_rows converts DTO ISO str → dt.date.fromisoformat()
before writing; nav_history converts dt.date → .isoformat() when building
NavRowDTO, preserving the ISO-string public contract end-to-end.
StaticPool comment corrected: it is only applied for in-memory SQLite, not Postgres.
- state_reader.py: _welford now uses sample variance (/(n-1)) with the
two-moment formula to match _sharpe; added clarifying comment that sumsq_r
is raw sum-of-squares, not a Welford M2 accumulator.
- tests/unit/test_state_reader.py: moved import json / math / ForwardStateReader
to top of file; added test_welford_sample_variance_sharpe to lock the
variance formula against a known small fixture (days=2).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>