{
  "engine": "native C compiler; production main.c, format.c and metadata.c; mocked ESP-IDF APIs",
  "cases_per_profile": 19,
  "profiles": [
    "pcb",
    "breadboard"
  ],
  "cases_passed": 38,
  "hardware_measured": false,
  "esp32_executed": false,
  "production_sources_sha256": {
    "main.c": "56fde3df02a168b70ca748a51d9fafe7ea06c8b4c02f4fa95f8bcae4efa4cd5d",
    "format.c": "16f6340c64845a8d092ee426b5700bd2bf2ed5a58131e5c045a64d2f4fc687bc",
    "metadata.c": "03ee1645025484a6d421f2b4571d53894d76837da30f8f31006eabe86738182c",
    "board.h": "7c69a5213382e10fb67435285c4a0a53fb302b12466c22309292dd845d33e670",
    "variant.h": "55c2cdaef8b2d56e2ced2aa23984a289038adc6caaf9d164c92830c24b8cffb9"
  },
  "limits": [
    "Deterministic control-flow shims; no real FreeRTOS scheduler, concurrent cores or ISR execution",
    "EMG/IMU records are injected through production enqueue; sensor acquisition is tested separately",
    "No physical SDMMC, flash persistence, radio transport, noise, power or runtime measurements",
    "Late sync/close failures can leave an END marker among visible bytes; END alone cannot certify durability"
  ],
  "results": [
    {
      "scenario": "normal",
      "stream_started": true,
      "reason": 0,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "8bee5c56e7369cd3f3cadf200ad490f9dc662733b74227faea32a098cb63edcc",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "short-writes-eintr",
      "stream_started": true,
      "reason": 0,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 69,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "8bee5c56e7369cd3f3cadf200ad490f9dc662733b74227faea32a098cb63edcc",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "worker-fault-before-join",
      "stream_started": true,
      "reason": 6,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "c8a262362e7ed275d8a724cef6c02d5ceadd66dd037e500c0c04c2a5d665b05a",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 6
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "queue-overflow",
      "stream_started": true,
      "reason": 2,
      "disk_bytes": 1314880,
      "live_bytes": 1310784,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 162,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "1ce1623cb68f9a9776a9fd76cf7c06eabed3d1cd63465798714690fd233fd8c7",
        "synthetic": true,
        "counts": {
          "emg": 19506,
          "foot": 487,
          "shank": 487,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 974,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 1,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 19507,
          "foot_records": 487,
          "shank_records": 487,
          "battery_mv": 3800,
          "queue_high_water": 20480
        },
        "issues": [
          {
            "kind": "counter_mismatch",
            "stream": "emg",
            "reported": 19507,
            "decoded": 19506
          },
          {
            "kind": "abnormal_stop",
            "reason": 2
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 486,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 487,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 486,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 487,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "body-write-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 4096,
      "live_bytes": 8256,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 2,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "322540a265c3992aebfeaa7e08102baaad00946042f97bc9128803e7e89932be",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "partial-write-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 4241,
      "live_bytes": 8256,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 3,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "0da23b39967a240feeda7da2ad356cb0f76077f78c5fa8aca3ca4a2d03ddcc2f",
        "synthetic": true,
        "counts": {
          "emg": 2,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": null,
        "issues": [
          {
            "kind": "corrupt_or_truncated_tail",
            "start": 4224,
            "end": 4241
          },
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "zero-byte-write",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 4096,
      "live_bytes": 8256,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 2,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "322540a265c3992aebfeaa7e08102baaad00946042f97bc9128803e7e89932be",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "header-write-failure",
      "stream_started": false,
      "reason": 1,
      "disk_bytes": 0,
      "live_bytes": 0,
      "tasks_created": 0,
      "tasks_deleted": 0,
      "notifications": 0,
      "writes": 1,
      "syncs": 0,
      "closes": 1,
      "metadata_bytes": 0,
      "profile": "pcb",
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "header-sync-failure",
      "stream_started": false,
      "reason": 1,
      "disk_bytes": 4096,
      "live_bytes": 0,
      "tasks_created": 0,
      "tasks_deleted": 0,
      "notifications": 0,
      "writes": 1,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 0,
      "profile": "pcb",
      "quality": {
        "source_sha256": "322540a265c3992aebfeaa7e08102baaad00946042f97bc9128803e7e89932be",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "data-sync-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21504,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 4,
      "syncs": 2,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "4c813bd3cc5f787b97ab26809502b62b035d62f3e39cf4fda99b38aac58266e5",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "end-sync-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "8bee5c56e7369cd3f3cadf200ad490f9dc662733b74227faea32a098cb63edcc",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "close-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "8bee5c56e7369cd3f3cadf200ad490f9dc662733b74227faea32a098cb63edcc",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "emg-task-create-failure",
      "stream_started": false,
      "reason": 0,
      "disk_bytes": 4096,
      "live_bytes": 0,
      "tasks_created": 1,
      "tasks_deleted": 1,
      "notifications": 0,
      "writes": 1,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "quality": {
        "source_sha256": "322540a265c3992aebfeaa7e08102baaad00946042f97bc9128803e7e89932be",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "imu-task-create-failure",
      "stream_started": false,
      "reason": 0,
      "disk_bytes": 4096,
      "live_bytes": 0,
      "tasks_created": 1,
      "tasks_deleted": 1,
      "notifications": 1,
      "writes": 1,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "quality": {
        "source_sha256": "322540a265c3992aebfeaa7e08102baaad00946042f97bc9128803e7e89932be",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "imu-stop-failure",
      "stream_started": true,
      "reason": 3,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "487424ad823d999968798fbd6879dc8f32580ba88eab74a641a684675b681615",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 3
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "usb-attached",
      "stream_started": false,
      "reason": 0,
      "disk_bytes": 0,
      "live_bytes": 0,
      "tasks_created": 0,
      "tasks_deleted": 0,
      "notifications": 0,
      "writes": 0,
      "syncs": 0,
      "closes": 0,
      "metadata_bytes": 0,
      "profile": "pcb",
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "usb-during-recording",
      "stream_started": true,
      "reason": 7,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "d17d46f4a382ec630fff0c5c324899f8c91e06b98d638e98fefc802040164275",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 7
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "battery-low",
      "stream_started": true,
      "reason": 4,
      "disk_bytes": 21760,
      "live_bytes": 17664,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 7,
      "syncs": 6,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "9e39bc7fd029716772341206d958a97b0bbf71f87790d51b64f6cbf84a0d4720",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 3,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3200,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 4
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "card-full",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21568,
      "live_bytes": 17536,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 4,
      "syncs": 2,
      "closes": 1,
      "metadata_bytes": 1310,
      "profile": "pcb",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "6ea2a9b55c3bf3eb497a1ad7dc0a259e824716ea2d1724e8659b1fd29de4a16f",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 1,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "normal",
      "stream_started": true,
      "reason": 0,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "150e20ac8d1df4f11c7a87e3402484799cc67266871712fb2055452dd3a78403",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "short-writes-eintr",
      "stream_started": true,
      "reason": 0,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 69,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "150e20ac8d1df4f11c7a87e3402484799cc67266871712fb2055452dd3a78403",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "worker-fault-before-join",
      "stream_started": true,
      "reason": 6,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "d4b842ec53225c0e2bc0962644a911c081bafc1ddd7c44ec53a77bff5f9cc033",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 6
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "queue-overflow",
      "stream_started": true,
      "reason": 2,
      "disk_bytes": 1314880,
      "live_bytes": 1310784,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 162,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "5fa6a299fc95f11779f1b90da78a59c14741bb53d5d375f3f99312e054da30af",
        "synthetic": true,
        "counts": {
          "emg": 19506,
          "foot": 487,
          "shank": 487,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 974,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 1,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 19507,
          "foot_records": 487,
          "shank_records": 487,
          "battery_mv": 3800,
          "queue_high_water": 20480
        },
        "issues": [
          {
            "kind": "counter_mismatch",
            "stream": "emg",
            "reported": 19507,
            "decoded": 19506
          },
          {
            "kind": "abnormal_stop",
            "reason": 2
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 486,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 487,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 486,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 487,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "body-write-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 4096,
      "live_bytes": 8256,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 2,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "2e1814400d4d9947fee37ae86f0d44569332cbb1c58ffa54d11b7f8cf95bf1ec",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "partial-write-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 4241,
      "live_bytes": 8256,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 3,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "9530fd000592afbeb8fef7c916116550895007b2b34b2d8a852cebd483297795",
        "synthetic": true,
        "counts": {
          "emg": 2,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": null,
        "issues": [
          {
            "kind": "corrupt_or_truncated_tail",
            "start": 4224,
            "end": 4241
          },
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "zero-byte-write",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 4096,
      "live_bytes": 8256,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 2,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "2e1814400d4d9947fee37ae86f0d44569332cbb1c58ffa54d11b7f8cf95bf1ec",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "header-write-failure",
      "stream_started": false,
      "reason": 1,
      "disk_bytes": 0,
      "live_bytes": 0,
      "tasks_created": 0,
      "tasks_deleted": 0,
      "notifications": 0,
      "writes": 1,
      "syncs": 0,
      "closes": 1,
      "metadata_bytes": 0,
      "profile": "breadboard",
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "header-sync-failure",
      "stream_started": false,
      "reason": 1,
      "disk_bytes": 4096,
      "live_bytes": 0,
      "tasks_created": 0,
      "tasks_deleted": 0,
      "notifications": 0,
      "writes": 1,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 0,
      "profile": "breadboard",
      "quality": {
        "source_sha256": "2e1814400d4d9947fee37ae86f0d44569332cbb1c58ffa54d11b7f8cf95bf1ec",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "data-sync-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21504,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 4,
      "syncs": 2,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "eed0633886a28af431516f8c7b0c225c5809b0065ce9fd00b499e991a29902c5",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "end-sync-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "150e20ac8d1df4f11c7a87e3402484799cc67266871712fb2055452dd3a78403",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "close-failure",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "150e20ac8d1df4f11c7a87e3402484799cc67266871712fb2055452dd3a78403",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": true,
        "no_detected_sample_loss": true,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "emg-task-create-failure",
      "stream_started": false,
      "reason": 0,
      "disk_bytes": 4096,
      "live_bytes": 0,
      "tasks_created": 1,
      "tasks_deleted": 1,
      "notifications": 0,
      "writes": 1,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "quality": {
        "source_sha256": "2e1814400d4d9947fee37ae86f0d44569332cbb1c58ffa54d11b7f8cf95bf1ec",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "imu-task-create-failure",
      "stream_started": false,
      "reason": 0,
      "disk_bytes": 4096,
      "live_bytes": 0,
      "tasks_created": 1,
      "tasks_deleted": 1,
      "notifications": 1,
      "writes": 1,
      "syncs": 1,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "quality": {
        "source_sha256": "2e1814400d4d9947fee37ae86f0d44569332cbb1c58ffa54d11b7f8cf95bf1ec",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "status": 0,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          }
        ],
        "imu_clock": {},
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "imu-stop-failure",
      "stream_started": true,
      "reason": 3,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "b6d8987eade658a8d1047bb3d064d7149b2b517fb5ea4c9395a9b78eb5002075",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 3
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "usb-attached",
      "stream_started": false,
      "reason": 0,
      "disk_bytes": 0,
      "live_bytes": 0,
      "tasks_created": 0,
      "tasks_deleted": 0,
      "notifications": 0,
      "writes": 0,
      "syncs": 0,
      "closes": 0,
      "metadata_bytes": 0,
      "profile": "breadboard",
      "sd_commit_checks_pass": false,
      "pass": true
    },
    {
      "scenario": "usb-during-recording",
      "stream_started": true,
      "reason": 7,
      "disk_bytes": 21568,
      "live_bytes": 17472,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 5,
      "syncs": 3,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "73a4dcb4caca93fecb10bbd645feda894183942fd4693b8d1712ddc7f8d53875",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 0,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 7
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "battery-low",
      "stream_started": true,
      "reason": 4,
      "disk_bytes": 21760,
      "live_bytes": 17664,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 7,
      "syncs": 6,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "sd_live_end_identical": true,
      "quality": {
        "source_sha256": "57f46ac3ae327aec33d0feed8069ba7485048557def6421c36ce1ce85e323203",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 3,
          "end": 1
        },
        "session_finalized": true,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3200,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 4
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": true,
      "pass": true
    },
    {
      "scenario": "card-full",
      "stream_started": true,
      "reason": 1,
      "disk_bytes": 21568,
      "live_bytes": 17536,
      "tasks_created": 2,
      "tasks_deleted": 2,
      "notifications": 1,
      "writes": 4,
      "syncs": 2,
      "closes": 1,
      "metadata_bytes": 1317,
      "profile": "breadboard",
      "metadata_roundtrip_pass": true,
      "live_end_reason_pass": true,
      "laptop_stop_state_pass": true,
      "quality": {
        "source_sha256": "3501ef28c78ef770e298a3467d49093ce3f371e2f30822a8d2b1bf51527bb928",
        "synthetic": true,
        "counts": {
          "emg": 260,
          "foot": 6,
          "shank": 6,
          "status": 1,
          "end": 0
        },
        "session_finalized": false,
        "structurally_complete": false,
        "no_detected_sample_loss": false,
        "signal_checks_pass": true,
        "research_ready": false,
        "sequence_gaps": {
          "emg": 0,
          "foot": 0,
          "shank": 0
        },
        "anomalies": {
          "sequence_regressions": 0,
          "timestamp_regressions": 0,
          "emg_clipped_samples": 0,
          "emg_out_of_range": 0,
          "imu_invalid_samples": 0,
          "imu_timestamp_anomalies": 0,
          "timing_uncertain_records": 12,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 8000.0,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 260,
          "foot_records": 6,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 272
        },
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 5,
            "median_tick_step": 5000.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 6.6667,
            "fit_reads": 6,
            "fit_span_s": null,
            "host_us_per_sensor_tick": null,
            "sensor_tick_error_ppm": null,
            "fit_note": "needs at least 40 FIFO reads spanning 10 s",
            "within_1_percent": false,
            "within_datasheet_tolerance": false,
            "host_time_fit": null
          }
        },
        "imu_clock_note": "Screen only: FIFO timestamp increments versus the recorded nominal tick (imu_timestamp_tick_us), and sensor ticks versus ESP32 interrupt times. Includes interrupt latency; not a calibration. host_time_fitted_us in foot.csv/shank.csv maps each sample onto the ESP32 clock using a least-squares fit of all interrupt anchors; use it, not host_time_estimate_us, to align IMU with EMG in recordings longer than a few seconds.",
        "timing_note": "IMU host timestamps are estimates. Internal clock drift and sensor/analog filter delays are uncorrected.",
        "recovery_note": "Timestamp unwrapping is ambiguous across long gaps; never infer missing cycles after corruption."
      },
      "sd_commit_checks_pass": false,
      "pass": true
    }
  ]
}
