{"record":{"id":"ba64d34591992454","repo":"heygen-com/hyperframes","slug":"keyword-expects-two-numbers","errorCode":null,"errorMessage":"${keyword} expects two numbers","messagePattern":"(.+?) expects two numbers","errorType":"validation","errorClass":"CubeLutParseError","httpStatus":null,"severity":"error","filePath":"packages/core/src/colorLuts.ts","lineNumber":127,"sourceCode":"    const parts = line.split(/\\s+/);\n    const keyword = (parts[0] ?? \"\").toUpperCase();\n    const rest = parts.slice(1);\n\n    if (keyword === \"TITLE\") {\n      title = parseTitle(line);\n      continue;\n    }\n    if (keyword === \"DOMAIN_MIN\") {\n      domainMin = parseVec3(rest, keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"DOMAIN_MAX\") {\n      domainMax = parseVec3(rest, keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"LUT_3D_INPUT_RANGE\") {\n      if (rest.length !== 2) {\n        throw new CubeLutParseError(`${keyword} expects two numbers`, lineNumber);\n      }\n      const min = parseFiniteNumber(rest[0]!, lineNumber);\n      const max = parseFiniteNumber(rest[1]!, lineNumber);\n      if (max <= min) {\n        throw new CubeLutParseError(\"LUT_3D_INPUT_RANGE max must exceed min\", lineNumber);\n      }\n      domainMin = [min, min, min];\n      domainMax = [max, max, max];\n      continue;\n    }\n    if (keyword === \"LUT_1D_SIZE\") {\n      lut1dSize = parseSize(rest[0], keyword, lineNumber);\n      continue;\n    }\n    if (keyword === \"LUT_3D_SIZE\") {\n      lut3dSize = parseSize(rest[0], keyword, lineNumber);\n      if (lut3dSize > maxSize) {\n        throw new CubeLutParseError(`LUT_3D_SIZE ${lut3dSize} exceeds max ${maxSize}`, lineNumber);","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/core/src/colorLuts.ts#L109-L145","documentation":"LUT_3D_INPUT_RANGE is a shorthand that sets a uniform cubic domain from two scalars (min and max). The throw at line 127 requires exactly two tokens after the keyword, distinguishing it from the three-token DOMAIN_MIN/DOMAIN_MAX form.","triggerScenarios":"A line 'LUT_3D_INPUT_RANGE 0 1' is valid; 'LUT_3D_INPUT_RANGE 0' (one), 'LUT_3D_INPUT_RANGE 0 0.5 1' (three), or 'LUT_3D_INPUT_RANGE' (none) trips the check.","commonSituations":"Author confused the 2-scalar range form with the 3-vector DOMAIN_MIN/MAX form; an extra column from a spreadsheet export; a templating bug emitting three values.","solutions":["Provide exactly two numbers: min then max, e.g. 'LUT_3D_INPUT_RANGE 0 1'.","If you need per-channel domains, use DOMAIN_MIN and DOMAIN_MAX instead of LUT_3D_INPUT_RANGE.","Re-export from the source tool."],"exampleFix":"// before\nLUT_3D_INPUT_RANGE 0 0.5 1\n\n// after\nLUT_3D_INPUT_RANGE 0 1","handlingStrategy":"try-catch","validationCode":"function assertInputRangeArity(line: string): void {\n  const parts = line.trim().split(/\\s+/);\n  if ((parts[0] ?? '').toUpperCase() === 'LUT_3D_INPUT_RANGE' && parts.length !== 3) {\n    throw new Error(`LUT_3D_INPUT_RANGE needs exactly 2 numbers, got ${parts.length - 1}`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  parseCubeLut(fileText);\n} catch (err) {\n  if (err instanceof CubeLutParseError && /expects two numbers/.test(err.message)) {\n    // report the line; offer to convert to DOMAIN_MIN/MAX\n  } else throw err;\n}","preventionTips":["Use exactly two numbers after LUT_3D_INPUT_RANGE.","Prefer DOMAIN_MIN/DOMAIN_MAX for per-channel domains.","Re-export rather than hand-editing the range line."],"tags":["lut","cube","parsing","input-range"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}