stablyai/orca · error
Unsupported --mode=${mode}
Error message
Unsupported --mode=${mode} What it means
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.
Source
Thrown at config/scripts/verify-linux-wayland-gpu-sandbox.mjs:50
function hasBaseReproductionEvidence({ error, gpuCrashLines, phase, terminalExerciseStarted }) {
if (error instanceof MissingReproductionError) {
return false
}
return (
terminalExerciseStarted ||
gpuCrashLines.length > 0 ||
// Why: the unfixed Wayland GPU path can wedge before the terminal receives
// a PTY; reaching this boundary means the terminal pane itself is present.
phase === 'setup.wait-pty'
)
}
function parseArgs() {
const modeArg = process.argv.find((arg) => arg.startsWith('--mode='))
const mode = modeArg?.slice('--mode='.length) ?? 'verify-fix'
if (mode !== 'verify-fix' && mode !== 'expect-repro') {
throw new Error(`Unsupported --mode=${mode}`)
}
return { mode }
}
function run(command, args, options = {}) {
execFileSync(command, args, {
cwd: rootDir,
env: process.env,
stdio: 'inherit',
...options
})
}
function assertWaylandHost() {
if (process.platform !== 'linux') {
throw new Error('Wayland GPU sandbox validation must run on Linux.')
}
if (View on GitHub (pinned to 1136503c6a)
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).
Example fix
# before node config/scripts/verify-linux-wayland-gpu-sandbox.mjs --mode=fix # after node config/scripts/verify-linux-wayland-gpu-sandbox.mjs --mode=verify-fix
Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = new Set(['verify-fix', 'expect-repro'])
if (!ALLOWED.has(mode)) {
console.error(`--mode must be one of: ${[...ALLOWED].join(', ')}`)
process.exit(1)
} Type guard
function isWaylandMode(m: string): m is 'verify-fix' | 'expect-repro' {
return m === 'verify-fix' || m === 'expect-repro'
} Prevention
- Omit --mode to get the default (verify-fix) rather than typing it.
- Document the two accepted modes wherever the script is referenced.
When it happens
Trigger: 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.
Common situations: Typing the mode flag by hand; copy-pasting an outdated mode name from docs; passing an abbreviated flag.
Related errors
- Unknown argument: ${arg}
- Missing value for ${flag}
- Usage: node config/scripts/release-rc-history.mjs <base-vers
- Wayland GPU sandbox validation must run on Linux.
- Wayland GPU sandbox validation requires a Wayland session.
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/5e92eef92c5f7f6b.
Report an issue: GitHub.