{"record":{"id":"7bef4b41693ae894","repo":"stablyai/orca","slug":"unsupported-gpu-value-use-on-off-auto-or","errorCode":null,"errorMessage":"Unsupported --gpu=${value}. Use on, off, auto, or a comma-list.","messagePattern":"Unsupported --gpu=(.+?)\\. Use on, off, auto, or a comma-list\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/repro-windows-apphang-terminal-activation.mjs","lineNumber":69,"sourceCode":"    }\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\n    }\n    if (name === '--report') {\n      args.reportPath = value?.trim() || null\n      if (!args.reportPath) {\n        throw new Error('--report requires a file path.')\n      }\n      continue\n    }\n    throw new Error(`Unknown argument: ${arg}`)\n  }\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/repro-windows-apphang-terminal-activation.mjs#L51-L87","documentation":"Thrown by the apphang repro harness when --gpu is given an invalid mode or is empty. The flag accepts a comma-separated list of 'on', 'off', 'auto' modes, each run as a separate terminal GPU acceleration scenario.","triggerScenarios":"Passing --gpu=high, --gpu=on,off,wrong, or --gpu= (empty after trimming). The parser splits on comma, trims, filters empties, and rejects if any token is not in ['on','off','auto'].","commonSituations":"A developer passes a GPU mode name that does not match Electron's allowed values, or forgets the value entirely.","solutions":["Use a single mode or comma-list from the set {on, off, auto}, e.g. --gpu=on,off.","Run with --help to confirm accepted modes."],"exampleFix":"// before\nnode config/scripts/repro-windows-apphang-terminal-activation.mjs --gpu=high\n// after\nnode config/scripts/repro-windows-apphang-terminal-activation.mjs --gpu=on,off,auto","handlingStrategy":"validation","validationCode":"const GPU_MODES = ['on', 'off', 'auto']\nconst modes = (value ?? '').split(',').map(s => s.trim()).filter(Boolean)\nif (modes.length === 0 || modes.some(m => !GPU_MODES.includes(m))) {\n  throw new Error(`Unsupported --gpu=${value}. Use ${GPU_MODES.join(', ')}, or a comma-list.`)\n}","typeGuard":"function isValidGpuList(value) {\n  const modes = String(value ?? '').split(',').map(s => s.trim()).filter(Boolean)\n  return modes.length > 0 && modes.every(m => ['on','off','auto'].includes(m))\n}","tryCatchPattern":null,"preventionTips":["Keep the allowed-modes list as a named constant shared between parsing and help text.","Trim and filter before validating so accidental trailing commas do not confuse."],"tags":["cli","validation","argument-parsing","windows","gpu"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}