feat(enchantedparks): live per-attraction status (Open/Down/Closed) - #270
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
Open/OPEN,Temporarily Closed/TEMPORARILY_CLOSED,Closed). Mapped viacreateStatusMaptoOPERATING/DOWN/CLOSED. The temporary-closure state is preserved asDOWN, distinct from an all-dayCLOSED.WOF - RipCord) the scraped ride names don't.normalizeFeatureNamestrips 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(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
buildLiveDatawiring test. Full suite: 1536 passing.fetchFeatureswired intonpm run health(6/6 parks healthy, 0 failures). Verified live vianpm run dev:🤖 Generated with Claude Code