stablyai/orca · error · Error
--candidate requires a path
Error message
--candidate requires a path
What it means
Thrown by readRequiredValue when --candidate is followed by a null or flag-like token. Identical guard shape to the baseline case: the flag does ++index then readRequiredValue rejects a missing/flag value at compare-benchmark-artifacts.mjs: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
- Supply a real, non-flag path token immediately after --candidate.
- Guard the shell variable: --candidate "${CANDIDATE_PATH:?missing}".
- Confirm the candidate artifact file exists at that path before invoking.
Example fix
// before parseBenchmarkComparisonArgs(['--baseline', 'b.json', '--candidate', '--output', 'r.md']) // after parseBenchmarkComparisonArgs(['--baseline', 'b.json', '--candidate', 'c.json', '--output', 'r.md'])
Defensive patterns
Strategy: validation
Validate before calling
const i = argv.indexOf('--candidate')
if (i !== -1 && (i + 1 >= argv.length || argv[i + 1].startsWith('--'))) {
throw new Error('--candidate needs a path')
} Prevention
- Confirm the candidate artifact file exists and is readable before invoking.
- Use shell parameter guards for path variables.
When it happens
Trigger: Passing '--candidate' last; passing '--candidate --output report.md'; a shell expansion producing an empty candidate path.
Common situations: CI matrix where the candidate artifact path is computed but the job produces none; misordered flags; unquoted path with a leading dash.
Related errors
- --baseline requires a path
- --title requires a value
- --output requires a path
- --json-output requires a path
- ${arg} requires a path
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/8f766d1e30df9108.
Report an issue: GitHub.