Skip to content

fix(playback): refresh incomplete skip markers - #54

Merged
blurbery merged 2 commits into
mainfrom
fix/playback-marker-refresh
Aug 27, 2026
Merged

fix(playback): refresh incomplete skip markers#54
blurbery merged 2 commits into
mainfrom
fix/playback-marker-refresh

Conversation

@blurbery

@blurbery blurbery commented Aug 27, 2026

Copy link
Copy Markdown
Owner

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

  • Missing credits can be filled even when an intro already exists.
  • Players receive stored markers reliably after their realtime connection is ready.
  • One provider can supply intro while another supplies credits.
  • Stored results are shared by every user watching the same media file.
  • Read-only providers stay out of contribution settings and jobs.

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:

  • GOCACHE=/private/tmp/silo-marker-go-cache go test ./internal/api/handlers -run Test(MaybeQueueLazyPlaybackMarkers|HasCompletePlaybackSkipMarkers|SendCurrentMarkerSnapshot)
  • GOCACHE=/private/tmp/silo-marker-go-cache go test ./internal/playback -run TestMarkerUpdateNotifier
  • GOCACHE=/private/tmp/silo-marker-go-cache go test ./internal/scanner -run ^TestApplySegmentPatchSkipsSemanticNoop$ -count=1
  • GOCACHE=/private/tmp/silo-marker-go-cache go test ./internal/markers
  • git diff --check

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

  • Tool(s): OpenAI Codex
  • Model(s): GPT-5
  • Involvement: AI-assisted
  • Adversarial review: I reviewed the server, both marker providers, Apple, Android, and Aether paths together. I checked stale snapshot ordering, per-segment database merging, reconnect behavior, fetch-only capability handling, and provider failure costs.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

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