{"record":{"id":"5e92eef92c5f7f6b","repo":"stablyai/orca","slug":"unsupported-mode-mode","errorCode":null,"errorMessage":"Unsupported --mode=${mode}","messagePattern":"Unsupported --mode=(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-linux-wayland-gpu-sandbox.mjs","lineNumber":50,"sourceCode":"\nfunction hasBaseReproductionEvidence({ error, gpuCrashLines, phase, terminalExerciseStarted }) {\n  if (error instanceof MissingReproductionError) {\n    return false\n  }\n  return (\n    terminalExerciseStarted ||\n    gpuCrashLines.length > 0 ||\n    // Why: the unfixed Wayland GPU path can wedge before the terminal receives\n    // a PTY; reaching this boundary means the terminal pane itself is present.\n    phase === 'setup.wait-pty'\n  )\n}\n\nfunction parseArgs() {\n  const modeArg = process.argv.find((arg) => arg.startsWith('--mode='))\n  const mode = modeArg?.slice('--mode='.length) ?? 'verify-fix'\n  if (mode !== 'verify-fix' && mode !== 'expect-repro') {\n    throw new Error(`Unsupported --mode=${mode}`)\n  }\n  return { mode }\n}\n\nfunction run(command, args, options = {}) {\n  execFileSync(command, args, {\n    cwd: rootDir,\n    env: process.env,\n    stdio: 'inherit',\n    ...options\n  })\n}\n\nfunction assertWaylandHost() {\n  if (process.platform !== 'linux') {\n    throw new Error('Wayland GPU sandbox validation must run on Linux.')\n  }\n  if (","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-linux-wayland-gpu-sandbox.mjs#L32-L68","documentation":"The Wayland GPU sandbox script accepts exactly two modes: --mode=verify-fix (default; asserts the fix is applied) and --mode=expect-repro (asserts the unfixed path still crashes). Any other --mode value is rejected at parse time before any host or runtime checks run, because the downstream assertions are mode-specific and would be meaningless for an unknown mode.","triggerScenarios":"process.argv contains `--mode=<x>` where <x> is neither 'verify-fix' nor 'expect-repro' (line 49). A typo like --mode=verify, --mode=fix, --mode=repro, or --mode=expect-repro- will trigger it.","commonSituations":"Typing the mode flag by hand; copy-pasting an outdated mode name from docs; passing an abbreviated flag.","solutions":["Use exactly --mode=verify-fix (default) or --mode=expect-repro.","If you only want the happy path, omit --mode entirely (it defaults to verify-fix)."],"exampleFix":"# before\nnode config/scripts/verify-linux-wayland-gpu-sandbox.mjs --mode=fix\n# after\nnode config/scripts/verify-linux-wayland-gpu-sandbox.mjs --mode=verify-fix","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set(['verify-fix', 'expect-repro'])\nif (!ALLOWED.has(mode)) {\n  console.error(`--mode must be one of: ${[...ALLOWED].join(', ')}`)\n  process.exit(1)\n}","typeGuard":"function isWaylandMode(m: string): m is 'verify-fix' | 'expect-repro' {\n  return m === 'verify-fix' || m === 'expect-repro'\n}","tryCatchPattern":null,"preventionTips":["Omit --mode to get the default (verify-fix) rather than typing it.","Document the two accepted modes wherever the script is referenced."],"tags":["wayland","args","validation","gpu-sandbox"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}