Includes core prod + GREEN/BLUE subsystems: - prod/ (BLUE harness, configs, scripts, docs) - nautilus_dolphin/ (GREEN Nautilus-native impl + dvae/ preserved) - adaptive_exit/ (AEM engine + models/bucket_assignments.pkl) - Observability/ (EsoF advisor, TUI, dashboards) - external_factors/ (EsoF producer) - mc_forewarning_qlabs_fork/ (MC regime/envelope) Excludes runtime caches, logs, backups, and reproducible artifacts per .gitignore.
1.7 KiB
Executable File
1.7 KiB
Executable File
TODO: Runtime Flags / Toggle System for Dolphin
Filed: 2026-04-06
Priority: Medium — needed before live trading
Problem
Currently there is no way to input toggles/flags into the paper or live trading system at runtime without editing code and restarting services. This creates operational friction and risk (code edits in production).
Current Workaround
Environment variables read at service startup:
DOLPHIN_FAST_RECOVERY=1— bypasses bounded recovery in SurvivalStack (paper only)
Desired Capabilities
- Runtime toggles — change behavior without restart (e.g., via Hazelcast IMap or HTTP endpoint)
- Paper vs Live flags — some toggles should only apply in paper mode
- Audit trail — log when flags change, who changed them, previous value
- Safety — certain flags (like disabling risk limits) should require confirmation or be paper-only
Candidate Flags
| Flag | Description | Paper/Live |
|---|---|---|
FAST_RECOVERY |
Skip bounded recovery dynamics | Paper only |
FORCE_POSTURE |
Override posture to specific value | Paper only |
PAUSE_ENTRIES |
Stop new entries without changing posture | Both |
MAX_LEVERAGE_OVERRIDE |
Cap leverage below algo default | Both |
LOG_LEVEL |
Change log verbosity at runtime | Both |
Implementation Options
- Hazelcast IMap (
DOLPHIN_FLAGS) — already have Hz, services already connected. Read on each tick. Simple. - HTTP control plane — small Flask/FastAPI sidecar. More discoverable, but another service.
- File-based — watch a JSON file. Simple but no audit trail.
Recommendation: Start with option 1 (Hz IMap). One map, services poll it. TUI can show/edit flags.