stablyai/orca · error · Error
Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: $
Error message
Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: ${REALISTIC_SCENARIOS.join(', ')} What it means
live-remote-realistic-freeze-repro drives one of several named freeze scenarios (REALISTIC_SCENARIOS) selected by the ORCA_FREEZE_SCENARIO env var. The guard at main() rejects any value not in the allow-list so an unrecognized scenario cannot silently fall through to default behavior. The valid set is printed in the message.
Source
Thrown at config/scripts/live-remote-realistic-freeze-repro.mjs:138
}
}
function listLiveTerminalHandles() {
const listed = orcaJsonSync(['terminal', 'list'])
const terms = listed.result?.terminals || []
return terms
.filter((t) => typeof t.handle === 'string' && t.handle.startsWith('term_'))
.map((t) => ({
handle: t.handle,
title: t.title,
worktreeId: t.worktreeId,
connected: t.connected
}))
}
async function main() {
if (!REALISTIC_SCENARIOS.includes(scenario)) {
throw new Error(
`Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: ${REALISTIC_SCENARIOS.join(', ')}`
)
}
mkdirSync(reportDir, { recursive: true })
const notes = []
const phases = []
const openTimings = new BoundedLiveFreezeHistory(100)
console.log(
`[realistic-freeze] scenario=${scenario} env=${envName} create=${createCount} idleMs=${idleMs} openCount=${openCount} paceMs=${paceMs}`
)
const local = orcaJsonSync(['status'], { local: true })
const remote = orcaJsonSync(['status'])
notes.push(
`local version=${local.result?.runtime?.appVersion} pid=${local.result?.app?.pid}`,
`remote version=${remote.result?.runtime?.appVersion} state=${remote.result?.runtime?.state}`View on GitHub (pinned to 1136503c6a)
Solutions
- Pick a value from the list printed in the message: ${REALISTIC_SCENARIOS.join(', ')}.
- If whitespace or quotes leaked in (e.g. from YAML), strip them when exporting ORCA_FREEZE_SCENARIO.
- If you intended a new scenario, add it to REALISTIC_SCENARIOS and implement its branch before referencing it.
Example fix
# before export ORCA_FREEZE_SCENARIO="bulk-open " # after export ORCA_FREEZE_SCENARIO=bulk-open
Defensive patterns
Strategy: validation
Validate before calling
if (!REALISTIC_SCENARIOS.includes(scenario?.trim())) {
throw new Error(`ORCA_FREEZE_SCENARIO=${scenario} invalid; valid: ${REALISTIC_SCENARIOS.join(', ')}`)
} Type guard
const isValidScenario = (s) => typeof s === 'string' && REALISTIC_SCENARIOS.includes(s.trim())
Prevention
- Trim env values before membership checks to survive YAML/quote whitespace.
- Document the allow-list in the script's --help so operators see valid values.
- Add a CI lint that matrix scenario names exist in REALISTIC_SCENARIOS.
When it happens
Trigger: Setting ORCA_FREEZE_SCENARIO to a typo, a renamed value, or a scenario that exists in a different orca version. The check is a strict REALISTIC_SCENARIOS.includes(scenario).
Common situations: Copy-pasting a scenario name from outdated docs, a renamed scenario across versions, trailing whitespace/quotes in the env value (the script does not trim), or a CI matrix referencing a scenario that was removed.
Related errors
- Invalid ${name}: expected a finite number, got ${JSON.string
- Unsupported boundary: ${boundary}
- Missing helper process record path
- ORCA_PTY_BENCH_PTY_COUNT must be positive, received ${PTY_CO
- ORCA_PTY_BENCH_PAYLOAD_CHARS must be positive, received ${PA
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/4395ce67773edff7.
Report an issue: GitHub.