{"record":{"id":"982b8870b657b58b","repo":"diegosouzapw/OmniRoute","slug":"video-focus-window-requires-a-positive-duration","errorCode":null,"errorMessage":"Video focus window requires a positive duration","messagePattern":"Video focus window requires a positive duration","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/guardrails/videoBridgeRuntime.ts","lineNumber":95,"sourceCode":"  blur?: number | null;\n  brightness?: number | null;\n  sceneScore?: number | null;\n  spatialInformation?: number | null;\n  temporalInformation?: number | null;\n  timestampSeconds: number;\n}\nexport interface VideoStructuralAnalysis {\n  freezeIntervals: VideoStructuralInterval[];\n  samples: VideoStructuralSample[];\n  sceneCandidates: number[];\n}\n\nexport function resolveVideoFocusWindow(\n  durationSeconds: number,\n  bounds: VideoFocusBounds\n): VideoFocusWindow | null {\n  if (!Number.isFinite(durationSeconds) || durationSeconds <= 0) {\n    throw new Error(\"Video focus window requires a positive duration\");\n  }\n  if (bounds.startSeconds === undefined && bounds.endSeconds === undefined) return null;\n  if (\n    (bounds.startSeconds !== undefined && !Number.isFinite(bounds.startSeconds)) ||\n    (bounds.endSeconds !== undefined && !Number.isFinite(bounds.endSeconds))\n  ) {\n    throw new Error(\"Video focus window bounds must be finite\");\n  }\n  const startSeconds = Math.max(0, Math.min(durationSeconds, bounds.startSeconds ?? 0));\n  const endSeconds = Math.max(0, Math.min(durationSeconds, bounds.endSeconds ?? durationSeconds));\n  if (endSeconds <= startSeconds) {\n    throw new Error(\"Video focus window must have a positive duration\");\n  }\n  return { endSeconds, startSeconds };\n}\n\nexport const VIDEO_FRAME_MAX_BYTES = 4 * 1024 * 1024;\nexport const VIDEO_FRAMES_TOTAL_MAX_BYTES = 23 * 1024 * 1024;","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/guardrails/videoBridgeRuntime.ts#L77-L113","documentation":"Error \"Video focus window requires a positive duration\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/guardrails/videoBridgeRuntime.ts:95 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"}