Files
fxhnt/tests/unit
jgrusewski 7d96ff2a00 feat(paper): combined risk-stack controller — K(D*) sizing + WEH structural-retirement gate + killswitch backstop
Add controller="combined" = K(D*) sizing + per-sleeve WindowedEdgeHealth
structural-retirement gate + the existing DrawdownKillSwitch backstop. The only
behavioural delta vs "killswitch" is the retirement gate filtering the active
sleeve set; with all sleeves healthy combined == killswitch bit-identically.

- RetirementGate (domain/edge_decay.py): pure hysteresis state machine over a
  WindowedEdgeHealth — retire after retire_window sub-retire_floor days, re-admit
  after readmit_window >= readmit_floor days; bootstrap-safe; to_dict/from_dict.
- Wire combined into both overlays (live==replay): paper_risk_overlay replays the
  gate from scratch; IncrementalRiskOverlay keeps per-sleeve gate state advanced
  over newly-appeared days. ISV over survivors; leverage + killswitch unchanged.
- Tests: pure state machine (retire/dip/re-admit/hysteresis/bootstrap/roundtrip),
  inert-on-healthy (combined==killswitch exact), synthetic dead-sleeve (combined
  retires B and beats killswitch NAV; re-admits on recovery), live==replay golden
  with a dying sleeve. Full suite green (756 passed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 09:04:18 +02:00
..