{"record":{"id":"cf9a809a78abe535","repo":"stablyai/orca","slug":"wayland-gpu-sandbox-validation-must-run-on-linux","errorCode":null,"errorMessage":"Wayland GPU sandbox validation must run on Linux.","messagePattern":"Wayland GPU sandbox validation must run on Linux\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/scripts/verify-linux-wayland-gpu-sandbox.mjs","lineNumber":66,"sourceCode":"  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 (\n    !process.env.WAYLAND_DISPLAY &&\n    process.env.XDG_SESSION_TYPE !== 'wayland' &&\n    process.env.ELECTRON_OZONE_PLATFORM_HINT !== 'wayland'\n  ) {\n    throw new Error('Wayland GPU sandbox validation requires a Wayland session.')\n  }\n}\n\nfunction ensureElectronRuntime() {\n  run(process.execPath, ['config/scripts/ensure-native-runtime.mjs', '--runtime=electron'])\n}\n\nfunction buildAppIfNeeded() {\n  if (process.env.SKIP_BUILD === '1' && existsSync(outMain)) {\n    console.log('[wayland-gpu] SKIP_BUILD=1 and out/main/index.js exists; skipping build.')\n    return","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-linux-wayland-gpu-sandbox.mjs#L48-L84","documentation":"assertWaylandHost refuses to run the Wayland GPU sandbox validation on any non-Linux platform. The whole script exists to validate Electron's GPU sandbox behavior under Linux Wayland (ozone), which is meaningless on macOS/Windows. It is the first guard, ahead of the Wayland-session and runtime checks.","triggerScenarios":"process.platform !== 'linux' at line 65. Reproduced by invoking the script on macOS or Windows.","commonSituations":"Running the script from a developer mac or a Windows machine; a CI matrix leg that runs the wayland validation on a non-Linux OS by mistake.","solutions":["Run the script on a Linux host (physical, VM, or container with a Wayland session).","Gate the CI job so this script only runs on Linux runners."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (process.platform !== 'linux') {\n  console.error('Wayland GPU sandbox validation is Linux-only; skipping on', process.platform)\n  process.exit(0) // or exit(1) if you want it hard-gated\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict the wayland validation CI job to Linux runners.","Document that the script is Linux-only in the runbook."],"tags":["wayland","platform","linux","validation"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}