Analysis of 410 live closed trades found the edge is real but was being
destroyed by execution: gross +$267 vs $245 fees; trades held <1h were net
negative (the <15m bucket alone: -$48 on $66 fees) while 1h+ holds carried
+$78; shorts lost $72 while longs made $94 — and both the prompt and the
engine were manufacturing those losers.
Changes, each tied to the data:
- Prompt: removed the 'MUST open at least one long AND one short every
cycle' mandate (forced weak-signal shorts); direction is now data-driven
with 'never open just to balance the book'. Added fee-awareness (round
trip ≈ 0.1% notional, require expected move ≥ 3x cost) and aligned the
hold discipline with the backend throttle.
- Forced book-balance opens now require |board z-score| ≥ 0.75 — the engine
previously force-opened full-size 10x positions on near-neutral signals
with hardcoded confidence 70. DirectionalCandidates now carries scores.
- Min AI-managed hold raised 45m → 60m (the 15-60m bucket still bled after
the earlier throttle landed).
- Legacy prompt hygiene: vergex path drops long-only-era custom prompts and
zh-era configs fall back wholesale to built-in English sections — fixes
the two long-failing kernel prompt tests.
- New Edge Profile dashboard panel: net after fees by hold-time bucket and
side, computed from recent closed trades, with an automatic takeaway line
— the fee/churn regression detector, always visible. Fixed the
HistoricalPosition timestamp types (epoch ms, not strings).
- POST /api/launch/preflight and GET /api/traders/:id/preflight run every
launch prerequisite (AI model credential, claw402 wallet key + Base USDC
balance, strategy, exchange config, live account state, funding minimums)
and return a structured checklist with stable codes; minimums (1 USDC AI
fee / 12 USDC trading) now live server-side and are exposed in the response.
- POST /traders/:id/start enforces the preflight (400 with error_key
trader.start.preflight_failed + full checklist; ?force=true to override).
Funding gates use max(available, equity) so restarting a bot with deployed
margin is not blocked; indeterminate probes (RPC outage) degrade to
warnings instead of blocking.
- Run loop now surfaces runtime health via GetStatus: safe_mode(+reason) and
ai_wallet_status/balance (ok|low|empty|unknown), including typed detection
of claw402 ErrInsufficientFunds instead of burying it in logs; safe-mode
state is mutex-guarded for API readers.
- Onboarding wallet endpoints switch to the cached, error-aware balance query
and report balance_status so the UI can tell an RPC outage from an empty
wallet.