5 Commits

Author SHA1 Message Date
jgrusewski
595dc5da0e feat(forward): pin re-homed sleeves' recovered OOS inception in git (reproducible on DB rebuild)
The Phase-0b venue re-home reset the crypto sleeves' forward OOS clock to 2026-07-14
(definition-hash change → auto-re-inception). Since these were faithful re-homes (same
edge + PIT data, record_mode=recompute), the pre-re-home days are still valid OOS; on
2026-07-15 they were recovered by backdating the active anchors' t0 in the DB (unlock
06-20 → recon-gate PASS +4.57%; xsfunding/positioning/bybit_4edge/levered → 8d).

That backdate lived ONLY in the DB — a full operational-Postgres rebuild would let the
anchors re-incept to `today` and silently lose the recovered window. This makes it
reproducible from git (the SSOT):

- forward_definition.inception_override(sid): returns a definition's declared
  `inception_t0.date`, VERSION-PINNED (honored only when its `version` == the
  definition's current version — a genuine re-tune bumps `version`, auto-ignoring a
  stale pin and correctly getting a fresh today-clock). Lives OUTSIDE `params` so it is
  NOT hashed — declaring it never itself re-inceptions (verified: the five sleeves'
  definition_hash is byte-identical to their live DB anchors).
- run_track: at inception, t0 = inception_override(sid) if present AND <= today, else
  today (never incept in the future — clock-skew/not-yet-reached pins fall back to today).
- registry: xsfunding/unlock/positioning/bybit_4edge/bybit_4edge_levered carry their
  pinned pre-re-home t0 (07-07/06-20/07-06/07-07/07-07, version 2).

Tests: inception_override version match/stale/absent + not-hashed + a regression pin on
the recovered dates; run_track honors the pin, ignores a version-stale pin, and falls
back to today for a future pin. 262 forward/registry tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 19:31:16 +02:00
jgrusewski
7137d62bfa fix(forward): resolve whole-branch review findings (combined migration crash + hash/PIT accuracy)
- CRITICAL: add combined to migration_builders so its anchor is seeded — the pre-branch forward_summary
  row would otherwise trip the lost-anchor guard and crash combined_forward_nav every nightly
- hash accuracy: bybit cost_bps mirrors Settings default (10.0); multistrat instruments derive from
  FUND_INSTRUMENTS (no duplicate) so a return-affecting change actually re-inceptions
- sixtyforty documented as a benchmark exempt from strict PIT (spec §4)
- observed mode: xsfunding consumes the engine's UTC _today; re-inception resets carried book-state

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 10:51:00 +02:00
jgrusewski
9a2859ea88 fix(forward): engine fails loud on lost anchor instead of silently re-inceptioning
Restores the safety invariant the legacy ForwardTracker enforced (raise on state loss rather
than reset the OOS clock to day 0 + discard the record — 3 prod resets "burned real capital").
run_track now raises when there is no active anchor BUT prior forward history exists (lost
anchor row), while a genuine first run still inceptions. Protects the deploy-tier tracks Task 8b
routed onto the engine.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 09:17:09 +02:00
jgrusewski
a224127ab2 fix(forward): engine writes forward_nav as a true derived cache + validates record_mode early
- replace_nav purges stale pre-t0 rows on re-inception (nav cache == current record; fixes
  polluted nav_history / wrong dashboard headline_t0 after a definition change)
- record_mode validated before any anchor mutation (a bad mode no longer persists a broken anchor)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 00:37:22 +02:00
jgrusewski
d07e70b5a5 feat(forward): forward engine — anchor lifecycle + recompute/observed dispatch
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 00:21:19 +02:00