{
  "scope": "Generated events only; half-open intervals, explicit fixed offsets, whole minutes. No recurring events, named-zone DST resolution or personal calendars.",
  "scenarios": [
    {
      "id": "overlap",
      "start": "2026-10-24T09:00+09:00",
      "end": "2026-10-24T17:00+09:00",
      "rows": [
        {
          "id": "A",
          "start": "2026-10-24T09:00+09:00",
          "end": "2026-10-24T09:30+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        },
        {
          "id": "B",
          "start": "2026-10-24T09:30+09:00",
          "end": "2026-10-24T11:00+09:00",
          "raw_minutes": 90,
          "clipped_minutes": 90
        },
        {
          "id": "C",
          "start": "2026-10-24T10:15+09:00",
          "end": "2026-10-24T10:45+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        },
        {
          "id": "D",
          "start": "2026-10-24T10:30+09:00",
          "end": "2026-10-24T11:15+09:00",
          "raw_minutes": 45,
          "clipped_minutes": 45
        },
        {
          "id": "E",
          "start": "2026-10-24T12:00+09:00",
          "end": "2026-10-24T13:00+09:00",
          "raw_minutes": 60,
          "clipped_minutes": 60
        },
        {
          "id": "F",
          "start": "2026-10-24T16:15+09:00",
          "end": "2026-10-24T17:30+09:00",
          "raw_minutes": 75,
          "clipped_minutes": 45
        }
      ],
      "window_minutes": 480,
      "raw_sum_minutes": 330,
      "clipped_sum_minutes": 300,
      "occupied_minutes": 240,
      "conflict_minutes": 45,
      "extra_counted_minutes": 60,
      "peak_events": 3,
      "unoccupied_minutes": 240,
      "longest_gap_minutes": 195,
      "merged_offsets": [
        [
          0,
          135
        ],
        [
          180,
          240
        ],
        [
          435,
          480
        ]
      ],
      "gap_offsets": [
        [
          135,
          180
        ],
        [
          240,
          435
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 30,
          "active_ids": [
            "A"
          ]
        },
        {
          "start_minute": 30,
          "end_minute": 75,
          "active_ids": [
            "B"
          ]
        },
        {
          "start_minute": 75,
          "end_minute": 90,
          "active_ids": [
            "B",
            "C"
          ]
        },
        {
          "start_minute": 90,
          "end_minute": 105,
          "active_ids": [
            "B",
            "C",
            "D"
          ]
        },
        {
          "start_minute": 105,
          "end_minute": 120,
          "active_ids": [
            "B",
            "D"
          ]
        },
        {
          "start_minute": 120,
          "end_minute": 135,
          "active_ids": [
            "D"
          ]
        },
        {
          "start_minute": 135,
          "end_minute": 180,
          "active_ids": []
        },
        {
          "start_minute": 180,
          "end_minute": 240,
          "active_ids": [
            "E"
          ]
        },
        {
          "start_minute": 240,
          "end_minute": 435,
          "active_ids": []
        },
        {
          "start_minute": 435,
          "end_minute": 480,
          "active_ids": [
            "F"
          ]
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    },
    {
      "id": "adjacent",
      "start": "2026-10-24T09:00+09:00",
      "end": "2026-10-24T11:00+09:00",
      "rows": [
        {
          "id": "A",
          "start": "2026-10-24T09:30+09:00",
          "end": "2026-10-24T10:00+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        },
        {
          "id": "B",
          "start": "2026-10-24T10:00+09:00",
          "end": "2026-10-24T10:30+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        }
      ],
      "window_minutes": 120,
      "raw_sum_minutes": 60,
      "clipped_sum_minutes": 60,
      "occupied_minutes": 60,
      "conflict_minutes": 0,
      "extra_counted_minutes": 0,
      "peak_events": 1,
      "unoccupied_minutes": 60,
      "longest_gap_minutes": 30,
      "merged_offsets": [
        [
          30,
          90
        ]
      ],
      "gap_offsets": [
        [
          0,
          30
        ],
        [
          90,
          120
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 30,
          "active_ids": []
        },
        {
          "start_minute": 30,
          "end_minute": 60,
          "active_ids": [
            "A"
          ]
        },
        {
          "start_minute": 60,
          "end_minute": 90,
          "active_ids": [
            "B"
          ]
        },
        {
          "start_minute": 90,
          "end_minute": 120,
          "active_ids": []
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    },
    {
      "id": "overnight",
      "start": "2026-10-24T23:00+09:00",
      "end": "2026-10-25T02:00+09:00",
      "rows": [
        {
          "id": "A",
          "start": "2026-10-24T23:30+09:00",
          "end": "2026-10-25T00:30+09:00",
          "raw_minutes": 60,
          "clipped_minutes": 60
        },
        {
          "id": "B",
          "start": "2026-10-25T00:15+09:00",
          "end": "2026-10-25T01:15+09:00",
          "raw_minutes": 60,
          "clipped_minutes": 60
        }
      ],
      "window_minutes": 180,
      "raw_sum_minutes": 120,
      "clipped_sum_minutes": 120,
      "occupied_minutes": 105,
      "conflict_minutes": 15,
      "extra_counted_minutes": 15,
      "peak_events": 2,
      "unoccupied_minutes": 75,
      "longest_gap_minutes": 45,
      "merged_offsets": [
        [
          30,
          135
        ]
      ],
      "gap_offsets": [
        [
          0,
          30
        ],
        [
          135,
          180
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 30,
          "active_ids": []
        },
        {
          "start_minute": 30,
          "end_minute": 75,
          "active_ids": [
            "A"
          ]
        },
        {
          "start_minute": 75,
          "end_minute": 90,
          "active_ids": [
            "A",
            "B"
          ]
        },
        {
          "start_minute": 90,
          "end_minute": 135,
          "active_ids": [
            "B"
          ]
        },
        {
          "start_minute": 135,
          "end_minute": 180,
          "active_ids": []
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    },
    {
      "id": "same_instant_different_offsets",
      "start": "2026-10-24T09:00+09:00",
      "end": "2026-10-24T10:00+09:00",
      "rows": [
        {
          "id": "A",
          "start": "2026-10-24T09:00+09:00",
          "end": "2026-10-24T09:30+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        },
        {
          "id": "B",
          "start": "2026-10-24T00:00Z",
          "end": "2026-10-24T00:30Z",
          "raw_minutes": 30,
          "clipped_minutes": 30
        }
      ],
      "window_minutes": 60,
      "raw_sum_minutes": 60,
      "clipped_sum_minutes": 60,
      "occupied_minutes": 30,
      "conflict_minutes": 30,
      "extra_counted_minutes": 30,
      "peak_events": 2,
      "unoccupied_minutes": 30,
      "longest_gap_minutes": 30,
      "merged_offsets": [
        [
          0,
          30
        ]
      ],
      "gap_offsets": [
        [
          30,
          60
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 30,
          "active_ids": [
            "A",
            "B"
          ]
        },
        {
          "start_minute": 30,
          "end_minute": 60,
          "active_ids": []
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    },
    {
      "id": "empty",
      "start": "2026-10-24T09:00+09:00",
      "end": "2026-10-24T10:00+09:00",
      "rows": [],
      "window_minutes": 60,
      "raw_sum_minutes": 0,
      "clipped_sum_minutes": 0,
      "occupied_minutes": 0,
      "conflict_minutes": 0,
      "extra_counted_minutes": 0,
      "peak_events": 0,
      "unoccupied_minutes": 60,
      "longest_gap_minutes": 60,
      "merged_offsets": [],
      "gap_offsets": [
        [
          0,
          60
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 60,
          "active_ids": []
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    },
    {
      "id": "outside",
      "start": "2026-10-24T09:00+09:00",
      "end": "2026-10-24T10:00+09:00",
      "rows": [
        {
          "id": "A",
          "start": "2026-10-24T08:00+09:00",
          "end": "2026-10-24T09:00+09:00",
          "raw_minutes": 60,
          "clipped_minutes": 0
        },
        {
          "id": "B",
          "start": "2026-10-24T10:00+09:00",
          "end": "2026-10-24T11:00+09:00",
          "raw_minutes": 60,
          "clipped_minutes": 0
        }
      ],
      "window_minutes": 60,
      "raw_sum_minutes": 120,
      "clipped_sum_minutes": 0,
      "occupied_minutes": 0,
      "conflict_minutes": 0,
      "extra_counted_minutes": 0,
      "peak_events": 0,
      "unoccupied_minutes": 60,
      "longest_gap_minutes": 60,
      "merged_offsets": [],
      "gap_offsets": [
        [
          0,
          60
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 60,
          "active_ids": []
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    },
    {
      "id": "repaired",
      "start": "2026-10-24T09:00+09:00",
      "end": "2026-10-24T17:00+09:00",
      "rows": [
        {
          "id": "A",
          "start": "2026-10-24T09:00+09:00",
          "end": "2026-10-24T09:30+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        },
        {
          "id": "B",
          "start": "2026-10-24T09:30+09:00",
          "end": "2026-10-24T11:00+09:00",
          "raw_minutes": 90,
          "clipped_minutes": 90
        },
        {
          "id": "C",
          "start": "2026-10-24T13:00+09:00",
          "end": "2026-10-24T13:30+09:00",
          "raw_minutes": 30,
          "clipped_minutes": 30
        },
        {
          "id": "D",
          "start": "2026-10-24T13:30+09:00",
          "end": "2026-10-24T14:15+09:00",
          "raw_minutes": 45,
          "clipped_minutes": 45
        },
        {
          "id": "E",
          "start": "2026-10-24T12:00+09:00",
          "end": "2026-10-24T13:00+09:00",
          "raw_minutes": 60,
          "clipped_minutes": 60
        },
        {
          "id": "F",
          "start": "2026-10-24T16:15+09:00",
          "end": "2026-10-24T17:30+09:00",
          "raw_minutes": 75,
          "clipped_minutes": 45
        }
      ],
      "window_minutes": 480,
      "raw_sum_minutes": 330,
      "clipped_sum_minutes": 300,
      "occupied_minutes": 300,
      "conflict_minutes": 0,
      "extra_counted_minutes": 0,
      "peak_events": 1,
      "unoccupied_minutes": 180,
      "longest_gap_minutes": 120,
      "merged_offsets": [
        [
          0,
          120
        ],
        [
          180,
          315
        ],
        [
          435,
          480
        ]
      ],
      "gap_offsets": [
        [
          120,
          180
        ],
        [
          315,
          435
        ]
      ],
      "segments": [
        {
          "start_minute": 0,
          "end_minute": 30,
          "active_ids": [
            "A"
          ]
        },
        {
          "start_minute": 30,
          "end_minute": 120,
          "active_ids": [
            "B"
          ]
        },
        {
          "start_minute": 120,
          "end_minute": 180,
          "active_ids": []
        },
        {
          "start_minute": 180,
          "end_minute": 240,
          "active_ids": [
            "E"
          ]
        },
        {
          "start_minute": 240,
          "end_minute": 270,
          "active_ids": [
            "C"
          ]
        },
        {
          "start_minute": 270,
          "end_minute": 315,
          "active_ids": [
            "D"
          ]
        },
        {
          "start_minute": 315,
          "end_minute": 435,
          "active_ids": []
        },
        {
          "start_minute": 435,
          "end_minute": 480,
          "active_ids": [
            "F"
          ]
        }
      ],
      "minute_oracle": "matched; whole-minute fixed-offset cases only"
    }
  ],
  "midnight_split_occupied_minutes": [
    30,
    75
  ],
  "invalid_inputs": [
    {
      "case": "missing_offset",
      "result": "rejected_as_expected",
      "reason": "Expected a dated, whole-minute timestamp with explicit UTC offset"
    },
    {
      "case": "seconds_precision",
      "result": "rejected_as_expected",
      "reason": "Expected a dated, whole-minute timestamp with explicit UTC offset"
    },
    {
      "case": "invalid_date",
      "result": "rejected_as_expected",
      "reason": "day is out of range for month"
    },
    {
      "case": "zero_duration",
      "result": "rejected_as_expected",
      "reason": "End must follow start; midnight does not imply the next day"
    },
    {
      "case": "reversed_end",
      "result": "rejected_as_expected",
      "reason": "End must follow start; midnight does not imply the next day"
    },
    {
      "case": "duplicate_id",
      "result": "rejected_as_expected",
      "reason": "Event IDs must be nonempty and distinct"
    },
    {
      "case": "missing_end",
      "result": "rejected_as_expected",
      "reason": "'end'"
    },
    {
      "case": "reversed_window",
      "result": "rejected_as_expected",
      "reason": "Window must be positive and at most 1440 minutes"
    },
    {
      "case": "window_over_24h",
      "result": "rejected_as_expected",
      "reason": "Window must be positive and at most 1440 minutes"
    }
  ]
}
