{"record":{"id":"7ea659a580a537e2","repo":"stablyai/orca","slug":"commit-or-stash-changes-before-running-the-provena","errorCode":null,"errorMessage":"Commit or stash changes before running the provenance-bound benchmark","messagePattern":"Commit or stash changes before running the provenance-bound benchmark","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"config/scripts/macos-computer-helper-owner-loss-benchmark.mjs","lineNumber":536,"sourceCode":"  }\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)\n  const activeRequestRates = results.map((result) => result.activeRequests.requestsPerSecond)\n  const activeRequestMedians = results.map((result) => result.activeRequests.medianLatencyMs)\n  const activeRequestP95s = results.map((result) => result.activeRequests.p95LatencyMs)\n  const activeRequestMaxes = results.map((result) => result.activeRequests.maxLatencyMs)\n  const postLossRssBytes = results.map((result) => result.postLossRssBytes)\n  const report = {\n    benchmark: 'macos-computer-helper-authenticated-owner-loss',\n    revision: execFileSync('git', ['rev-parse', 'HEAD'], {","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/macos-computer-helper-owner-loss-benchmark.mjs#L518-L554","documentation":"The benchmark records SHA256 hashes of source files and build artifacts for provenance (report.sources, report.artifacts at lines 558-567) tied to the git revision. A dirty working tree means the recorded hashes will not match the committed revision, breaking reproducibility. The check runs `git status --porcelain` and throws if any output is produced.","triggerScenarios":"git status --porcelain returns non-empty output at line 531 — any untracked, modified, or staged file in the repo triggers it.","commonSituations":"Generated files from a previous build showing as modified; untracked temp files; developer running the benchmark with local edits; build artifacts checked into git that differ after rebuild.","solutions":["Commit or stash all changes: `git stash` or `git add -A && git commit`","Add generated/build artifacts to .gitignore if they appear as modifications","Run `git status --porcelain` yourself before invoking to identify dirty files"],"exampleFix":"# before: running benchmark with uncommitted changes\ngit status --porcelain  # shows modified files\n\n# after: clean working tree\ngit stash\n# or\ngit add -A && git commit -m 'wip'\nnode benchmark.mjs --expect reaped","handlingStrategy":"validation","validationCode":"// Check git cleanliness before running\nconst dirty = execFileSync('git', ['status', '--porcelain'], { encoding: 'utf8' }).trim()\nif (dirty) {\n  throw new Error(`Working tree is dirty:\\n${dirty}\\nCommit or stash before running the benchmark.`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Commit or stash all changes before running the benchmark","Add build artifacts and temp files to .gitignore so they don't show as dirty","Run git status --porcelain yourself first to catch unexpected modifications"],"tags":["git","provenance","benchmark"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}