{"record":{"id":"a1155c409408cb56","repo":"stablyai/orca","slug":"unsupported-expect-value-use-none-repro-or","errorCode":null,"errorMessage":"Unsupported --expect=${value}. Use none, repro, or pass.","messagePattern":"Unsupported --expect=(.+?)\\. Use none, repro, or pass\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/repro-windows-apphang-terminal-activation.mjs","lineNumber":58,"sourceCode":"      args.sourceControl = false\n      continue\n    }\n    if (arg === '--no-dead-pty-reactivate') {\n      args.deadPtyReactivate = false\n      continue\n    }\n    const [name, value] = arg.split('=', 2)\n    if (name === '--cycles') {\n      args.cycles = parsePositiveInt(name, value)\n      continue\n    }\n    if (name === '--distro') {\n      args.distro = value?.trim() || null\n      continue\n    }\n    if (name === '--expect') {\n      if (!['none', 'repro', 'pass'].includes(value)) {\n        throw new Error(`Unsupported --expect=${value}. Use none, repro, or pass.`)\n      }\n      args.expect = value\n      continue\n    }\n    if (name === '--gpu') {\n      const modes = (value ?? '')\n        .split(',')\n        .map((entry) => entry.trim())\n        .filter(Boolean)\n      if (modes.length === 0 || modes.some((mode) => !['on', 'off', 'auto'].includes(mode))) {\n        throw new Error(`Unsupported --gpu=${value}. Use on, off, auto, or a comma-list.`)\n      }\n      args.gpuModes = modes\n      continue\n    }\n    if (name === '--output-lines') {\n      args.outputLines = parsePositiveInt(name, value)\n      continue","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/repro-windows-apphang-terminal-activation.mjs#L40-L76","documentation":"Thrown by the apphang repro harness CLI parser when --expect is given a value other than 'none', 'repro', or 'pass'. These modes control exit-code semantics: none prints measurements, repro exits 0 only when hang evidence is observed, pass exits 1 if hang evidence is found.","triggerScenarios":"Passing --expect=warn, --expect=true, or --expect= (empty). The parser splits on '=' and checks membership in the allowed list.","commonSituations":"A developer guesses a mode name, or copy-pastes a flag from a different harness.","solutions":["Use one of the three documented modes: --expect=none, --expect=repro, or --expect=pass.","Run with --help to see all valid options."],"exampleFix":"// before\nnode config/scripts/repro-windows-apphang-terminal-activation.mjs --expect=warn\n// after\nnode config/scripts/repro-windows-apphang-terminal-activation.mjs --expect=repro","handlingStrategy":"validation","validationCode":"const EXPECT_MODES = ['none', 'repro', 'pass']\nif (!EXPECT_MODES.includes(value)) {\n  throw new Error(`Unsupported --expect=${value}. Use ${EXPECT_MODES.join(', ')}.`)\n}","typeGuard":"function isExpectMode(value) {\n  return typeof value === 'string' && ['none', 'repro', 'pass'].includes(value)\n}","tryCatchPattern":null,"preventionTips":["Derive the error message from the allowed-values array so docs and code never drift.","Run --help first when exploring a new harness."],"tags":["cli","validation","argument-parsing","windows","apphang"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}