Skip to content

fix(playback): harden cache identity, refresh preserve, and fallback#10

Draft
KitsuneKode wants to merge 9 commits into
mainfrom
cursor/playback-reliability-cache-and-fallback-ad11
Draft

fix(playback): harden cache identity, refresh preserve, and fallback#10
KitsuneKode wants to merge 9 commits into
mainfrom
cursor/playback-reliability-cache-and-fallback-ad11

Conversation

@KitsuneKode

@KitsuneKode KitsuneKode commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Problem

Playback felt flaky after recent resolve/cache/media-panel work for several root causes (not symptoms):

  1. Inventory cache identity mismatch — stream cache keys include quality; source-inventory cache did not. Inventory hits could return a stream selected for a different quality tier.
  2. Refresh resurrected dead URLspreserveCachedStreamOnFreshFailure could return a cached stream after fresh resolve failed without a forced health check.
  3. Abort commit policy unusedcancellationReason existed but PlaybackPhase never set it, so late valid resolves after navigation/fallback were discarded instead of persist-only cache warmth.
  4. Naive provider fallback — first compatible provider, ignoring health / title-health suggestions.
  5. Dishonest recovery copy — suggestion text hardcoded “VidKing” regardless of the failing provider.

Fix

  • Include qualityPreference in source-inventory cache preimage and wire through resolve/invalidation
  • Force health-check cached streams before preserve-on-fresh-failure; delete dead cache entries
  • Pass user-navigation / provider-fallback / user-shutdown cancellation reasons from PlaybackPhase
  • Health-aware fallback picker (skip down, prefer title-health suggestion)
  • Use actual failing provider name in suggestion copy

CI note

Rebased onto #8. Prior CI failures were the shared setup-bun-monorepo checkout bug.

Tests

Targeted unit tests for inventory identity, preserve-cache health, work cancellation, and fallback picker.

Out of scope

Shell overlay keep-alive, diagnostics trust, and provider UI honesty (separate PRs).

Open in Web Open in Cursor 

cursoragent and others added 3 commits July 9, 2026 20:23
…assets

GitHub resolves local composite actions from the workspace before any step
runs, so nesting checkout inside setup-bun-monorepo made every CI/release/
build-binaries job fail instantly since that action landed. Callers now
checkout first; the composite only sets up Bun/caches/install.

Also: native smoke matrix for host binaries, fail_on_unmatched_files +
asset-count assert on release upload, clearer empty-release installer
errors, and fix install.ps1 returning early after mpv so yt-dlp is offered.

Co-authored-by: Manash Pratim Bhuyan <bhuyanmanash2002@gmail.com>
v0.2.6.json has an empty sections array (changelog body has no ###
headings). The docs test required sections and failed once CI actually
ran again after the checkout fix.

Co-authored-by: Manash Pratim Bhuyan <bhuyanmanash2002@gmail.com>
@cursor
cursor Bot force-pushed the cursor/playback-reliability-cache-and-fallback-ad11 branch from dea2f8b to ef7d346 Compare July 9, 2026 20:52
These failures only surfaced once CI started executing the full suite again
(#8). Fix the durable diagnostics retention time bomb, make install.ps1
dry-run succeed without LOCALAPPDATA/network, stop mock.module leaking from
palette tests into history/overlay tests, and gate live Miruro network checks.
@cursor
cursor Bot force-pushed the cursor/playback-reliability-cache-and-fallback-ad11 branch from ef7d346 to 26a9e05 Compare July 9, 2026 21:08
Typecheck failed because openSetupWizardFromShell was mocked as Promise<void>
instead of Promise<SetupWizardResult>, which also broke Format (turbo depends
on typecheck for fmt:check).
…rship

Make the deprecated preferred-source unit test mock network instead of live
fetch, and harden Videasy so deprecated preferred ids never bias cycle order
or probe Sanji/1movies. Document that resolveEscTransition stays unused at
runtime because root-overlay-shell + resolveOverlayBackStack already own Esc.
Replace mock.module in watch-genre-stats with a restored spy so later
tmdb-proxy/title-detail/recommendation tests see the real module, and use
relative timestamps in stats-service so windowed averages stay valid.
@cursor
cursor Bot force-pushed the cursor/playback-reliability-cache-and-fallback-ad11 branch from 26a9e05 to 912486b Compare July 9, 2026 21:15
Include qualityPreference in source-inventory cache keys, force-health-check
cached streams before preserve-on-fresh-failure, pass live cancellationReason
from PlaybackPhase aborts, pick health-aware fallback providers, and use the
actual failing provider name in title-health suggestion copy.
@cursor
cursor Bot force-pushed the cursor/playback-reliability-cache-and-fallback-ad11 branch from 912486b to 72a0448 Compare July 9, 2026 21:19
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.

2 participants