{
  "ts": "2026-07-04T23:03:23.671838",
  "passed": 23,
  "failed": 0,
  "total": 23,
  "checks": [
    {
      "section": "A1",
      "name": "app boots with all routes + TSM tables + migration",
      "status": "PASS",
      "detail": "170 routes, all tables present, migration applied"
    },
    {
      "section": "A2",
      "name": "event lifecycle: open -> tick -> close capital/PnL math",
      "status": "PASS",
      "detail": "capital deployed/returned + realized PnL correct"
    },
    {
      "section": "A2",
      "name": "one-symbol-one-position: same-side averages, no duplicate",
      "status": "PASS",
      "detail": "second same-side fill averaged into one position (qty 20 @ 105)"
    },
    {
      "section": "A2",
      "name": "restart recovery: fresh instance rebuilds from DB",
      "status": "PASS",
      "detail": "position + capital + sl_order_id restored from DB after simulated restart"
    },
    {
      "section": "A2",
      "name": "broker reconcile: restore + out-of-band close + failed-fetch safety",
      "status": "PASS",
      "detail": "restore, out-of-band close, and failed-fetch safety all correct"
    },
    {
      "section": "A2",
      "name": "idempotency is DB-backed and survives restart",
      "status": "PASS",
      "detail": "explicit key persisted + retrievable across sessions"
    },
    {
      "section": "A3",
      "name": "idempotency prevents duplicate broker order",
      "status": "PASS",
      "detail": "same idempotency key -> broker hit once"
    },
    {
      "section": "A3",
      "name": "position guard blocks pyramiding, allows reduce",
      "status": "PASS",
      "detail": "second same-side BUY blocked; opposite SELL allowed through"
    },
    {
      "section": "A3",
      "name": "partial fill reported with true filled qty",
      "status": "PASS",
      "detail": "partial fill -> PARTIALLY_FILLED with filled_qty=3 (not requested 10)"
    },
    {
      "section": "A3",
      "name": "ambiguous broker-timeout reconciled to real fill",
      "status": "PASS",
      "detail": "timed-out order that actually filled is reconciled (not lost)"
    },
    {
      "section": "A3",
      "name": "broker-native SL-M placed opposite-side at trigger after fill",
      "status": "PASS",
      "detail": "SL-M placed (SELL, trigger 2750, qty 10) + persisted to TSM"
    },
    {
      "section": "A3",
      "name": "monitor close action carries sl_order_id + real qty (OCO input)",
      "status": "PASS",
      "detail": "close action carries sl_order_id, real qty, side, broker for OCO cancel"
    },
    {
      "section": "A4",
      "name": "REAL activity -> dashboard reads TSM (not paper)",
      "status": "PASS",
      "detail": "dashboard funds/positions/pnl sourced from TSM and consistent with /state"
    },
    {
      "section": "A4",
      "name": "mode-aware: PAPER + no real activity -> paper fallback",
      "status": "PASS",
      "detail": "paper mode with no real activity -> dashboard uses paper engine"
    },
    {
      "section": "A5",
      "name": "kill switch blocks manual order path",
      "status": "PASS",
      "detail": "manual order blocked while kill switch active"
    },
    {
      "section": "A5",
      "name": "kill switch + market-hours gate reject entries",
      "status": "PASS",
      "detail": "entry correctly blocked by risk layer [market_hours]"
    },
    {
      "section": "A6",
      "name": "EOD square-off timing (NSE 15:10 / MCX 23:00) via simulated time",
      "status": "PASS",
      "detail": "EOD window correct for NSE 15:10 and MCX 23:00"
    },
    {
      "section": "A7",
      "name": "real indicator math (Wilder RSI/ATR, EMA, Supertrend)",
      "status": "PASS",
      "detail": "RSI=76.12 ATR=2.33 on uptrend series"
    },
    {
      "section": "A7",
      "name": "no real data -> UNAVAILABLE (never fabricated); real candles -> real",
      "status": "PASS",
      "detail": "unavailable never fabricates; real candles -> data_quality=real"
    },
    {
      "section": "A7",
      "name": "AI prompt states data quality honestly",
      "status": "PASS",
      "detail": "prompt flags SIMULATED; false 'real sources' claim removed"
    },
    {
      "section": "A8",
      "name": "Angel One expiry detection + sdk_call relogin+retry",
      "status": "PASS",
      "detail": "expiry detected; one relogin + retry then success"
    },
    {
      "section": "A8",
      "name": "live-feed reconnect refreshes tokens + respawns; disconnect halts it",
      "status": "PASS",
      "detail": "reconnect refreshes tokens + respawns; disconnect stops supervisor"
    },
    {
      "section": "A9",
      "name": "backtest core has no random P&L fabrication",
      "status": "PASS",
      "detail": "no random/np.random/uniform/choice in backtest core"
    }
  ]
}