fix: set gate_passed=True for ALT track in save_feature_event (NOT NULL constraint)

This commit is contained in:
root 2026-03-03 14:37:38 +00:00
parent a7cd78e06f
commit 57f749c094

View File

@ -1038,7 +1038,7 @@ def save_feature_event(ts: int, symbol: str, result: dict, strategy: str):
score_crowding = (f.get("crowding") or {}).get("score", 0) if track == "ALT" else None
score_env = (f.get("environment") or {}).get("score", 0) if track == "ALT" else None
score_aux = (f.get("auxiliary") or {}).get("score", 0) if track == "ALT" else None
gate_passed = f.get("gate_passed") if track == "BTC" else None
gate_passed = f.get("gate_passed") if track == "BTC" else True # ALT轨无gate概念视为通过
block_reason = f.get("block_reason") if track == "BTC" else None
with get_sync_conn() as conn: