Fix event-variant filter false-positive: require the share target to exist - #269
Merged
Merged
Conversation
…exist isEventVariantAlias dropped any is_event place whose social_sharing_link id differed from its own place_id. That wrongly flagged legit entities whose share link points at a non-existent id — UOR's Epic Universe meets (uor.ueu.show.meet_donkey_kong) link to a phantom uor.ueu.entertainment.meet_donkey_kong the feed never emits, so they were being dropped and marked for deletion on the live site. Now a place is a variant only when the share target is a DIFFERENT place that actually EXISTS in the feed (the canonical to defer to). The check takes the set of real place_ids; it moved from placeToEntity into buildEntityList, which has the full place list. Self-links and links to phantom ids are kept. Verified against the live feed: USH unchanged (Studio Tour language/last-tram variants still dropped, 41 entities resolve); UOR keeps Meet Donkey Kong / Meet Toad / The Cosmos Fountain (were wrongly deleted), still drops Hogwarts Express first/last train. Tests updated to exercise the existence check directly. 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.
Problem
The event-variant filter added in the prior USH fix (
isEventVariantAlias) dropped anyis_event=trueplace whosesocial_sharing_link?id=differed from its ownplace_id. That's too broad: it also drops legit entities whose share link points at an id that doesn't exist in the feed.Concrete case — UOR Epic Universe:
uor.ueu.show.meet_donkey_kong(and Meet Toad, The Cosmos Fountain) are real standalone shows, but their share link points at a phantomuor.ueu.entertainment.meet_donkey_kongthe feed never emits. They were being dropped → and since they're live on the site, the sync marked them for deletion.Fix
A place is a variant only when its share target is a different place that actually exists in the feed (a real canonical to defer to). The check now takes the set of real
place_ids and moved fromplaceToEntityintobuildEntityList(which has the full place list). Self-links and links to phantom ids are kept.Validation (live feed, both impacted parks — UOR + USH are the only classes using this code)
hogwarts_expresswhich exists). Remaining deletions are unrelated (Summer Music Seriesis_event=false; Thunder Falls Terrace gone from feed).