chore: add repro fixture and characterization test for missing-LANGUAGE subtitle bug - #413
Merged
Merged
Conversation
…GE subtitle bug (closes #384) Adds a minimal HLS VOD master manifest whose SUBTITLES media tag has a NAME but no LANGUAGE attribute, the exact config.subtitleTracks used, captured evidence subtitle media playlists, and a jasmine characterization spec that documents current behavior at the @eyevinn/hls-vodtolive matching seam. Prerequisite repro for the fix in #385. 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 (repro/fixture deliverable for #384; the fix is #385)
Reviewed on the merits for a chore/characterization PR — the bar is committed fixtures + an honest, green repro, not the fix itself.
Proofs
- PROOF:
npm ci && npm run build→ BUILD_OK (tsc --project ./ && cp ./package.json dist/) - PROOF:
npm test→131 specs, 0 failures, 7 pending specs(EXIT=0) - PROOF:
npx jasmine --filter="Subtitles: source manifest SUBTITLES tag with NAME but no LANGUAGE"→3 specs, 0 failures, twice (deterministic; jasminerandom:truebut the specs are self-contained)
Checklist
- Deterministic passing tests — yes; new spec matches jasmine glob
**/*[sS]pec.ts, green on rerun. ✔ - No trademarks / no commercial names — secret+trademark scan of the diff: NONE. ✔
- Fixture/spec conventions — fixtures under
spec/testvectors/hls_subs_no_language/; spec usesrequire("@eyevinn/hls-vodtolive")+fs.createReadStreamfixtures, mirroringspec/engine/subtitle_spec.ts. ✔ - Security — read-only test fixtures, no input reaching a live URL/path. ✔
- Commit —
chore: add repro fixture and characterization test for missing-LANGUAGE subtitle bug (closes #384). ✔
Focus items — all confirmed
- Fixture valid.
master.m3u8L9 SUBTITLES#EXT-X-MEDIAhasNAME="French"and NOLANGUAGE=— asserted by the spec's own guardit(toContain('NAME="French"')+not.toContain("LANGUAGE=")). - Real matching seam. Spec drives
HLSVoddirectly withexpectedSubtitleTracks/dummySubtitleEndpoint/subtitleSliceEndpoint, mirroring howengine/session.tsbuilds hlsOpts. Not a mocked fantasy. - Characterization honest. (a) name-match (
{fr, French}) → real cues (/subtitlevtt.vtt, no dummy); (b) name-mismatch + no LANGUAGE ({fr, Francais}) → dummy segments (/dummysubs.vtt, no slice). Both assert TODAY's behavior; the mismatchitis flagged for #385 to flip. - CRITICAL dependency claim checks out.
node_modules/@eyevinn/hls-vodtolive@4.1.10/index.js(~L425-437):if (!item.get("language")) { itemLang = item.get("name"); }— NAME fallback IS already present, and matching acceptselement.languageORelement.name. So name-match resolves via NAME today; mismatch fails (neitherfrnorFrancais==French). The note that #385 is narrowed to the name-MISMATCH case is accurate and trustworthy.
Nice touch: committed evidence_*.m3u8 outputs + annotated config.subtitleTracks.json give #385 a ready-made oracle.
No blocking findings. Approving.
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
Fixtures (
spec/testvectors/hls_subs_no_language/)master.m3u8—#EXT-X-MEDIA:TYPE=SUBTITLESwithNAME="French"and noLANGUAGE.video.m3u8,french.m3u8— minimal video + real-cue subtitle media playlists.config.subtitleTracks.json— the exactconfig.subtitleTracksused (matching-name and mismatched-name variants) withuseVTTSubtitles: true.evidence_real_cues_name_match.m3u8/evidence_dummy_segments_name_mismatch.m3u8— captured subtitle media playlists (real slice segments vs dummy).Spec (
spec/engine/subtitle_missing_language_spec.ts)Three characterization tests driving the real
@eyevinn/hls-vodtolivematching seam (the onesession.tsfeeds viaexpectedSubtitleTracks): (1) fixture master truly has NAME but no LANGUAGE; (2) real cues served today when configurednamematches the manifest NAME; (3) only dummy segments whennamemismatches and there is no LANGUAGE. All assert current behavior, so they pass today; comments flag that #385 will flip case (3).The bug does not fully reproduce on the pinned
@eyevinn/hls-vodtolive@4.1.10— its matcher already falls back to NAME when LANGUAGE is absent (index.js ~L427-435, case-insensitive against expectedlanguage/name). So a NAME-only manifest with a matchingconfig.subtitleTracks[].namealready serves real cues. The residual bug only occurs when the manifest has no LANGUAGE and the configuredname≠ manifest NAME. #385 should therefore focus on making channel-engine/matching tolerant of that mismatch (and/or a dependency bump), not on adding a NAME fallback that already exists downstream.Test plan
npm ci && npm run build && npm test(jasmine) →131 specs, 0 failures, 7 pending specsCloses #384
🤖 Automated via Channel Engine Dev daily-backlog-pr skill