diegosouzapw/OmniRoute · error

Invalid video transcript source or provenance

Error message

Invalid video transcript source or provenance

What it means

Provenance guard in normalizeVideoTranscript: a cue has empty text, a non-string source, or a source value outside the allowlist {audio-bridge, client, embedded}. Transcript provenance is security-relevant (it decides how cues are trusted downstream), so cues with unknown origin are refused rather than defaulted.

Solutions

  1. Normalize the source label to one of the three allowed values at ingestion
  2. Reject or quarantine transcripts produced by unknown tooling
  3. Require non-empty cue text before accepting a cue
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/guardrails/videoBridgeHelpers.ts:150 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/ac26d766e166bc70. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/guardrails/videoBridgeHelpers.ts:150

    const startSeconds =
      typeof record.startSeconds === "number"
        ? record.startSeconds
        : typeof record.start === "number"
          ? record.start
          : Number.NaN;
    const endSeconds =
      typeof record.endSeconds === "number"
        ? record.endSeconds
        : typeof record.end === "number"
          ? record.end
          : Number.NaN;
    const confidence = record.confidence === undefined ? 1 : record.confidence;
    if (
      !text ||
      typeof source !== "string" ||
      !VIDEO_TRANSCRIPT_SOURCES.has(source as VideoTranscriptSource)
    ) {
      throw new Error("Invalid video transcript source or provenance");
    }
    if (
      !Number.isFinite(startSeconds) ||
      !Number.isFinite(endSeconds) ||
      !Number.isFinite(confidence) ||
      confidence < 0 ||
      confidence > 1 ||
      startSeconds < 0 ||
      endSeconds > durationSeconds ||
      endSeconds <= startSeconds
    ) {
      throw new Error("Invalid video transcript timestamp or confidence range");
    }
    const normalizedCue = {
      confidence,
      endSeconds,
      source: source as VideoTranscriptSource,
      startSeconds,

View on GitHub (pinned to a179ffed5b)