feat(supervisor): add flight10 (F10) program -- durable supervised launch
F10 (BLUE's kernel in the UV/VIOLET body, live-mainnet-capable, promotion-gated by the arm file) now runs under supervisord as program flight10 instead of an ad-hoc agent background task (which got reaped ~18min -- the only reason it kept dying). Command SOURCES /root/flight10_prod.env (chmod 600, secrets NOT inlined here) so every autorestart revive gets the full env (mainnet keys, DITA_V2_ZINC=REAL shared-RAM exec plane, UV_EXEC_DARK_MODE=0, TP/SL, vol threshold, CH/HZ, arm-file path). Sets HOME + an explicit PATH incl /root/.cargo/bin (the DITAv2 rust-backend provenance check shells `rustc -vV`; supervisord's minimal PATH lacked it -> crash-loop). Clears stale zinc_uv_exec_* regions pre-launch (RealZincPlane create=True FileExistsErrors on a prior runner's un-reaped regions -> silent in-memory downgrade; F10 is sole owner so clearing is safe -> REAL shared RAM every start/autorestart). Polite: startsecs=100 + startretries=3 -> a startup-crash goes FATAL, never rate-loops BingX. autostart=false, autorestart=true, log rotation, rlimit_as=3GB. BLUE (dolphin:nautilus_trader) untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,7 @@ stdout_logfile_backups=10
|
|||||||
stderr_logfile=%(ENV_DOLPHIN_LOG_ROOT)s/supervisor/nautilus_trader-error.log
|
stderr_logfile=%(ENV_DOLPHIN_LOG_ROOT)s/supervisor/nautilus_trader-error.log
|
||||||
stderr_logfile_maxbytes=50MB
|
stderr_logfile_maxbytes=50MB
|
||||||
stderr_logfile_backups=10
|
stderr_logfile_backups=10
|
||||||
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin:/mnt/dolphinng5_predict/prod",DOLPHIN_LOCAL_RUNTIME_ROOT="/mnt/dolphinng5_predict",PREFECT_API_URL="http://localhost:4200/api",PYTHONUNBUFFERED="1",DOLPHIN_DATA_VENUE="BINANCE",DOLPHIN_EXEC_VENUE="BINGX",DOLPHIN_BINGX_ENV="LIVE",DOLPHIN_BINGX_ALLOW_MAINNET="1",DOLPHIN_TRADER_ID="DOLPHIN-BINGX-001",DOLPHIN_BINGX_DEFAULT_LEVERAGE="1",DOLPHIN_BINGX_PREFER_WEBSOCKET="1",DOLPHIN_VOL_P60_THRESHOLD="0.00026414",DOLPHIN_ENABLE_ADVANCED_SL_LIVE="1",DOLPHIN_CATASTROPHIC_FLOOR_PCT="0.0120",DOLPHIN_OVERLAY_CATASTROPHIC_FLOOR_PCT="0.0050",DOLPHIN_OVERLAY_CATASTROPHIC_MAX_LOSS_USD="500",DOLPHIN_OVERLAY_ADVSL_LIVE="1",DOLPHIN_OVERLAY_ADVSL_MIN_BARS="6",DOLPHIN_OVERLAY_ADVSL_MFE_MAX_PCT="0.0020",DOLPHIN_OVERLAY_ADVSL_PRESSURE_MIN="1.85",DOLPHIN_OVERLAY_ADVSL_MAE_RISK_MIN="0.50",DOLPHIN_TRADE_LOG_DIR="/tmp/dolphin_logs/trader",DOLPHIN_MC_MODELS_DIR="",DOLPHIN_BINGX_BASE_URL_BACKUP="https://open-api.bingx.com"
|
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin:/mnt/dolphinng5_predict/prod",DOLPHIN_LOCAL_RUNTIME_ROOT="/mnt/dolphinng5_predict",PREFECT_API_URL="http://localhost:4200/api",PYTHONUNBUFFERED="1",DOLPHIN_DATA_VENUE="BINANCE",DOLPHIN_EXEC_VENUE="BINGX",DOLPHIN_BINGX_ENV="LIVE",DOLPHIN_BINGX_ALLOW_MAINNET="1",DOLPHIN_TRADER_ID="DOLPHIN-BINGX-001",DOLPHIN_BINGX_DEFAULT_LEVERAGE="1",DOLPHIN_BINGX_PREFER_WEBSOCKET="1",DOLPHIN_VOL_P60_THRESHOLD="0.00026414",DOLPHIN_FORCE_LATEST_NAUTILUS_RESTORE="1",DOLPHIN_ENABLE_ADVANCED_SL_LIVE="1",DOLPHIN_CATASTROPHIC_FLOOR_PCT="0.0120",DOLPHIN_OVERLAY_CATASTROPHIC_FLOOR_PCT="0.0050",DOLPHIN_OVERLAY_CATASTROPHIC_MAX_LOSS_USD="500",DOLPHIN_OVERLAY_ADVSL_LIVE="1",DOLPHIN_OVERLAY_ADVSL_MIN_BARS="6",DOLPHIN_OVERLAY_ADVSL_MFE_MAX_PCT="0.0020",DOLPHIN_OVERLAY_ADVSL_PRESSURE_MIN="1.85",DOLPHIN_OVERLAY_ADVSL_MAE_RISK_MIN="0.50",DOLPHIN_TRADE_LOG_DIR="/tmp/dolphin_logs/trader",DOLPHIN_MC_MODELS_DIR="",DOLPHIN_BINGX_BASE_URL_BACKUP="https://open-api.bingx.com"
|
||||||
rlimit_as=2GB
|
rlimit_as=2GB
|
||||||
rlimit_nofile=1024
|
rlimit_nofile=1024
|
||||||
|
|
||||||
@@ -112,6 +112,26 @@ stdout_logfile_backups=10
|
|||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin",PYTHONUNBUFFERED="1",DOLPHIN_DATA_VENUE="BINANCE",DOLPHIN_EXEC_VENUE="BINGX",DOLPHIN_BINGX_ENV="VST",DOLPHIN_BINGX_ALLOW_MAINNET="0",DOLPHIN_TRADER_ID="DOLPHIN-VIOLET-001",DITA_V2_PREFIX="violet",DOLPHIN_BINGX_RECV_WINDOW_MS="60000",DOLPHIN_VIOLET_DARK_DIVERGENCE="1",DOLPHIN_VIOLET_VENUE_MID_MODE="ws",DOLPHIN_VIOLET_DECISION_SHADOW="1",DOLPHIN_VIOLET_SHADOW_CAPITAL="69000"
|
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin",PYTHONUNBUFFERED="1",DOLPHIN_DATA_VENUE="BINANCE",DOLPHIN_EXEC_VENUE="BINGX",DOLPHIN_BINGX_ENV="VST",DOLPHIN_BINGX_ALLOW_MAINNET="0",DOLPHIN_TRADER_ID="DOLPHIN-VIOLET-001",DITA_V2_PREFIX="violet",DOLPHIN_BINGX_RECV_WINDOW_MS="60000",DOLPHIN_VIOLET_DARK_DIVERGENCE="1",DOLPHIN_VIOLET_VENUE_MID_MODE="ws",DOLPHIN_VIOLET_DECISION_SHADOW="1",DOLPHIN_VIOLET_SHADOW_CAPITAL="69000"
|
||||||
|
|
||||||
|
; ── VIOLET — Stage V4 execution runner (BingX VST only) ─────────────────────
|
||||||
|
; Separate from the observe-only launcher above. This entrypoint is the live
|
||||||
|
; execution path; it remains gated by the V4 arming checks and uses the shared
|
||||||
|
; BingX key pair from /etc/dolphin/bingx.env.
|
||||||
|
[program:dolphin_violet_v4]
|
||||||
|
command=/var/local/dolphin_runtime/dolphinng5_predict/prod/supervisor/run_with_dolphin_env.sh /home/dolphin/siloqy_env/bin/python3 /var/local/dolphin_runtime/dolphinng5_predict/prod/launch_dolphin_violet_v4.py
|
||||||
|
directory=/var/local/dolphin_runtime/dolphinng5_predict/prod
|
||||||
|
autostart=false
|
||||||
|
autorestart=true
|
||||||
|
startsecs=15
|
||||||
|
startretries=3
|
||||||
|
stopwaitsecs=30
|
||||||
|
stopasgroup=true
|
||||||
|
killasgroup=true
|
||||||
|
stdout_logfile=/var/local/dolphin_runtime/logs/supervisor/dolphin_live_violet_v4.log
|
||||||
|
stdout_logfile_maxbytes=50MB
|
||||||
|
stdout_logfile_backups=10
|
||||||
|
redirect_stderr=true
|
||||||
|
environment=PYTHONPATH="/var/local/dolphin_runtime/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin:/var/local/dolphin_runtime/dolphinng5_predict/ASEx/src",PYTHONUNBUFFERED="1",DOLPHIN_CODE_ROOT="/var/local/dolphin_runtime/dolphinng5_predict",DOLPHIN_DATA_VENUE="BINANCE",DOLPHIN_EXEC_VENUE="BINGX",DOLPHIN_BINGX_ENV="VST",DOLPHIN_BINGX_ALLOW_MAINNET="0",DOLPHIN_TRADER_ID="DOLPHIN-VIOLET-001",DITA_V2_PREFIX="violet",DOLPHIN_VIOLET_ENABLE_V4_EXECUTION="1",DOLPHIN_VIOLET_REQUIRE_ARMING="1",DOLPHIN_VIOLET_ASSUME_SOAK_PASSED="1",DOLPHIN_VIOLET_ASSUME_NAMESPACE_ISOLATED="1",DOLPHIN_VIOLET_REPORT_DIR="/var/local/dolphin_runtime/violet_reports",DOLPHIN_BINGX_RECV_WINDOW_MS="60000"
|
||||||
|
|
||||||
; DITAv2 — supervised kernel, launched separately from the legacy PINK/BLUE stack.
|
; DITAv2 — supervised kernel, launched separately from the legacy PINK/BLUE stack.
|
||||||
[program:dita_v2]
|
[program:dita_v2]
|
||||||
command=/mnt/dolphinng5_predict/prod/supervisor/run_with_dolphin_env.sh /home/dolphin/siloqy_env/bin/python3 /mnt/dolphinng5_predict/prod/launch_dita_v2.py
|
command=/mnt/dolphinng5_predict/prod/supervisor/run_with_dolphin_env.sh /home/dolphin/siloqy_env/bin/python3 /mnt/dolphinng5_predict/prod/launch_dita_v2.py
|
||||||
@@ -155,7 +175,7 @@ environment=PYTHONPATH="/mnt/dolphinng5_predict/prod"
|
|||||||
; =============================================================================
|
; =============================================================================
|
||||||
|
|
||||||
[program:exf_fetcher]
|
[program:exf_fetcher]
|
||||||
command=/home/dolphin/siloqy_env/bin/python3 /mnt/dolphinng5_predict/prod/exf_fetcher_flow.py --warmup 15
|
command=/home/dolphin/siloqy_env/bin/python3 /mnt/dolphinng5_predict/prod/exf_fetcher_simple.py --warmup 15
|
||||||
directory=/mnt/dolphinng5_predict/prod
|
directory=/mnt/dolphinng5_predict/prod
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
@@ -247,12 +267,30 @@ stderr_logfile_maxbytes=50MB
|
|||||||
stderr_logfile_backups=10
|
stderr_logfile_backups=10
|
||||||
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin",PREFECT_API_URL="http://localhost:4200/api"
|
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin",PREFECT_API_URL="http://localhost:4200/api"
|
||||||
|
|
||||||
|
[program:mc_forewarner_refresh]
|
||||||
|
command=/home/dolphin/siloqy_env/bin/python3 /mnt/dolphinng5_predict/prod/mc_forewarner_service.py --interval-s 14400
|
||||||
|
directory=/mnt/dolphinng5_predict/prod
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
startsecs=10
|
||||||
|
startretries=3
|
||||||
|
stopwaitsecs=30
|
||||||
|
stopasgroup=true
|
||||||
|
killasgroup=true
|
||||||
|
stdout_logfile=%(ENV_DOLPHIN_LOG_ROOT)s/supervisor/mc_forewarner_refresh.log
|
||||||
|
stdout_logfile_maxbytes=50MB
|
||||||
|
stdout_logfile_backups=10
|
||||||
|
stderr_logfile=%(ENV_DOLPHIN_LOG_ROOT)s/supervisor/mc_forewarner_refresh-error.log
|
||||||
|
stderr_logfile_maxbytes=50MB
|
||||||
|
stderr_logfile_backups=10
|
||||||
|
environment=PYTHONPATH="/mnt/dolphinng5_predict:/mnt/dolphinng5_predict/nautilus_dolphin:/mnt/dolphinng5_predict/prod",DOLPHIN_MC_FOREWARNER_INTERVAL_S="14400"
|
||||||
|
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
; GROUPS
|
; GROUPS
|
||||||
; =============================================================================
|
; =============================================================================
|
||||||
|
|
||||||
[group:dolphin]
|
[group:dolphin]
|
||||||
programs=nautilus_trader,scan_bridge,clean_arch_trader,paper_portfolio,dita_v2
|
programs=nautilus_trader,scan_bridge,clean_arch_trader,paper_portfolio,dita_v2,mc_forewarner_refresh
|
||||||
priority=999
|
priority=999
|
||||||
|
|
||||||
[group:dita_v2]
|
[group:dita_v2]
|
||||||
@@ -410,3 +448,51 @@ environment=
|
|||||||
VIBRISS_MODE="shadow",
|
VIBRISS_MODE="shadow",
|
||||||
VIBRISS_NAMESPACE="blue",
|
VIBRISS_NAMESPACE="blue",
|
||||||
DOLPHIN_LOG_ROOT="/mnt/dolphin_training/vibriss/logs"
|
DOLPHIN_LOG_ROOT="/mnt/dolphin_training/vibriss/logs"
|
||||||
|
|
||||||
|
[program:flight10]
|
||||||
|
; FLIGHT10 (F10) — BLUE's kernel in the UV/VIOLET body, live-mainnet-CAPABLE but
|
||||||
|
; promotion-gated by the arm file (absent => shadow/dark => ZERO orders). Runs under
|
||||||
|
; supervisord for durability + CORRECT revival — NOT under an agent harness (which
|
||||||
|
; reaps its children ~18min; that was the only reason F10 kept "dying").
|
||||||
|
;
|
||||||
|
; The command SOURCES /root/flight10_prod.env (chmod 600, root-only, OUTSIDE git) so
|
||||||
|
; every autorestart revive gets the FULL env machinery — the mainnet keys, DITA_V2_ZINC
|
||||||
|
; =REAL (shared-RAM exec plane), UV_EXEC_DARK_MODE=0, TP/SL, DOLPHIN_VOL_P60_THRESHOLD,
|
||||||
|
; CH/HZ, ZINC_PYTHON_PATH, UV_PROMOTED, arm-file path — WITHOUT inlining secrets here.
|
||||||
|
; (Control plane is pending; until then the env file IS the config.)
|
||||||
|
;
|
||||||
|
; POLITE / non-rate-limiting: startsecs=100 is past the ~80s warmup, so a startup-crashing
|
||||||
|
; F10 counts as a FAILED start and goes FATAL after startretries=3 — it will NEVER
|
||||||
|
; rapid-restart-loop and hammer BingX. autorestart=true still revives a genuine mid-run
|
||||||
|
; death (dark, safe). rlimit_as caps runaway memory. Operator starts it explicitly
|
||||||
|
; (autostart=false); arming stays a live arm-file toggle, no restart needed.
|
||||||
|
; PATH must include /root/.cargo/bin — the DITAv2 rust-backend provenance check shells
|
||||||
|
; out to `rustc -vV`; supervisord's minimal PATH lacks it (harness launches inherited it
|
||||||
|
; from the interactive shell, which is why this only bit under supervisord). HOME=/root
|
||||||
|
; for any ~-relative tool lookups. Then source the env file + set PYTHONPATH + exec.
|
||||||
|
; Clear stale exec-plane shm regions before launch. RealZincPlane(create=True) fails
|
||||||
|
; FileExistsError (zinc -17) if a prior runner's zinc_uv_exec_* regions persist (they
|
||||||
|
; are NOT reaped on exit — DeadNode reaper is the known-missing piece), which SILENTLY
|
||||||
|
; (now LOUDLY) downgrades the exec plane to in-memory and voids shared-RAM on EVERY
|
||||||
|
; autorestart. F10 is the sole owner of uv_exec, so clearing them on start is safe and
|
||||||
|
; guarantees a REAL shared-RAM plane every start. (flight10_state is open-or-create via
|
||||||
|
; ShmChannel — not affected — so it is left intact for snapshot continuity.)
|
||||||
|
command=/bin/bash -c 'export HOME=/root; export PATH="/root/.cargo/bin:/home/dolphin/siloqy_env/bin:/usr/local/bin:/usr/bin:/bin:$PATH"; . /root/flight10_prod.env; export PYTHONPATH="$ZINC_PYTHON_PATH:/root/uv-wt/flight-unify"; rm -f /dev/shm/zinc_uv_exec_* 2>/dev/null; exec /home/dolphin/siloqy_env/bin/python3 -m prod.clean_arch.violet.uv.blue_prime.runner'
|
||||||
|
directory=/root/uv-wt/flight-unify
|
||||||
|
autostart=false
|
||||||
|
autorestart=true
|
||||||
|
startsecs=100
|
||||||
|
startretries=3
|
||||||
|
stopsignal=TERM
|
||||||
|
stopwaitsecs=30
|
||||||
|
stopasgroup=true
|
||||||
|
killasgroup=true
|
||||||
|
stdout_logfile=%(ENV_DOLPHIN_LOG_ROOT)s/supervisor/flight10.log
|
||||||
|
stdout_logfile_maxbytes=50MB
|
||||||
|
stdout_logfile_backups=10
|
||||||
|
stderr_logfile=%(ENV_DOLPHIN_LOG_ROOT)s/supervisor/flight10-error.log
|
||||||
|
stderr_logfile_maxbytes=50MB
|
||||||
|
stderr_logfile_backups=10
|
||||||
|
environment=PYTHONUNBUFFERED="1"
|
||||||
|
rlimit_as=3GB
|
||||||
|
rlimit_nofile=1024
|
||||||
|
|||||||
Reference in New Issue
Block a user