NAT-376: Prevent Config Properties From Leaking Across View Boundaries#115
Open
eugene-mux wants to merge 1 commit intomasterfrom
Open
NAT-376: Prevent Config Properties From Leaking Across View Boundaries#115eugene-mux wants to merge 1 commit intomasterfrom
eugene-mux wants to merge 1 commit intomasterfrom
Conversation
55d8e07 to
28981e9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
348a91b to
a2e3579
Compare
Snapshot config properties at view start so mid-view config changes cannot contaminate the current view's events. Fixes video_source_url and other config fields from Video A appearing on Video B's events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a2e3579 to
f623cc5
Compare
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.
Summary
video_source_url(and other config fields) from Video A appearing on Video B's events when the app updates config before callingview="end"view="end"/view="start") andvideo_source_urlto the recycled player sample appRoot cause
_createEvent()appendsm._configPropertieslast, intentionally letting customers override any property. But when the app updates config with new video metadata before callingview="end", the config update is processed on the task thread before viewend — so events still in the old view get the new video's metadata.Fix
Snapshot
_configPropertiesinto_viewConfigSnapshotat view start._createEvent()uses the snapshot instead of the live config. Config changes between views update the snapshot immediately; during an active view the snapshot is frozen. Playback mode changes (ad breaks) are the exception — they update the snapshot mid-view since that's intentional.Test plan
playing vid=Mux3appeared in Mux1's view🤖 Generated with Claude Code
Note
Medium Risk
Touches core analytics event construction and view lifecycle handling; mistakes could misattribute events or drop request/heartbeat telemetry during playback transitions.
Overview
Prevents config/video metadata leaking across view boundaries by snapshotting
configatviewstartand using that frozen snapshot when building events, while still allowing intentional mid-view updates forplayer_playback_mode.Hardens view-transition behavior by (1) ignoring heartbeats when not in a view, and (2) adding hostname-based filtering for stale segment download events using the previous view’s source hostname.
Updates sample apps to better exercise the lifecycle: the recycled player now explicitly sends
view="end"/view="start"around content switches and setsvideo_source_url; the reset player adds a rapid-transition stress test menu item to repeatedly end/start views across alternating streams.Written by Cursor Bugbot for commit f623cc5. This will update automatically on new commits. Configure here.