{"record":{"id":"4395ce67773edff7","repo":"stablyai/orca","slug":"unknown-orca-freeze-scenario-scenario-expected","errorCode":null,"errorMessage":"Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: ${REALISTIC_SCENARIOS.join(', ')}","messagePattern":"Unknown ORCA_FREEZE_SCENARIO=(.+?)\\. Expected one of: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/live-remote-realistic-freeze-repro.mjs","lineNumber":138,"sourceCode":"  }\n}\n\nfunction listLiveTerminalHandles() {\n  const listed = orcaJsonSync(['terminal', 'list'])\n  const terms = listed.result?.terminals || []\n  return terms\n    .filter((t) => typeof t.handle === 'string' && t.handle.startsWith('term_'))\n    .map((t) => ({\n      handle: t.handle,\n      title: t.title,\n      worktreeId: t.worktreeId,\n      connected: t.connected\n    }))\n}\n\nasync function main() {\n  if (!REALISTIC_SCENARIOS.includes(scenario)) {\n    throw new Error(\n      `Unknown ORCA_FREEZE_SCENARIO=${scenario}. Expected one of: ${REALISTIC_SCENARIOS.join(', ')}`\n    )\n  }\n\n  mkdirSync(reportDir, { recursive: true })\n  const notes = []\n  const phases = []\n  const openTimings = new BoundedLiveFreezeHistory(100)\n\n  console.log(\n    `[realistic-freeze] scenario=${scenario} env=${envName} create=${createCount} idleMs=${idleMs} openCount=${openCount} paceMs=${paceMs}`\n  )\n\n  const local = orcaJsonSync(['status'], { local: true })\n  const remote = orcaJsonSync(['status'])\n  notes.push(\n    `local version=${local.result?.runtime?.appVersion} pid=${local.result?.app?.pid}`,\n    `remote version=${remote.result?.runtime?.appVersion} state=${remote.result?.runtime?.state}`","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/live-remote-realistic-freeze-repro.mjs#L120-L156","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"# before\nexport ORCA_FREEZE_SCENARIO=\"bulk-open \"\n\n# after\nexport ORCA_FREEZE_SCENARIO=bulk-open","handlingStrategy":"validation","validationCode":"if (!REALISTIC_SCENARIOS.includes(scenario?.trim())) {\n  throw new Error(`ORCA_FREEZE_SCENARIO=${scenario} invalid; valid: ${REALISTIC_SCENARIOS.join(', ')}`)\n}","typeGuard":"const isValidScenario = (s) => typeof s === 'string' && REALISTIC_SCENARIOS.includes(s.trim())","tryCatchPattern":null,"preventionTips":["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."],"tags":["env","configuration","scenario","validation"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}