stablyai/orca · error · Error

--title requires a value

Error message

--title requires a value

What it means

Thrown by readRequiredValue when --title is followed by a null or flag-like token. --title is optional but, when present, must take a value; the same ++index/readRequiredValue guard applies (compare-benchmark-artifacts.mjs:28-30, 64-69).

Source

Thrown at config/scripts/compare-benchmark-artifacts.mjs:67

      }
      continue
    }
    throw new Error(USAGE)
  }

  if (!parsed.baselinePath) {
    throw new Error(USAGE)
  }
  if (!parsed.candidatePath) {
    throw new Error(USAGE)
  }
  return parsed
}

function readRequiredValue(args, index, message) {
  const value = args[index]
  if (value == null || value.startsWith('--')) {
    throw new Error(message)
  }
  return value
}

export function readBenchmarkArtifact(path) {
  return JSON.parse(readFileSync(path, 'utf8'))
}

export function normalizeBenchmarkArtifact(path, artifact = readBenchmarkArtifact(path)) {
  if (artifact?.summaryMedianMs != null) {
    return normalizeNumericObject(path, artifact, 'startup', artifact.summaryMedianMs, () => 'ms')
  }
  if (artifact?.summaryMedian != null) {
    return normalizeNumericObject(path, artifact, 'daemon', artifact.summaryMedian, (key) =>
      key.endsWith('Count') || key.endsWith('After') ? 'count' : 'ms'
    )
  }
  if (artifact?.suites != null) {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Provide a non-flag value token after --title, or remove the --title flag entirely to use the default 'Benchmark comparison'.
  2. If the title comes from a variable, ensure it is set and non-empty before building argv.

Example fix

// before
parseBenchmarkComparisonArgs(['--baseline', 'b.json', '--candidate', 'c.json', '--title'])
// after
parseBenchmarkComparisonArgs(['--baseline', 'b.json', '--candidate', 'c.json', '--title', 'PR #123'])
Defensive patterns

Strategy: validation

Validate before calling

const i = argv.indexOf('--title')
if (i !== -1 && (i + 1 >= argv.length || argv[i + 1].startsWith('--'))) {
  // either supply a value or drop the flag
  argv.splice(i, 1)
}

Prevention

When it happens

Trigger: Passing '--title' as the final token; passing '--title --output report.md' (value omitted); passing '--title --higher-is-better key'.

Common situations: A wrapper script that conditionally adds --title but drops the value; accidental truncation of a long command line; copy-paste that loses the title argument.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/1b47165caf8016e8. Report an issue: GitHub.