stablyai/orca · error · Error
${name} must be a positive integer, received ${value}
Error message
${name} must be a positive integer, received ${value} What it means
Startup guard in the mobile agent-status projection benchmark. Same positive-integer pattern as 148/150 but for ORCA_AGENT_PROJECTION_BENCH_ITERATIONS and _WARMUP (defaults 400/60). Rejects NaN, zero, and negatives, naming the bad var.
Source
Thrown at config/scripts/mobile-agent-status-projection-benchmark.mjs:42
)
const bucketMatch = GRAPH_SOURCE.match(/AGENT_STATUS_SYNC_UPDATED_AT_BUCKET_MS = ([0-9_]+)/)
if (!bucketMatch) {
throw new Error(
'sync-runtime-graph.ts no longer defines the updatedAt bucket; re-sync this benchmark.'
)
}
const BUCKET_MS = Number(bucketMatch[1].replaceAll('_', ''))
const ITERATIONS = Number.parseInt(process.env.ORCA_AGENT_PROJECTION_BENCH_ITERATIONS ?? '400', 10)
const WARMUP = Number.parseInt(process.env.ORCA_AGENT_PROJECTION_BENCH_WARMUP ?? '60', 10)
for (const [name, value] of [
['ORCA_AGENT_PROJECTION_BENCH_ITERATIONS', ITERATIONS],
['ORCA_AGENT_PROJECTION_BENCH_WARMUP', WARMUP]
]) {
if (!Number.isInteger(value) || value <= 0) {
throw new Error(`${name} must be a positive integer, received ${value}`)
}
}
function toRow(paneKey, entry) {
return {
paneKey,
entryPaneKey: entry.paneKey,
state: entry.state,
prompt: entry.prompt,
updatedAtBucket: Math.floor(entry.updatedAt / BUCKET_MS),
stateStartedAt: entry.stateStartedAt,
agentType: entry.agentType ?? null,
terminalTitle: entry.terminalTitle ?? null,
stateHistory: entry.stateHistory.map((history) => ({
state: history.state,
prompt: history.prompt,
startedAt: history.startedAt,
interrupted: history.interrupted ?? nullView on GitHub (pinned to 1136503c6a)
Solutions
- Unset the offending var to fall back to 400 iterations / 60 warmup
- Set a positive integer: ORCA_AGENT_PROJECTION_BENCH_ITERATIONS=1000 node mobile-agent-status-projection-benchmark.mjs
- Check for whitespace/quoting: printf '%s' "$ORCA_AGENT_PROJECTION_BENCH_ITERATIONS" | od -c
- Validate in CI scripts before exporting
Example fix
# before export ORCA_AGENT_PROJECTION_BENCH_WARMUP=' ' # after unset ORCA_AGENT_PROJECTION_BENCH_WARMUP
Defensive patterns
Strategy: validation
Validate before calling
function positiveIntEnv(name, fallback) {
const raw = process.env[name]
if (raw === undefined) return fallback
if (!/^[1-9][0-9]*$/.test(raw)) {
throw new Error(`${name} must be a positive integer, received ${raw}`)
}
return Number.parseInt(raw, 10)
} Type guard
function isPositiveInt(v) {
return Number.isInteger(v) && v > 0
} Prevention
- Validate in CI before exporting with ^[1-9][0-9]*$
- Unset to fall back to 400/60 rather than passing empty values
- Inspect quoting with printf '%s' "$VAR" | od -c
When it happens
Trigger: Either ORCA_AGENT_PROJECTION_BENCH_ITERATIONS or _WARMUP set to non-numeric, empty, zero, or negative.
Common situations: CI exporting the var with shell quoting that yields empty; a matrix entry of 0 to 'skip warmup'; typo in the var name.
Related errors
- ${name} must be a positive integer, received ${value}
- ${name} must be a positive integer, received ${value}
- Missing helper process record path
- ${name} must be positive, received ${value}
- advertised-url-watcher.ts no longer contains \`${marker}\`
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/727d94e7f53d83df.
Report an issue: GitHub.