Repository navigation
Conversation
Separate release identity from usability in the virtual probe gate. A served-vs-declared size gap no longer rejects a candidate: the probe's measured inventory is written metadata-only, planned and played, while the verdict stays Unverified and never stamps the row or pins the candidate. Duration or track-layout contradictions still reject as a different file, and every acceptance path now uses one classification entry point so the fresh-probe, cache, and persist seams agree.
This was referenced Nov 14, 2026
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
The virtual probe gate treated a served-vs-declared size gap as a hard failure. In this deployment the provider listing and the bytes the storage layer serves differ by a normal margin (one observed row: 4,269,999,999 bytes declared, 3,743,905,729 served). The probe rejected the candidate, refused to persist its inventory, and some starts ended in
virtual_source_unavailableortranscode_start_failed. The catalog row kept its declared placeholder, so the versions list and action bar could not show the real tracks.Rule
Size decides release identity, not usability.
Unverified. The probe's tracks and duration are written to the row metadata-only, the file is planned and played, and clients see the measured inventory. The evidence is not cached as authoritative, does not stampprobe_updated_at, and does not pin the candidate.Mismatch.Mismatch.Mismatch. The 2.0x plausibility ratio now only limits whether a repeated serve can establish identity.Every acceptance path calls one gate,
ClassifyVirtualServedEvidenceForProbe: fresh probe, cache hit, sibling fallback, substitution and persist. The persist seam no longer reclassifies size with a different pin key; it only re-enforces the duration contradiction. That removes the case where one path accepted bytes another refused.Production trace
For
file_id=1215236, the row declared 4,269,999,999 bytes and the probe served 3,743,905,729, about 12% short and inside the normal band. The old classifier required a positive duration proof to keep a size gap usable; when the probe reported no usable duration it returnedMismatch. That armed the wrong-source damper, unpinned the candidate, and rotated to siblings. When no sibling passed, the start failed asvirtual_source_unavailableortranscode_start_failed. The old persist gate also refused the inventory, so the row kept its placeholder. A test covers the same 6.33 GB / 5.57 GB and unknown-duration shape.Tests
internal/scanner/virtual_probe_guard_size_test.go: a size gap stays usable and unverified; a duration contradiction rejects; a track-layout contradiction rejects; the read-only and recording entry points agree.internal/api/handlers/playback_virtual_probe_size_mismatch_test.go: a size gap persists metadata-only inventory and resolves a playable source; the second serve stamps it; an implausible gap never admits; sibling fallback now triggers on an identity contradiction, not a size gap; permissive and strict paths agree.Verification
go build ./...go vet ./internal/api/handlers ./internal/scanner ./internal/playback ./internal/virtuallibrarygo test -count=1 ./internal/api/handlers ./internal/playback ./internal/virtuallibrary: handlers and virtuallibrary pass. Two playback failures also fail on a clean worktree atkipsilabs/main:TestOnDemandSubtitleSegmentsDoNotWaitForTheStream,TestServeExtractDiscardsACappedDemuxCopy.go test -raceon the new and changed scanner and handler tests.make verify-playback-fixtures: matrix unchanged.make lint-changed BASE_REF=kipsilabs/mainin the vips container: 0 issues.Posted by an AI agent (Muse Spark, OpenCode harness).