{"record":{"id":"91ebf2962fd37a8c","repo":"can1357/oh-my-pi","slug":"harbor-not-found-on-path-install-with-uv-tool-in","errorCode":null,"errorMessage":"harbor not found on PATH. Install with: uv tool install harbor","messagePattern":"harbor not found on PATH\\. Install with: uv tool install harbor","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/metaharness/src/runner.ts","lineNumber":1543,"sourceCode":"\t}\n}\n\n// ──────────────────────────────────────────────────────────────────────── main\n\ninterface BenchmarkRun {\n\texitCode: number;\n\tjobName: string;\n\tjobDir: string;\n\tbenchDir: string;\n\ttarball: string | null;\n\telapsedMs: number;\n\ttotals: Totals | null;\n\treportPath: string | null;\n}\n\nasync function runBenchmark(cfg: Config): Promise<BenchmarkRun> {\n\tif (!which(\"harbor\")) {\n\t\tthrow new Error(\"harbor not found on PATH. Install with: uv tool install harbor\");\n\t}\n\tif (cfg.agent === \"omp\" && cfg.envType === \"docker\" && !which(\"docker\")) {\n\t\tthrow new Error(\"docker not found on PATH (required to run task containers).\");\n\t}\n\tif (cfg.envType === \"apple-container\" && !which(\"container\")) {\n\t\tthrow new Error(\n\t\t\t\"Apple 'container' CLI not found. Install with: brew install container && container system start\",\n\t\t);\n\t}\n\n\tconst stamp = new Date().toISOString().replace(/[:.]/g, \"-\").slice(0, 19);\n\tconst modelSlug = (cfg.models[0] ?? \"model\").replace(/[^a-zA-Z0-9]+/g, \"-\");\n\tconst jobName = cfg.jobName ?? `${modelSlug}-${stamp}`;\n\tconst jobDir = path.join(cfg.jobsDir, jobName);\n\tconst benchDir = path.join(cfg.jobsDir, \"_bench\", jobName);\n\tfs.mkdirSync(benchDir, { recursive: true });\n\tif (!cfg.resume && !cfg.dryRun) {\n\t\t// Snapshot the resolved launch config so a later `--resume <job>` can","sourceCodeStart":1525,"sourceCodeEnd":1561,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/src/runner.ts#L1525-L1561","documentation":"runBenchmark() requires the `harbor` CLI to be available on PATH before starting any benchmark run. If `which('harbor')` finds nothing, it throws immediately with the exact install command. This is an upfront environment check so runs fail fast instead of mid-benchmark.","triggerScenarios":"Running the benchmark harness (`runBenchmark`) in an environment where harbor was never installed, was installed into a non-PATH location (e.g. inside a venv), or was installed with a different tool manager afterward.","commonSituations":"Fresh machine or CI container without harbor; harbor installed via pip into a venv that isn't activated so `uv tool install harbor`'s shim isn't on PATH; PATH differences between the shell and the process spawning the harness.","solutions":["Install harbor: `uv tool install harbor`","Verify with `which harbor` / `harbor --version` in the same shell that runs the harness","If already installed, ensure uv's tool bin dir (`uv tool update-shell` or ~/.local/bin) is on PATH","In CI, add a setup step that installs harbor before the benchmark job"],"exampleFix":"// before\n$ omp benchmark ...\nharbor not found on PATH. Install with: uv tool install harbor\n// after\n$ uv tool install harbor\n$ harbor --version","handlingStrategy":"validation","validationCode":"import { spawnSync } from \"node:child_process\";\nif (spawnSync(\"which\", [\"harbor\"]).status !== 0) {\n  throw new Error(\"Install harbor first: uv tool install harbor\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runBenchmark(cfg);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"harbor not found on PATH\")) {\n    console.error(\"Run: uv tool install harbor, then ensure uv's bin dir is on PATH.\");\n  } else throw err;\n}","preventionTips":["Install harbor via `uv tool install harbor` on every dev machine and CI image","Run `uv tool update-shell` so uv's tool bin dir is on PATH permanently","Pin harbor in CI setup steps before benchmark jobs","Verify with `which harbor` in the exact shell/profile that launches the harness"],"tags":["cli","environment","missing-binary"],"backgroundTag":"binary-not-on-path","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}