Repository navigation
Conversation
The item page and both version menus posted to /api/v1/catalog/versions/check, which the upstream sync retired: every request answered 410, so every row stayed at its snapshot availability. Call checkCatalogVersions at POST /api/v2/catalog/versions/check. The v2 contract renders file ids as opaque strings, so the request sends strings and the response adapter restores the numeric ids the menus key on (dropping a value that names no row). Treat the call as the read it is, so a stalled check still hits the read deadline.
The version-swap notice treated any effective row id different from the requested one as a substitution. A sibling mirror of the same release has its own row, so every virtual play of such a release claimed the chosen version was not playable on the device while the same release played fine. Decide the notice from release identity rather than the row id: the plan's substituted_from_file_id is the server's substitution signal, and without it two rows are compared by release name, then declared size plus encode fingerprint. Same-release movement stays quiet, a provably different release still speaks, and an unidentifiable pair makes no claim instead of guessing.
Collaborator
Author
|
Superseded by #459, which contains this change plus the rest of the playback reliability bundle. Closing to keep the review surface to one PR. |
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
Two web-client defects from the QA matrix.
The item page and version menus still call
POST /api/v1/catalog/versions/check, a business route the upstream sync retired (#443). In a 30-minute run the item page issued 26 of those calls; all 26 returned410with the 448-byte problem body, and the client made zero calls to/api/v2/catalog/versions/check. Because the check never answers,available,failed, andsource_mismatchverdicts never reach the rows: version liveness and availability marking are dead in the UI.The version-swap notice keys on
requested_media_file_id !== effective_media_file_id. A sibling mirror of the same release is a different catalog row, so every virtual play of such a release showed "Playing a different version than selected — the requested version isn't playable on this device." while the same release played, tone-mapped, on the device.Related issue: N/A
Validation tasks: none
Approach
Liveness now calls
checkCatalogVersionsatPOST /api/v2/catalog/versions/check. The v2 contract renders file ids as opaque strings, so the request sends strings and the adapter restores the numeric ids the menus key on; a value that names no row is dropped instead of keyed underNaN. The operation is classified as a read, so a stalled check still hits the read deadline.The notice now compares release identity instead of only the row id. The plan's
substituted_from_file_idis the server's substitution signal when present. Without it, two rows are the same release when their release names match, or when their declared size and encode fingerprint match. Same-release movement stays quiet. A provably different release still shows the notice. When the rows cannot identify a release and the server sent no signal, the client makes no claim rather than guessing.The
From release listingprovenance label from #446 is not onmain: #446 was never merged, and #445, which did land, deliberately keeps declared placeholder rows in discovery until probe evidence arrives. Nothing was restored, because restoring #446's behavior would undo #445's fix for fabricated track rows.Validation
npx tsc -b: passed.MovieContent,useStampedVersions,ActionBar.inventory,WatchRoute,WatchPlaybackChrome.requestedVersion, and v2 request tests.react-refreshwarnings inWatchPage.tsxare pre-existing.make verify-local-paths: passed.main's production code: the liveness test records no v2 call; the item-page test never reaches/api/v2/catalog/versions/check; the sibling-mirror and unknown cases render the false notice.Evidence: none beyond the request paths and notice behavior described here.
Risks
Low. Liveness remains one batched POST per chunk of 40. The notice can stay quiet in cases the client cannot prove a substitution; that is intentional, and a server-published
substituted_from_file_idstill produces it.Checklist
AI Disclosure
Posted by an AI agent (Muse Spark, OpenCode harness).