{"record":{"id":"b373e13b9b36d2be","repo":"stablyai/orca","slug":"this-repro-harness-is-intentionally-windows-only","errorCode":null,"errorMessage":"This repro harness is intentionally Windows-only.","messagePattern":"This repro harness is intentionally Windows-only\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/repro-windows-apphang-terminal-activation.mjs","lineNumber":118,"sourceCode":"  --output-lines=N               Lines emitted by each terminal stress command. Default: ${defaultOutputLines}.\n  --report=PATH                  Write full JSON evidence to PATH and print a compact summary to stdout.\n  --distro=NAME                  WSL distro to use. Default: first non docker-desktop distro.\n  --no-source-control            Do not open Source Control during the stress loop.\n  --no-dead-pty-reactivate       Do not kill PTYs and revisit workspaces after initial activation.\n  --keep                         Keep disposable WSL/userData fixtures after the run.`)\n}\n\nfunction parsePositiveInt(name, value) {\n  const parsed = Number.parseInt(value ?? '', 10)\n  if (!Number.isInteger(parsed) || parsed <= 0 || String(parsed) !== value) {\n    throw new Error(`${name} requires a positive integer.`)\n  }\n  return parsed\n}\n\nasync function main() {\n  if (process.platform !== 'win32') {\n    throw new Error('This repro harness is intentionally Windows-only.')\n  }\n  const args = parseArgs()\n  const distros = listWslDistros()\n  const distro = args.distro ?? distros[0]\n  if (!distro) {\n    throw new Error('No user WSL distro found. Install/enable WSL or pass --distro=NAME.')\n  }\n  console.log(\n    `[apphang-repro] issue=https://github.com/stablyai/orca/issues/6874 distro=${distro} gpuModes=${args.gpuModes.join(',')} cycles=${args.cycles}`\n  )\n  const fixture = createWslFixture(distro)\n  console.log(\n    `[apphang-repro] fixture repo=${fixture.repoUncPath} plain=${fixture.plainUncPath} base=${fixture.baseLinuxPath}`\n  )\n\n  const results = []\n  try {\n    for (const gpuMode of args.gpuModes) {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/repro-windows-apphang-terminal-activation.mjs#L100-L136","documentation":"Thrown by the apphang repro harness when process.platform is not 'win32'. This harness reproduces a Windows-specific app-hang issue (#6874) involving WSL terminal activation and GPU acceleration, so it is deliberately non-portable.","triggerScenarios":"Running the script on macOS or Linux. The check happens at the very start of main(), before any args or WSL detection.","commonSituations":"A developer on macOS or Linux tries to run the Windows repro harness, or a CI matrix does not gate this script by OS.","solutions":["Run the harness only on Windows (native or a Windows CI runner).","If you need to inspect the logic without executing, read the source or run --help on any platform (the platform check is after parseArgs, so --help will still exit 0 first)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (process.platform !== 'win32') {\n  throw new Error('This repro harness is intentionally Windows-only.')\n}","typeGuard":"function isWindows() {\n  return process.platform === 'win32'\n}","tryCatchPattern":null,"preventionTips":["Gate CI matrix entries by OS so this script only runs on Windows runners.","Document the platform requirement in the script's --help output."],"tags":["platform","windows","guard","apphang"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}