Skip to content

chore: add repro fixture and characterization test for missing-LANGUAGE subtitle bug - #413

Merged
birme merged 1 commit into
masterfrom
issue-384/repro-missing-language-subtitle
Sep 8, 2026
Merged

chore: add repro fixture and characterization test for missing-LANGUAGE subtitle bug#413
birme merged 1 commit into
masterfrom
issue-384/repro-missing-language-subtitle

Conversation

@birme

@birme birme commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixtures (spec/testvectors/hls_subs_no_language/)

  • master.m3u8#EXT-X-MEDIA:TYPE=SUBTITLES with NAME="French" and no LANGUAGE.
  • video.m3u8, french.m3u8 — minimal video + real-cue subtitle media playlists.
  • config.subtitleTracks.json — the exact config.subtitleTracks used (matching-name and mismatched-name variants) with useVTTSubtitles: 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-vodtolive matching seam (the one session.ts feeds via expectedSubtitleTracks): (1) fixture master truly has NAME but no LANGUAGE; (2) real cues served today when configured name matches the manifest NAME; (3) only dummy segments when name mismatches and there is no LANGUAGE. All assert current behavior, so they pass today; comments flag that #385 will flip case (3).

⚠️ Critical finding (narrows #385 scope)

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 expected language/name). So a NAME-only manifest with a matching config.subtitleTracks[].name already serves real cues. The residual bug only occurs when the manifest has no LANGUAGE and the configured name ≠ 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

  • PROOF: npm ci && npm run build && npm test (jasmine) → 131 specs, 0 failures, 7 pending specs

Closes #384

🤖 Automated via Channel Engine Dev daily-backlog-pr skill

…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 birme left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test131 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; jasmine random:true but the specs are self-contained)

Checklist

  1. Deterministic passing tests — yes; new spec matches jasmine glob **/*[sS]pec.ts, green on rerun. ✔
  2. No trademarks / no commercial names — secret+trademark scan of the diff: NONE. ✔
  3. Fixture/spec conventions — fixtures under spec/testvectors/hls_subs_no_language/; spec uses require("@eyevinn/hls-vodtolive") + fs.createReadStream fixtures, mirroring spec/engine/subtitle_spec.ts. ✔
  4. Security — read-only test fixtures, no input reaching a live URL/path. ✔
  5. Commit — chore: add repro fixture and characterization test for missing-LANGUAGE subtitle bug (closes #384). ✔

Focus items — all confirmed

  • Fixture valid. master.m3u8 L9 SUBTITLES #EXT-X-MEDIA has NAME="French" and NO LANGUAGE= — asserted by the spec's own guard it (toContain('NAME="French"') + not.toContain("LANGUAGE=")).
  • Real matching seam. Spec drives HLSVod directly with expectedSubtitleTracks / dummySubtitleEndpoint / subtitleSliceEndpoint, mirroring how engine/session.ts builds 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 mismatch it is 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 accepts element.language OR element.name. So name-match resolves via NAME today; mismatch fails (neither fr nor Francais == 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.

@birme
birme merged commit 5857232 into master Sep 8, 2026
2 checks passed
@birme
birme deleted the issue-384/repro-missing-language-subtitle branch September 8, 2026 07:52
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.

chore: reproduce missing-LANGUAGE subtitle bug with a minimal test vector and config

1 participant