{
  "engine": "Wokwi web editor",
  "firmware": "ad7606-2ch-1.12",
  "hardware_measured": false,
  "planned_cases": 18,
  "executed_cases": 18,
  "passed_cases": 18,
  "full_matrix_pass": true,
  "cases": [
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 0,
        "fault": 0,
        "emg": 10039,
        "foot": 262,
        "shank": 251,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 61,
        "udp": 1127,
        "discarded": 0,
        "writes": 85,
        "syncs": 4,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 10554,
      "saved_bytes": 679552,
      "quality": {
        "source_sha256": "b2abd5c2f6132bc756ebfefcea0c1ee1438c1f33a77dd704fc07b05420af641a",
        "synthetic": true,
        "counts": {
          "emg": 10039,
          "foot": 262,
          "shank": 251,
          "status": 1,
          "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": 513,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.895406038904,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 261,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 248,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 250,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 246,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 1127,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "416cab7f-a295e94f",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 262,
            "timestamp_us": 2180001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 251,
            "timestamp_us": 2180002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_db644299.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 10554,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": 0
      },
      "udp_packets": 1127,
      "source_sha256": "89d7d438fdc6366dff95b5eb2d5d6da2842d1860dd494f522252ffda47135a00",
      "case": "normal",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "4ae85cf5ab4e35b258fc1f758bab4d882fce8faa0e5d22fec6b7f8719764bcd4",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 1,
        "fault": 0,
        "emg": 10038,
        "foot": 262,
        "shank": 251,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 421,
        "udp": 1089,
        "discarded": 0,
        "writes": 85,
        "syncs": 4,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 10553,
      "saved_bytes": 679488,
      "quality": {
        "source_sha256": "4afcb994a872f7d2e9385f96a869138e34df5b094679699f55d94603d36c68d7",
        "synthetic": true,
        "counts": {
          "emg": 10038,
          "foot": 262,
          "shank": 251,
          "status": 1,
          "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": 513,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.874752517382,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10038,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 421
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 261,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 248,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 250,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 246,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 1089,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 344
        },
        "error": null,
        "session": "a5f2332b-a4525c5d",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 262,
            "timestamp_us": 2180001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 251,
            "timestamp_us": 2180002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10038,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 421
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_610d6f83.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 10209,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {
          "7": 326,
          "2": 9,
          "3": 9
        },
        "stop_reason": 0
      },
      "udp_packets": 1089,
      "source_sha256": "1f19c48c5578f88978e2f7b8aa28a0a92176692585e3058423974c7e3dafdf2a",
      "case": "write-delay-50ms",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "956d31116127000165eae5aa5042c753887838fb9e39e0cb88d8423409d14f22",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 2,
        "fault": 0,
        "emg": 10039,
        "foot": 262,
        "shank": 251,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 2936,
        "udp": 817,
        "discarded": 0,
        "writes": 85,
        "syncs": 4,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 10554,
      "saved_bytes": 679552,
      "quality": {
        "source_sha256": "170665313e71c3ef5eb4f686d37cab34fa0d3134acffdb4802355c21b1f76328",
        "synthetic": true,
        "counts": {
          "emg": 10039,
          "foot": 262,
          "shank": 251,
          "status": 1,
          "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": 513,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.908106315304,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 2936
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 261,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 248,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 250,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 246,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 817,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 2705
        },
        "error": null,
        "session": "22dad04d-7479ca41",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 262,
            "timestamp_us": 2180001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 251,
            "timestamp_us": 2180002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 2936
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_18a264fc.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 7849,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {
          "7": 2572,
          "3": 66,
          "2": 67
        },
        "stop_reason": 0
      },
      "udp_packets": 817,
      "source_sha256": "c77e027d17a0783ec856fba6a421dfea5cd7ea5a34567ad815c0250d0262a352",
      "case": "queue-stall-350ms",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "f5c76c2ca5a36f9e9cf5cb68fa678bbc30b5fb78049cd5df805ce5d4b021b2f6",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 3,
        "fault": 1,
        "emg": 234,
        "foot": 17,
        "shank": 6,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 11,
        "udp": 34,
        "discarded": 0,
        "writes": 3,
        "syncs": 1,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 128,
      "saved_bytes": 12288,
      "quality": {
        "source_sha256": "e4d29a5ab8388032dd576f9056a7c9abf9f1db41c7b3a0009705b4f3799b65f4",
        "synthetic": true,
        "counts": {
          "emg": 111,
          "foot": 14,
          "shank": 3,
          "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": 17,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.742197706489,
        "last_status": null,
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 13,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 4,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 2,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 3,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 34,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "0dda92a4-f5fa6ac6",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 17,
            "timestamp_us": 955001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 6,
            "timestamp_us": 955002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 234,
          "foot_records": 17,
          "shank_records": 6,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_37019073.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 257,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": 1
      },
      "udp_packets": 34,
      "source_sha256": "ef333ce4ca28e92ed9205acaf21c1f7895c0dcf160cdb99643aaef041cf8b5b9",
      "case": "storage-write-error",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "c713039186a8afb9896782481ce6645730a5d6b5ed58cb2b037b7ad6bab1420c",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 4,
        "fault": 7,
        "emg": 3187,
        "foot": 91,
        "shank": 80,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 59,
        "udp": 366,
        "discarded": 0,
        "writes": 29,
        "syncs": 3,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 3359,
      "saved_bytes": 219072,
      "quality": {
        "source_sha256": "c7d5999201ca5e6220ec75c56517c05b76f5ede790a0ada12516597d917e3702",
        "synthetic": true,
        "counts": {
          "emg": 3187,
          "foot": 91,
          "shank": 80,
          "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": 171,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.901887719175,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 3187,
          "foot_records": 91,
          "shank_records": 80,
          "battery_mv": 3800,
          "queue_high_water": 59
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 7
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 90,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 80,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 79,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 79,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 366,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "11240ac1-0b874131",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 91,
            "timestamp_us": 1325001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 80,
            "timestamp_us": 1325002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 3187,
          "foot_records": 91,
          "shank_records": 80,
          "battery_mv": 3800,
          "queue_high_water": 59
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_218d5f75.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 3359,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": 7
      },
      "udp_packets": 366,
      "source_sha256": "732da5d73450611b411e0814d4bd8e4d58110ed36c8e74a4dac8aebd3f6e4e00",
      "case": "usb-attached-during-recording",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "4feeb1074f4b1d328e752c6b8de850b5e241c6c6a73693454850575b195aa9a6",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 5,
        "fault": 4,
        "emg": 24004,
        "foot": 612,
        "shank": 601,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 62,
        "udp": 2703,
        "discarded": 0,
        "writes": 200,
        "syncs": 6,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 25221,
      "saved_bytes": 1618240,
      "quality": {
        "source_sha256": "cdd4ba4f3717803d6a4b5d598d9941caf9fdb582eaf6293b0b4c0abb19e13771",
        "synthetic": true,
        "counts": {
          "emg": 24004,
          "foot": 612,
          "shank": 601,
          "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": 1213,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.82678857777,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 24004,
          "foot_records": 612,
          "shank_records": 601,
          "battery_mv": 3200,
          "queue_high_water": 62
        },
        "issues": [
          {
            "kind": "abnormal_stop",
            "reason": 4
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 611,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 585,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 600,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 579,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 2703,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "e9fa7e58-c6ae8cde",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 612,
            "timestamp_us": 3930001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 601,
            "timestamp_us": 3930002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 24004,
          "foot_records": 612,
          "shank_records": 601,
          "battery_mv": 3200,
          "queue_high_water": 62
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_20cfbec5.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 25221,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": 4
      },
      "udp_packets": 2703,
      "source_sha256": "3e5f39c0288c43f528aaf9bdf51ddd7707cfc501621c75aa3848bede7ccab3f9",
      "case": "battery-low",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "565bc90d7fbce36d1d630386bee08fa23109808aa96202045dc412c2881df290",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 6,
        "fault": 6,
        "emg": 0,
        "foot": 11,
        "shank": 0,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 1,
        "queue_peak": 11,
        "udp": 5,
        "discarded": 0,
        "writes": 3,
        "syncs": 3,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 12,
      "saved_bytes": 4864,
      "quality": {
        "source_sha256": "9a60944ea33aa1c587989be531da0dde025fe038fce1c8bf168d87fd4c2760d5",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 11,
          "shank": 0,
          "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": 11,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 1,
          "emg_records": 0,
          "foot_records": 11,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "issues": [
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          },
          {
            "kind": "abnormal_stop",
            "reason": 6
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 10,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 1,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 5,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "1235fbbe-8a814bb5",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 11,
            "timestamp_us": 925001,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 1,
          "emg_records": 0,
          "foot_records": 11,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_4809014d.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 12,
        "ended": true,
        "first_sequence": {
          "2": 1
        },
        "sequence_gaps": {},
        "stop_reason": 6
      },
      "udp_packets": 5,
      "source_sha256": "3195d4146d58710297940acdece644b413544667540645746934aa295bff9cc4",
      "case": "adc-stuck-busy",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "ed7a255bf1f2606d41c6725a153b51163e12dbaab59f8f0c6f169eef6b923d0b",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 7,
        "fault": 3,
        "emg": 0,
        "foot": 0,
        "shank": 0,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 1,
        "adc_errors": 0,
        "queue_peak": 0,
        "udp": 4,
        "discarded": 0,
        "writes": 2,
        "syncs": 3,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 1,
      "saved_bytes": 4160,
      "quality": {
        "source_sha256": "ed2645fa9283df52b319b5d4942200f3f631e10ed6d266fbca35dc5ce376c462",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 0,
          "shank": 0,
          "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": 0,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 1,
          "adc_errors": 0,
          "emg_records": 0,
          "foot_records": 0,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 0
        },
        "issues": [
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          },
          {
            "kind": "abnormal_stop",
            "reason": 3
          }
        ],
        "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."
      },
      "live": {
        "stats": {
          "packets": 4,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "14ef7f48-6cc30369",
        "imu": {},
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 1,
          "adc_errors": 0,
          "emg_records": 0,
          "foot_records": 0,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 0
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_3634c79b.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 1,
        "ended": true,
        "first_sequence": {},
        "sequence_gaps": {},
        "stop_reason": 3
      },
      "udp_packets": 4,
      "source_sha256": "55182bc66f625091944518651842ee784fffd7861422dc278737e77a51a5ba76",
      "case": "imu-fifo-overflow",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "9df28efef7b038f7f50e9b041b25bfb2ca77873ff4ca57669f832bb092b7fa66",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 8,
        "fault": 3,
        "emg": 805,
        "foot": 0,
        "shank": 20,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 1,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 51,
        "udp": 97,
        "discarded": 0,
        "writes": 9,
        "syncs": 3,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 826,
      "saved_bytes": 56960,
      "quality": {
        "source_sha256": "f06a820c77b9c0b9b1924779ceaf52d07e64fbce64fc1e8faf6180a7b46a246c",
        "synthetic": true,
        "counts": {
          "emg": 805,
          "foot": 0,
          "shank": 20,
          "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": 20,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.794089609151,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 1,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 805,
          "foot_records": 0,
          "shank_records": 20,
          "battery_mv": 3800,
          "queue_high_water": 51
        },
        "issues": [
          {
            "kind": "missing_stream",
            "stream": "foot"
          },
          {
            "kind": "abnormal_stop",
            "reason": 3
          }
        ],
        "imu_clock": {
          "shank": {
            "tick_steps": 19,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 20,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 97,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "4c386712-17b023fa",
        "imu": {
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 20,
            "timestamp_us": 1025000,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 1,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 805,
          "foot_records": 0,
          "shank_records": 20,
          "battery_mv": 3800,
          "queue_high_water": 51
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_2f1f3c3a.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 826,
        "ended": true,
        "first_sequence": {
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": 3
      },
      "udp_packets": 97,
      "source_sha256": "be06ef9b156f472381a9127fce289a0c39c9c88c822776c6f7e4b014648d9447",
      "case": "imu-missing-interrupt",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "5a33fc18056b15f111f33e19600566270652729f037512f5ce59b753e072ebdb",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 9,
        "fault": 0,
        "emg": 10040,
        "foot": 262,
        "shank": 251,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 58,
        "udp": 0,
        "discarded": 0,
        "writes": 85,
        "syncs": 4,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 10555,
      "saved_bytes": 679616,
      "quality": {
        "source_sha256": "3e98d052bc067520dbb4da57e46e9f5167ddc4c86f2df2a34ff9cb75b059e9a4",
        "synthetic": true,
        "counts": {
          "emg": 10040,
          "foot": 262,
          "shank": 251,
          "status": 1,
          "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": 513,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.935104183235,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10040,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 58
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 261,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 248,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 250,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 246,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 0,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": null,
        "imu": {},
        "health": {}
      },
      "udp_packets": 0,
      "source_sha256": "216fd4ae51a52382ed81e8a67a7890be996573ad8aa250495cdcb4d9d5944b62",
      "case": "no-wireless-subscriber",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "bf779f763d890285e6806074d3aab13c70d4277a997f2d5ce32d973cf93c4c3f",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 10,
        "fault": 0,
        "emg": 10039,
        "foot": 262,
        "shank": 251,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 61,
        "udp": 1130,
        "discarded": 160,
        "writes": 85,
        "syncs": 4,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 10554,
      "saved_bytes": 679552,
      "quality": {
        "source_sha256": "e6df9000a2e83b0b10f381f04e4b02afa32416a823842d6b1f7fee3a0aa7a202",
        "synthetic": true,
        "counts": {
          "emg": 10039,
          "foot": 262,
          "shank": 251,
          "status": 1,
          "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": 513,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.895406038904,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 261,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 248,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 250,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 246,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 970,
          "packet_gaps": 160,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "7b8d1c44-d47c87c7",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 262,
            "timestamp_us": 2180001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 251,
            "timestamp_us": 2180002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_b30301e8.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 9056,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {
          "7": 1416,
          "2": 40,
          "3": 42
        },
        "stop_reason": 0
      },
      "udp_packets": 970,
      "source_sha256": "f2af0881141a2761533ad060751d581220ef8b2cd98ffe447405584e6fa6aa14",
      "case": "wireless-packet-loss",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "bfca6aeded481b2a7d6aa7e5e16771b9990f638c1d0dcaa6250b28c7a42060a8",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 11,
        "fault": 0,
        "emg": 8776,
        "foot": 231,
        "shank": 220,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 61,
        "udp": 987,
        "discarded": 0,
        "writes": 73,
        "syncs": 2,
        "closes": 0,
        "pages": 112
      },
      "saved_record_count": 8396,
      "saved_bytes": 541440,
      "quality": {
        "source_sha256": "4e542140d45935f182a9fda26115f781c285447230f27d176fbea923ef1b0e11",
        "synthetic": true,
        "counts": {
          "emg": 7984,
          "foot": 211,
          "shank": 200,
          "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": 411,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.902180946447,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 8036,
          "foot_records": 212,
          "shank_records": 201,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "issues": [
          {
            "kind": "missing_end",
            "message": "Unfinalized session; trailing samples may be lost."
          },
          {
            "kind": "counter_mismatch",
            "stream": "emg",
            "reported": 8036,
            "decoded": 7984
          },
          {
            "kind": "counter_mismatch",
            "stream": "foot",
            "reported": 212,
            "decoded": 211
          },
          {
            "kind": "counter_mismatch",
            "stream": "shank",
            "reported": 201,
            "decoded": 200
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 210,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 198,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 199,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 196,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 986,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "4f92b7b4-eac6b716",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 230,
            "timestamp_us": 2020001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 219,
            "timestamp_us": 2020002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 8036,
          "foot_records": 212,
          "shank_records": 201,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_310a63f6.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 9216,
        "ended": false,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": null
      },
      "udp_packets": 986,
      "source_sha256": "5312874a78536f8aff1eea5f70a3d4f745d91bf078e01e297ddc73456c2f262c",
      "case": "interrupted-recording",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "d65c894a22484ac65c1fc39cb921ec486c23815bf0dc2d8d17929de847995a29",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "refused": true,
      "reason": "Initialization failed; recording disabled.",
      "case": "storage-mount-failure",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "4b51a122c2f5f0505e2b406c5f347e81db34697dc08dd5a42f964de3752ada6d",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "refused": true,
      "reason": "Start refused:",
      "case": "full-card-refusal",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "3dcffb6fa36df273d61f64de1a3e3baf75b4fa6821a72179afab5d7c5bc437b3",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 14,
        "fault": 0,
        "emg": 10039,
        "foot": 262,
        "shank": 251,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 0,
        "queue_peak": 61,
        "udp": 1127,
        "discarded": 0,
        "writes": 85,
        "syncs": 4,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 10554,
      "saved_bytes": 679552,
      "quality": {
        "source_sha256": "c68f6435084f8472de6dc8ce0ea9c1c22b453632f7a5a7c5a15aee888f7b1673",
        "synthetic": true,
        "counts": {
          "emg": 10039,
          "foot": 262,
          "shank": 251,
          "status": 1,
          "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": 513,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": 7983.895406038904,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "issues": [],
        "imu_clock": {
          "foot": {
            "tick_steps": 261,
            "median_tick_step": 4688.0,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0107,
            "fit_reads": 248,
            "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": true,
            "within_datasheet_tolerance": true,
            "host_time_fit": null
          },
          "shank": {
            "tick_steps": 250,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 246,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 1127,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "bcacab1a-2b5d834a",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 262,
            "timestamp_us": 2180001,
            "flags": 2
          },
          "shank": {
            "accel_g": [
              0.0009765625,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 251,
            "timestamp_us": 2180002,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 0,
          "emg_records": 10039,
          "foot_records": 262,
          "shank_records": 251,
          "battery_mv": 3800,
          "queue_high_water": 61
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_faf27957.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 10554,
        "ended": true,
        "first_sequence": {
          "2": 1,
          "7": 1,
          "3": 1
        },
        "sequence_gaps": {},
        "stop_reason": 0
      },
      "udp_packets": 1127,
      "source_sha256": "ef6044ffb7d9f205131c8774f9ce9d92e9f16f1f9706b6a90476c824c8ef6426",
      "case": "filtered-synthetic-emg",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "be9cd425fa96f0b91216068b6469eaee839dc71776ada7f6dcd477e692ad00c2",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "refused": true,
      "reason": "Initialization failed; recording disabled.",
      "case": "absent-shank",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "c34de08431ae362b61fe3d86cecb561f35e7b2c375f18e78902989a5b4d23276",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 6,
        "fault": 6,
        "emg": 0,
        "foot": 11,
        "shank": 0,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 1,
        "queue_peak": 11,
        "udp": 5,
        "discarded": 0,
        "writes": 3,
        "syncs": 3,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 12,
      "saved_bytes": 4864,
      "quality": {
        "source_sha256": "0dce5fa65cee83a49b458aadb8f50a46d47510e26c639b358cf1635001c0ccef",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 11,
          "shank": 0,
          "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": 11,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 1,
          "emg_records": 0,
          "foot_records": 11,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "issues": [
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          },
          {
            "kind": "abnormal_stop",
            "reason": 6
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 10,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 1,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 5,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "85a849d3-f2461ab5",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 11,
            "timestamp_us": 925001,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 1,
          "emg_records": 0,
          "foot_records": 11,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_33648f92.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 12,
        "ended": true,
        "first_sequence": {
          "2": 1
        },
        "sequence_gaps": {},
        "stop_reason": 6
      },
      "udp_packets": 5,
      "source_sha256": "64bdce0955ed4ebc76fd8ba5ab1e99d83890610a2908ba9e9e718c255280c031",
      "case": "adc-busy-stays-low",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "8b625aeca96689c534376a056b65da25ea03a2ae66f7951f1739dd29c6eb21a4",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    },
    {
      "pass": true,
      "failures": [],
      "production": {
        "case": 6,
        "fault": 6,
        "emg": 0,
        "foot": 11,
        "shank": 0,
        "missed": 0,
        "dropped": 0,
        "imu_errors": 0,
        "fifo_overflows": 0,
        "adc_errors": 1,
        "queue_peak": 11,
        "udp": 5,
        "discarded": 0,
        "writes": 3,
        "syncs": 3,
        "closes": 1,
        "pages": 112
      },
      "saved_record_count": 12,
      "saved_bytes": 4864,
      "quality": {
        "source_sha256": "b2555b8104f1b8ce3822c579022a8ae94c81600962293f66b9333fd30db93641",
        "synthetic": true,
        "counts": {
          "emg": 0,
          "foot": 11,
          "shank": 0,
          "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": 11,
          "flagged_gap_records": 0
        },
        "emg_observed_skipped_slots": 0,
        "emg_rate_from_host_timestamps_hz": null,
        "last_status": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 1,
          "emg_records": 0,
          "foot_records": 11,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "issues": [
          {
            "kind": "missing_stream",
            "stream": "emg"
          },
          {
            "kind": "missing_stream",
            "stream": "shank"
          },
          {
            "kind": "abnormal_stop",
            "reason": 6
          }
        ],
        "imu_clock": {
          "foot": {
            "tick_steps": 10,
            "median_tick_step": 4687.5,
            "expected_tick_step": 4687.4999,
            "nominal_tick_us": 1.0666667,
            "median_step_error_percent": 0.0,
            "fit_reads": 1,
            "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": true,
            "within_datasheet_tolerance": true,
            "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."
      },
      "live": {
        "stats": {
          "packets": 5,
          "packet_gaps": 0,
          "reordered_or_duplicate": 0,
          "invalid_packets": 0,
          "unknown_session_packets": 0,
          "device_queue_drops": 0
        },
        "error": null,
        "session": "01802485-197f8443",
        "imu": {
          "foot": {
            "accel_g": [
              0.00048828125,
              0.0,
              1.0
            ],
            "gyro_dps": [
              0.0,
              0.0,
              0.0
            ],
            "sequence": 11,
            "timestamp_us": 925001,
            "flags": 2
          }
        },
        "health": {
          "timer_missed": 0,
          "queue_dropped": 0,
          "imu_errors": 0,
          "fifo_overflows": 0,
          "adc_errors": 1,
          "emg_records": 0,
          "foot_records": 11,
          "shank_records": 0,
          "battery_mv": 3800,
          "queue_high_water": 11
        },
        "metadata": {
          "hardware_design": "AD7606_TWO_FIXED",
          "schema": "afo-recorder/3",
          "adc_model": "AD7606",
          "adc_bits": 16,
          "adc_reference_mv": 5000,
          "adc_reference_measured": false,
          "input_scale": 1,
          "input_midpoint_mv": 0,
          "adc_pga": 1,
          "adc_osr": 1,
          "adc_sensor_crc_supported": false,
          "adc_filter": "oversampling disabled; internal analog filter",
          "sample_timestamp_event": "CONVST GPIO write software timestamp",
          "adc_clock_hz": 0,
          "sd_cmd_gpio": 47,
          "sd_clk_gpio": 39,
          "sd_d0_gpio": 40,
          "firmware": "ad7606-2ch-1.12",
          "hardware_variant": "breadboard",
          "synthetic": true,
          "trial_id": "trial_439530e7.afolog",
          "clock": "esp_timer_boot_us",
          "emg_hz": 8000,
          "imu_hz": 200,
          "imu_enabled": true,
          "active_channel_count": 2,
          "emg_channels": [
            "EMG1",
            "EMG2"
          ],
          "calibration_state": "uncalibrated",
          "simultaneous": true,
          "accel_range_g": 16,
          "gyro_range_dps": 2000,
          "imu_timestamp_tick_us": 1.0666667,
          "imu_timing_calibrated": false,
          "imu_locations": [
            "foot",
            "shank"
          ],
          "imu_time": "fifo_delta_first_irq",
          "placement_verified": false,
          "record_bytes": 64,
          "usb_recording_inhibit": true,
          "record_queue_entries": 20480,
          "analog_filter": "two cascaded 3.3k/47nF low-pass sections, each unity buffered; 100R series output, 1nF to ground; single-ended ADC",
          "unplugged_input_bias_mv": 1500,
          "unplugged_input_bias_ohm": 1000000,
          "clock_or_filter_delay_correction": "none",
          "notes": "Engineering prototype; physical validation pending",
          "transport": "wifi_udp",
          "live_capture": true
        },
        "records": 12,
        "ended": true,
        "first_sequence": {
          "2": 1
        },
        "sequence_gaps": {},
        "stop_reason": 6
      },
      "udp_packets": 5,
      "source_sha256": "aa4fc5a068dafa3c1c6aa448fde9c700847c46698e5d7b44d70d3fc25eef59b7",
      "case": "adc-trigger-ignored",
      "engine": "Wokwi web editor",
      "firmware": "ad7606-2ch-1.12",
      "hardware_measured": false,
      "serial_sha256": "d8e978748ec948964b62ebd1f6d9aa84458918f30db86c30fa0715a8b7611e84",
      "assessor_sha256": "a8be32e469cc56ed7c6f4daae19ed5ba16caaaae91f2aa385800f3aa8db9bc76",
      "merged_image_sha256": "1430e1aebf43a683c66e730069adcbcbe66df05a724f9cb2d7491c5577613d2d",
      "build_identity_checked_against_tree": true,
      "executed": true
    }
  ]
}
