Skip to content

feat(enchantedparks): live per-attraction status (Open/Down/Closed) - #270

Merged
cubehouse merged 2 commits into
mainfrom
feat/enchantedparks-live-status
Jul 29, 2026
Merged

feat(enchantedparks): live per-attraction status (Open/Down/Closed)#270
cubehouse merged 2 commits into
mainfrom
feat/enchantedparks-live-status

Conversation

@cubehouse

Copy link
Copy Markdown
Member

What

Fills in the previously-empty buildLiveData() stub for all six Enchanted Parks (Worlds of Fun, Valleyfair, Michigan's Adventure, Great Escape, Galveston Island Waterpark, Mid-America Parks). The operator's guest-experience platform publishes a per-attraction operational status; this joins that live status to the ride entities the connector already emits.

Until now the connector had:

protected async buildLiveData(): Promise<LiveData[]> {
  // No live wait-times source for Enchanted Parks until their app launches.
  return [];
}

The operator app has since launched, so we can surface live status. There are no published wait times for these parks — this is status-only.

How

  • Status mapping — the feed uses free-text statuses with inconsistent casing (Open/OPEN, Temporarily Closed/TEMPORARILY_CLOSED, Closed). Mapped via createStatusMap to OPERATING / DOWN / CLOSED. The temporary-closure state is preserved as DOWN, distinct from an all-day CLOSED.
  • Name join — feature names carry a park-code prefix (WOF - RipCord) the scraped ride names don't. normalizeFeatureName strips the uppercase prefix, then both sides normalize identically (apostrophe/trademark folding, lowercase, collapse). Only features from the destination's own site name(s) are used, so a same-named ride at a sibling park can't bleed across. Features with no matching ride entity (POS registers, gates, retail, points offers) are dropped.
  • Config — endpoint + key are @config (values in .env), never hardcoded. Per-park site-name mapping set in each subclass. Fetch paginates, caches 60s, and degrades to a no-op on error.

Tests + eval

  • Gate (pure, no network): status-map, name-normalization, feature→entity match, and a stubbed-network buildLiveData wiring test. Full suite: 1536 passing.
  • Eval: fetchFeatures wired into npm run health (6/6 parks healthy, 0 failures). Verified live via npm run dev:
    • Worlds of Fun — 54/55 attractions matched (49 OPERATING, 5 CLOSED)
    • Great Escape — 49/49 matched (38 DOWN, 7 OPERATING, 4 CLOSED)

🤖 Generated with Claude Code

cubehouse and others added 2 commits July 29, 2026 12:13
Fill in the previously-empty buildLiveData() stub for all six Enchanted
Parks. The operator's guest-experience platform publishes a per-attraction
operationalStatus; map it to OPERATING / DOWN / CLOSED and join it to the
scraped ride entities by normalized name.

- maps the feed's free-text status (Open/OPEN, Temporarily Closed/
  TEMPORARILY_CLOSED, Closed) to OPERATING / DOWN / CLOSED, preserving the
  temporary-closure state that is distinct from an all-day close
- name normalization strips the feed's park-code prefix ("WOF - ") so it
  joins to the scraped ride names; sibling-park names can't bleed across
- endpoint + key are @config (values in .env), never hardcoded
- per-park site-name mapping; fetch paginates, caches 60s, degrades to
  no-op on error so a transient miss just skips the tick

Tests: status-map, name-normalization, feature->entity match, and a
stubbed-network buildLiveData wiring test.
Eval: fetchFeatures wired into `npm run health`; verified live via
`npm run dev` (Worlds of Fun 54/55 attractions matched; Great Escape
49/49 incl. 38 DOWN).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…2min

- select sites by the feed's parentAssignmentId (== the site's UUID) rather
  than the display name, so renaming a park (e.g. "St Louis" →
  "Six Flags St. Louis") can't silently drop its live status
- bump the live feed cache 60s → 120s so a single fetch serves all six
  parks across a longer window

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cubehouse
cubehouse merged commit c607572 into main Jul 29, 2026
4 checks passed
@cubehouse
cubehouse deleted the feat/enchantedparks-live-status branch July 29, 2026 13:20
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