{
  "pass": true,
  "failures": [],
  "production": {
    "case": 2,
    "fault": 2,
    "emg": 2063,
    "foot": 63,
    "shank": 52,
    "missed": 0,
    "dropped": 1,
    "imu_errors": 0,
    "fifo_overflows": 0,
    "adc_errors": 0,
    "queue_peak": 2048,
    "udp": 27,
    "discarded": 0,
    "writes": 20,
    "syncs": 3,
    "closes": 1,
    "pages": 192
  },
  "saved_record_count": 2178,
  "saved_bytes": 143488,
  "quality": {
    "source_sha256": "55a582e5fe20bf63dcf5421c9d1cc35c8b58b9dcd4fd38f4b66fb692ec28484a",
    "synthetic": true,
    "counts": {
      "emg": 2062,
      "foot": 63,
      "shank": 52,
      "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": 115,
      "flagged_gap_records": 0
    },
    "emg_observed_skipped_slots": 0,
    "emg_rate_from_host_timestamps_hz": 7983.915953886203,
    "last_status": {
      "timer_missed": 0,
      "queue_dropped": 1,
      "imu_errors": 0,
      "fifo_overflows": 0,
      "adc_errors": 0,
      "emg_records": 2063,
      "foot_records": 63,
      "shank_records": 52,
      "battery_mv": 3800,
      "queue_high_water": 2048
    },
    "issues": [
      {
        "kind": "counter_mismatch",
        "stream": "emg",
        "reported": 2063,
        "decoded": 2062
      },
      {
        "kind": "abnormal_stop",
        "reason": 2
      }
    ],
    "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": 27,
      "packet_gaps": 0,
      "reordered_or_duplicate": 0,
      "invalid_packets": 0,
      "unknown_session_packets": 0,
      "device_queue_drops": 1905
    },
    "error": null,
    "session": "3b93f024-b78402c8",
    "imu": {
      "foot": {
        "accel_g": [
          0.00048828125,
          0.0,
          1.0
        ],
        "gyro_dps": [
          0.0,
          0.0,
          0.0
        ],
        "sequence": 44,
        "timestamp_us": 1090001,
        "flags": 2
      },
      "shank": {
        "accel_g": [
          0.0009765625,
          0.0,
          1.0
        ],
        "gyro_dps": [
          0.0,
          0.0,
          0.0
        ],
        "sequence": 33,
        "timestamp_us": 1090002,
        "flags": 2
      }
    },
    "health": {
      "timer_missed": 0,
      "queue_dropped": 1,
      "imu_errors": 0,
      "fifo_overflows": 0,
      "adc_errors": 0,
      "emg_records": 2063,
      "foot_records": 63,
      "shank_records": 52,
      "battery_mv": 3800,
      "queue_high_water": 2048
    },
    "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.6",
      "hardware_variant": "breadboard",
      "synthetic": true,
      "trial_id": "trial_677c028b.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,
      "imu_timing_calibrated": false,
      "imu_locations": [
        "foot",
        "shank"
      ],
      "imu_time": "fifo_delta_first_irq",
      "placement_verified": false,
      "record_bytes": 64,
      "usb_recording_inhibit": true,
      "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": 273,
    "ended": true,
    "first_sequence": {
      "2": 1,
      "7": 1,
      "3": 1
    },
    "sequence_gaps": {
      "7": 1582,
      "2": 28,
      "3": 28
    },
    "stop_reason": 2
  },
  "udp_packets": 27,
  "source_sha256": "0140e4481f7d7838f421d98fb8fcc119dacf86b74312a5be3de46f6bc458114e",
  "case": "queue-stall-350ms",
  "engine": "Wokwi web editor",
  "firmware": "ad7606-2ch-1.6",
  "hardware_measured": false,
  "serial_sha256": "4626ea588428efcd78d9a029188f17f0aef9f6e0fe454785196d9430c9fc5b96",
  "assessor_sha256": "bfb185c259584a6dc6aa2d8b853f9c650225e1813916466bc8a821d0d739c639",
  "merged_image_sha256": "68eb6996195abbbb6eb2f8e2a327ccff640f0fc4c25c9ac2e20cdeb01183808c"
}
