Add 永期半自动: human arm, machine open/close, then stop.
Settings toggle, Plan panel, Fleet monitor, exit locks and armed TOCTOU gates; docs and dual audits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -47,6 +47,15 @@ async def lifespan(app: FastAPI):
|
||||
settings = load_runtime_settings()
|
||||
engine = StrategyEngine()
|
||||
set_engine(engine)
|
||||
# 半自动:无仓时清陈旧授权,须首页重新「授权开下一单」
|
||||
try:
|
||||
from .strategy.semi_auto import clear_armed_if_flat
|
||||
|
||||
clear_armed_if_flat(
|
||||
db, has_open_position=engine.matcher.has_open_position()
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("clear stale semi_armed on startup failed")
|
||||
# LIVE:进程启动后不自动真下单,须人工点「启动」
|
||||
if not get_settings().is_sim:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user