{"record":{"id":"9240bc03463e9422","repo":"diegosouzapw/OmniRoute","slug":"extracted-video-frame-byte-limit-exceeded","errorCode":null,"errorMessage":"Extracted video frame byte limit exceeded","messagePattern":"Extracted video frame byte limit exceeded","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeRuntime.ts","lineNumber":937,"sourceCode":"      { signal: options.signal, timeoutMs: options.timeoutMs ?? 120_000 }\n    );\n    frames.push({ path: outputPath, timestampSeconds });\n  }\n  return frames;\n}\n\nexport async function readBoundedExtractedFrames(\n  frames: readonly VideoFrameFile[],\n  options: { maxFrameBytes?: number; maxTotalBytes?: number } = {}\n): Promise<Buffer[]> {\n  const maxFrameBytes = options.maxFrameBytes ?? VIDEO_FRAME_MAX_BYTES;\n  const maxTotalBytes = options.maxTotalBytes ?? VIDEO_FRAMES_TOTAL_MAX_BYTES;\n  let totalBytes = 0;\n  const sizes: number[] = [];\n  for (const frame of frames) {\n    const metadata = await stat(frame.path);\n    if (!metadata.isFile() || metadata.size < 1 || metadata.size > maxFrameBytes) {\n      throw new Error(\"Extracted video frame byte limit exceeded\");\n    }\n    totalBytes += metadata.size;\n    if (totalBytes > maxTotalBytes) {\n      throw new Error(\"Extracted video total frame byte limit exceeded\");\n    }\n    sizes.push(metadata.size);\n  }\n\n  const output: Buffer[] = [];\n  for (let index = 0; index < frames.length; index++) {\n    const bytes = await readFile(frames[index].path);\n    if (bytes.byteLength !== sizes[index]) {\n      throw new Error(\"Extracted video frame changed before it could be read\");\n    }\n    output.push(bytes);\n  }\n  return output;\n}","sourceCodeStart":919,"sourceCodeEnd":955,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeRuntime.ts#L919-L955","documentation":"Error \"Extracted video frame byte limit exceeded\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeRuntime.ts:937 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}