{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "field_replay.window_summary.v2",
  "type": "object",
  "required": [
    "schema",
    "sample_type",
    "from_agent_id",
    "to_agent_id",
    "t_ms",
    "duration_ms",
    "expected",
    "received",
    "loss_pct",
    "rtt_p50_ms",
    "rtt_p95_ms",
    "rtt_p99_ms",
    "rtt_max_ms",
    "jitter_p95_ms",
    "max_burst_loss_packets",
    "reorder_pct",
    "duplicate_pct",
    "events"
  ],
  "properties": {
    "schema": {
      "const": "field_replay.window_summary.v2"
    },
    "sample_type": {
      "type": "string"
    },
    "from_agent_id": {
      "type": "string"
    },
    "to_agent_id": {
      "type": "string"
    },
    "t_ms": {
      "type": "integer"
    },
    "duration_ms": {
      "type": "integer"
    },
    "expected": {
      "type": "integer"
    },
    "received": {
      "type": "integer"
    },
    "loss_pct": {
      "type": "number"
    },
    "rtt_p50_ms": {
      "type": "number"
    },
    "rtt_p95_ms": {
      "type": "number"
    },
    "rtt_p99_ms": {
      "type": "number"
    },
    "rtt_max_ms": {
      "type": "number"
    },
    "jitter_p95_ms": {
      "type": "number"
    },
    "max_burst_loss_packets": {
      "type": "integer"
    },
    "reorder_pct": {
      "type": "number"
    },
    "duplicate_pct": {
      "type": "number"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object"
      }
    }
  },
  "description": "v2: canonical field naming (rtt_ms_pN->rtt_pN_ms, jitter_ms_p95->jitter_p95_ms)."
}