{
  "stage": "FAIL",
  "samples": [],
  "start_response": {
    "stream_id": "rtsp-test-01",
    "state": "starting",
    "desired_state": "running",
    "observed_state": "starting",
    "run_generation": 2,
    "run_id": "c6b61ecf-a57f-4a6d-bfff-8ce8fae17877",
    "last_error": null,
    "cleanup_error": null
  },
  "error": "Traceback (most recent call last):\n  File \"/tmp/codex/ltb1021/2026-09-15_contextra-web-ready_r01/live.py\", line 115, in run\n    else:raise TimeoutError('NO_FIRST_FRAME')\n         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTimeoutError: NO_FIRST_FRAME\n",
  "stop_response": {
    "stream_id": "rtsp-test-01",
    "state": "stopping",
    "desired_state": "stopped",
    "observed_state": "stopping",
    "run_generation": 2,
    "run_id": "c6b61ecf-a57f-4a6d-bfff-8ce8fae17877",
    "last_error": null,
    "cleanup_error": null
  },
  "cleanup_error": "Traceback (most recent call last):\n  File \"/tmp/codex/ltb1021/2026-09-15_contextra-web-ready_r01/live.py\", line 190, in run\n    assert last['state']=='stopped' and not last.get('cleanup_error'),'CLEANUP_FAILED'\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: CLEANUP_FAILED\n",
  "final": {
    "stream_id": "rtsp-test-01",
    "site_id": null,
    "source_type": "rtsp",
    "state": "stopping",
    "desired_state": "stopped",
    "observed_state": "stopping",
    "run_generation": 2,
    "run_id": "c6b61ecf-a57f-4a6d-bfff-8ce8fae17877",
    "roles": {
      "det": {
        "state": "init",
        "required": true,
        "initialized": true,
        "last_frame_at": null,
        "source_stage": "pipeline_state_changed",
        "source_stage_at": 1789439169.1120977,
        "source_stages": {
          "pipeline_state_changed": 1789439169.1120977
        },
        "stage_counts": {
          "pipeline_state_changed": 27
        },
        "last_error": null,
        "stage_first_at": {
          "pipeline_state_changed": 1789439169.1102858
        }
      }
    },
    "last_error": null,
    "cleanup_error": null,
    "cleanup_pending": true,
    "restart_pending": false,
    "last_cleanup": {
      "generation": 1,
      "completed": true,
      "finished_monotonic_ns": 1285931358266139,
      "elapsed_s": 0.04642148804850876
    },
    "started_at": 1789439169.009463,
    "uptime_s": 80.7,
    "inference_profile": {
      "roles": [
        "det"
      ],
      "requested_models": {
        "det": "RFDETRMedium"
      },
      "active_models": {
        "det": "RFDETRMedium"
      },
      "degraded_roles": [],
      "score_threshold": 0.5,
      "class_min_confidence": {}
    },
    "metadata_path": {
      "state": "PREPARED",
      "error": null,
      "display_threshold": 0.25,
      "visual": null,
      "sample_error": null,
      "performance": {
        "analysisFpsTarget": 10.0,
        "sampled_ns": 1291970412530743,
        "counts": {},
        "first_ns": {},
        "last_ns": {},
        "detail": false,
        "pending_samples": 0,
        "last_frame": {},
        "observation_missed": 0,
        "durations": {},
        "sourceFpsObserved": null,
        "closed": false
      },
      "queued": 0
    },
    "scenarios": {
      "active": [
        "INTRUSION"
      ],
      "disabled": []
    },
    "zones": [],
    "frames_in_window": 0,
    "per_task_buffers": {}
  },
  "retained_running": false
}