fix(playback): refresh incomplete skip markers - #54
Merged
Conversation
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
Related issue: N/A — coordinated marker reliability fix
I was seeing intro prompts appear only sometimes and credit prompts not appear even when the markers were already stored. The server stopped checking online providers as soon as any online or manual segment existed, so an intro could prevent a missing credit marker from being filled. A fast provider result could also arrive before the player realtime socket connected, leaving that playback session with stale marker data.
I also needed a clean way to support IntroDB.app as a public read-only provider without showing submission controls or sending it contribution jobs.
Approach
The playback refresh now continues until both intro and credits are present. Once a player completes its realtime hello, the server sends the current persisted marker snapshot to that exact session. Per-file locking keeps the initial snapshot ordered with provider updates, so an older partial result cannot overwrite a newer complete one.
Marker writes still patch intro and credits independently. A credits-only result does not erase an existing intro, and online data cannot replace a higher-priority manual marker.
I also added supports_contribution=false for read-only marker plugins. Existing plugins remain submit-capable by default, while IntroDB.app keeps only the fetch path.
Benefits
Performance
Playback does not wait for provider lookups. The lazy refresh stays in the background, and enabled providers are queried concurrently rather than one after another.
Once markers are stored, later sessions use the database copy instead of calling providers again. The realtime hello adds one bounded media-row read, and provider-side caching, request collapsing, timeouts, and cooldowns keep failures from creating request storms. The normal stream and Aether playback path remain independent of provider response time.
Related changes
Validation
Passed locally:
The full repository gate was left to remote CI. A broader local package run hit sandbox loopback restrictions and existing host-specific GPU detection failures. The cmd/silo compile-only check also needs generated web/dist assets.
Risks
Each realtime hello adds one bounded media-file row read when the concrete marker notifier is configured. The new contribution flag defaults to true, so existing plugin behavior does not change unless a manifest opts out explicitly.
AI Disclosure
Checklist