{"record":{"id":"d73a566a430b8a49","repo":"stablyai/orca","slug":"the-computer-use-helper-owner-benchmark-is-macos-o","errorCode":null,"errorMessage":"The computer-use helper owner benchmark is macOS-only","messagePattern":"The computer-use helper owner benchmark is macOS-only","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/macos-computer-helper-owner-loss-benchmark.mjs","lineNumber":528,"sourceCode":"    })\n    cleanupError = cleanup.error\n    trialOutput = cleanup.output\n  }\n  if (!trialError && result?.status !== 0) {\n    trialError = new Error(\n      `Electron trial failed (${result.error?.message ?? result.signal ?? result.status}):\\n${trialOutput}`\n    )\n  }\n  if (!trialError && !serializedResult) {\n    trialError = new Error(`Electron trial did not write a result:\\n${trialOutput}`)\n  }\n  throwBenchmarkTrialFailures(trialError, cleanupError)\n  return parsedResult\n}\n\nfunction runBenchmark() {\n  if (process.platform !== 'darwin') {\n    throw new Error('The computer-use helper owner benchmark is macOS-only')\n  }\n  const options = parseArgs(process.argv.slice(2))\n  const dirty = execFileSync('git', ['status', '--porcelain'], {\n    cwd: repoRoot,\n    encoding: 'utf8'\n  }).trim()\n  if (dirty) {\n    throw new Error('Commit or stash changes before running the provenance-bound benchmark')\n  }\n  buildArtifacts()\n  if (!existsSync(sidecarPath) || !existsSync(helperPath)) {\n    throw new Error('Fresh production sidecar/helper build did not produce the expected artifacts')\n  }\n  const executable = electronPath()\n  const results = Array.from({ length: options.trials }, () => runTrial(executable, options.expect))\n  const rssBytes = results.map((result) => result.connectedRssBytes)\n  const cpuMilliseconds = results.map((result) => result.connectedCpuMilliseconds)\n  const activeRequestTotals = results.map((result) => result.activeRequests.totalMs)","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/macos-computer-helper-owner-loss-benchmark.mjs#L510-L546","documentation":"Platform guard at the top of runBenchmark(). The computer-use helper under test is a native macOS .app bundle (Orca Computer Use.app), and the benchmark uses macOS-specific process inspection (ps eww, signal semantics). Running on Linux or Windows has no helper binary to test.","triggerScenarios":"process.platform is not 'darwin' (e.g., 'linux' or 'win32') when runBenchmark() is called.","commonSituations":"Running the benchmark in Linux/Windows CI; developer accidentally invoking the script on a non-Mac machine; Docker container without macOS.","solutions":["Run the benchmark on macOS only","Gate the benchmark in CI with a platform condition (e.g., only run on macos-latest)","Add a wrapper that skips gracefully on non-darwin instead of throwing"],"exampleFix":"// before: unconditional invocation in CI matrix\n- run: node config/scripts/macos-computer-helper-owner-loss-benchmark.mjs\n\n// after: gate by platform\n- run: node config/scripts/macos-computer-helper-owner-loss-benchmark.mjs\n  if: runner.os == 'macOS'","handlingStrategy":"validation","validationCode":"// Check platform before invoking the benchmark\nif (process.platform !== 'darwin') {\n  console.warn('Skipping macOS-only benchmark on', process.platform)\n  process.exit(0)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate benchmark execution in CI with a platform condition (e.g., if: runner.os == 'macOS')","Wrap the invocation in a platform check that skips gracefully rather than throwing","Document the macOS requirement prominently"],"tags":["platform","macos"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}