Skip to content

fix(europapark): report rides the feed drops overnight as CLOSED - #689

Merged
cubehouse merged 1 commit into
mainfrom
fix/europapark-overnight-ride-drop
Oct 30, 2026
Merged

cubehouse merged 1 commit into
mainfrom
fix/europapark-overnight-ride-drop

Conversation

@cubehouse

Copy link
Copy Markdown
Member

Problem

Around midnight Europe/Berlin the Europa-Park waiting-times feed stops listing rides for the main park, Rulantica and Traumatica. It keeps only restaurants (all closed) and the virtual-queue entries. Rides reappear one by one before opening (from about 07:00 local). Overnight, about a third of the destination's live entities (151 to 102) disappeared from buildLiveData output instead of reading CLOSED. A consumer that treats a missing entity as removed loses those rides' live state every night.

Fix

src/parks/europapark/europapark.ts

  • rememberRides() keeps the rides the feed listed in the last 7 days (entity id to last-seen time, cached under europapark:recentRideIds).
  • _carryForwardAbsentRides() runs after the wait-time passes. While a ride's own park is outside its published hours, a remembered ride the feed no longer lists is emitted as {status: 'CLOSED'}.
    • Main park: live calendar (insideMainParkHours), falling back to the seasons feed.
    • Rulantica / Traumatica: seasons feed (insideSeasonHours), starting from yesterday so a closing time after midnight counts.
  • Not changed:
    • a ride the feed does list keeps its reported status (the morning ramp's 222/333 entries win);
    • an absent ride inside published hours is still left out;
    • nothing is carried when a park's hours cannot be read;
    • a ride never listed is never invented, and one unlisted for over a week is forgotten.
  • Runs before _applyMainParkClosure, so closed-day handling is unchanged.

Tests

__tests__/overnightRideDrop.test.ts replays the real 2026-09-28 fixtures with a night feed derived by removing every ride entry:

  • every ride seen by day reads CLOSED overnight, across all three parks;
  • morning ramp, own-hours per park (Rulantica open while the main park is closed), inside-hours absence, no memory, both hour sources failing, calendar fallback, 7-day expiry;
  • pure tests for rememberRides, insideMainParkHours and insideSeasonHours.

With the carry-forward disabled, 4 of the new tests fail (the overnight, three-park, per-park-hours and calendar-fallback cases). Full suite: 4116 passed, 1 skipped. Typecheck clean.

Around midnight local time the waiting-times feed stops listing rides for
the main park, Rulantica and Traumatica, keeping only restaurants and the
virtual-queue entries. The rides reappear one by one before opening, so
from midnight to early morning about a third of the destination's live
entities vanished from live data instead of reading CLOSED.

Rides the feed listed in the last 7 days are now remembered. While a
ride's own park is outside its published hours (main park: live
calendar, falling back to seasons; other parks: seasons, from yesterday
so a post-midnight close counts), a remembered ride the feed no longer
lists is reported CLOSED. Rides the feed does list are never touched,
an absent ride inside published hours is still left out, and nothing is
carried when a park's hours cannot be read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cubehouse
cubehouse merged commit 31d4fd0 into main Oct 30, 2026
4 checks passed
@cubehouse
cubehouse deleted the fix/europapark-overnight-ride-drop branch October 30, 2026 07:02
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