Skip to content

fix(seaworld): type evening event hours as TICKETED_EVENT, not OPERATING#264

Merged
cubehouse merged 3 commits into
mainfrom
fix/seaworld-event-hours
Jul 23, 2026
Merged

fix(seaworld): type evening event hours as TICKETED_EVENT, not OPERATING#264
cubehouse merged 3 commits into
mainfrom
fix/seaworld-event-hours

Conversation

@cubehouse

Copy link
Copy Markdown
Member

Bug

Aquatica Orlando (and any SeaWorld/Busch Gardens park with evening events) was showing its event hours as normal operating hours.

Cause

On event days the hours API returns a second open_hours block for the same date — the daytime session plus a separate evening event after a gap:

07/23  09:00–19:30   (normal)
07/23  20:00–23:00   (evening event)

buildSchedules mapped every block to type: OPERATING, so the event collided with / overwrote the day's real hours. The API entries carry no type field (only opens_at/closes_at/date), so the distinction is structural.

Fix

Group open_hours by date; the earliest session is OPERATING, any later same-date block is TICKETED_EVENT. Verified against live data:

2026-07-23 OPERATING       09:00 -> 19:30
2026-07-23 TICKETED_EVENT  20:00 -> 23:00
2026-07-26 OPERATING       09:00 -> 19:00   (non-event day unchanged)

Applies to the whole SeaWorld/Busch Gardens family — their evening events (Howl-O-Scream, summer nights, etc.) are separately ticketed, so TICKETED_EVENT is correct.

Tests

3 new buildSchedules tests (event→TICKETED_EVENT + single OPERATING; single-block day stays OPERATING; earliest-block-wins regardless of API ordering). Full suite: 1498 pass.

🤖 Generated with Claude Code

cubehouse and others added 3 commits July 23, 2026 20:58
On event days the SeaWorld hours API returns a second open_hours block for the
same date: the park's daytime session plus a separate evening event (e.g.
Aquatica Orlando summer nights, 09:00-19:30 normal then 20:00-23:00). Both
arrive type-less, so emitting them all as OPERATING made the event masquerade
as, and downstream overwrite, the normal operating hours.

Group open_hours by date, keep the earliest session as OPERATING, and mark any
later same-date block as TICKETED_EVENT. Applies to the whole SeaWorld / Busch
Gardens family (their evening events are separately ticketed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review found the earlier "earliest block = OPERATING" rule inverts if an event
opens before normal hours (pre-opening early-entry) or at midnight — the event
would be labelled OPERATING and the real hours TICKETED_EVENT. There is no event
flag on the hours entries, and the /events endpoint is a noisy mixed list
(festivals, shows, private events; 500s for some parks) that doesn't reliably
map to an hours block.

Classify by time of day instead: the block overlapping core midday (12:00-16:00
local) is the OPERATING session; every other same-date block is a
TICKETED_EVENT. Falls back to the longest block if none overlaps (evening-only
day). Robust to evening, pre-opening, midnight, and overnight events, and to a
short day paired with a longer event.

Verified across the family: no date resolves to more than one OPERATING block,
and no peripheral (non-OPERATING) block opens in the morning — i.e. hotel
early-entry / extra-hours blocks can't leak into normal operating hours. All
real event blocks (Howl-O-Scream, AquaGlow) are evening ticketed events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…glitch)

On some event days the API dates a daytime block's closes_at one day late (e.g.
SeaWorld Orlando Howl-O-Scream: opens 09/18 09:00, closes_at dated 09/19 → a
bogus 34-35h "operating" span). No real session or event runs >25h, so roll the
close back one day when the span exceeds that. Legit past-midnight event closes
(20:00->01:00, ~5h) are well under the threshold and untouched. 16 SeaWorld
Orlando blocks corrected; live check shows 0 remaining >25h spans.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cubehouse
cubehouse merged commit ca0b04a into main Jul 23, 2026
4 checks passed
@cubehouse
cubehouse deleted the fix/seaworld-event-hours branch July 23, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant