chore: add multicodec HEVC+AVC repro fixture and characterization test (closes #63) - #87
Merged
Merged
Conversation
closes #63) Adds a synthetic multicodec HLS master (colliding-bandwidth avc1 + hvc1 variants) plus per-variant media playlists as a test fixture, and a jest characterization test that documents the docker-fast#36 mismatch: the master manifest advertises both codecs at the same bandwidth while only one codec's segments are actually served there. The test asserts the current (buggy) behavior so it passes today; the fix (#65) will flip the assertions to require advertised CODECS to match the served-segment codec. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
birme
commented
Sep 8, 2026
birme
left a comment
Contributor
Author
There was a problem hiding this comment.
pr-reviewer verdict: APPROVE
Reviewed as a distinct (non-authoring) agent. This is a deliberate REPRODUCTION/characterization test for the multicodec (AVC+HEVC) bandwidth-collision bug (#63), asserting current buggy behavior so it PASSES and keeps CI green. That is acceptable for a repro ticket; the fix is scoped to #64/#65.
Deterministic proof
- PROOF:
npm run lint-> exit 0 (eslint, no errors) - PROOF:
npm run pretty-> "All matched files use Prettier code style!" (exit 0) - PROOF:
npm test-> "Test Suites: 2 passed, 2 total / Tests: 7 passed, 7 total" (exit 0); multicodec suite: 3/3 passed - PROOF:
npm run build->tsc --project ./exit 0
Repro is genuine (independently verified against @eyevinn/hls-vodtolive)
Ran HLSVod.load() directly against the fixture:
getBandwidths()->["2000000"](two colliding variants collapse to one key)getUsageProfiles()-> advertises BOTHavc1.4d401fandhvc1.1.6.L93.90at bw 2000000getMediaSegments()['2000000']-> serveshevc_720p_*.tsonly
Confirms the advertised-CODECS vs served-segment mismatch is real, not a rigged assertion. The test faithfully documents the engine's actual behavior.
Checklist
- Deterministic proof: PASS (all four commands green)
- No commercial product names/trademarks: PASS (only standard codec/ISO-BMFF terms avc1/hvc1/HEVC/AVC; placeholder hosts mock.example, vod.dummy)
- Matches docker-fast conventions: PASS (jest, tests layout, TS, path.join fixtures; eslint-disable is justified for the untyped JS require)
- Security: PASS (no credentials; all file paths built from static fixture names via path.join(__dirname), no external input reaching a path/URL)
- Commit message: PASS (
chore: add multicodec HEVC+AVC repro fixture and characterization test (closes #63), conventional style)
Findings
- File: src/plugins/tests/multicodec_master.test.ts:1-2,113,138 - Severity: suggestion - Finding: Comments reference the fix as "#65" (top-of-file) while the ticket list has both #64 (trace) and #65 (honor codec preference). Minor cross-ref imprecision, not blocking. - Recommendation: When #65 lands, flip the assertions (
toBeGreaterThan(0)->toBe(0)) as the comments already instruct. - File: src/plugins/tests/multicodec_master.test.ts:68-75 - Severity: suggestion - Finding: The
mediaManifestfetcher always returns hevc_720p.m3u8 for the colliding bw, which mirrors the engine's bandwidth-only keying and is the point of the repro. Clear as written. - Recommendation: none; keep as-is.
No critical/major/minor issues. APPROVE (posted as comment since the automation account cannot self-approve).
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.
Summary
Adds a reproducing fixture and characterization test for the multicodec (AVC + HEVC) master-manifest collision described in #63.
src/plugins/__tests__/fixtures/multicodec/with two variants advertised at the SAMEBANDWIDTH=2000000— oneCODECS="avc1.4d401f"and oneCODECS="hvc1.1.6.L93.90"— plus their media playlists.src/plugins/__tests__/multicodec_master.test.tscharacterization test asserting the CURRENT (buggy) behavior so CI stays green: both codecs are advertised at bw 2000000,getBandwidths()collapses colliding variants to a single['2000000'], and served segments are HEVC while the avc1 profile has no matching served segments.Root cause seam (for #64)
The engine builds the client master from
HLSVod.getUsageProfiles();@eyevinn/hls-vodtolivekeysthis.segments[bw]by bandwidth only, so two variants colliding on bandwidth share one segment set and onemaster<bw>.m3u8. A fix must key by (bandwidth, codec) or dedupe colliding bandwidths.PROOF
npm run lint→ cleannpm run pretty→ All matched files use Prettier code style!npm test→ Test Suites: 2 passed, 2 total / Tests: 7 passed, 7 totalnpm run build→ tsc EXIT=0Closes #63