{"record":{"id":"c7a797eca2fb4793","repo":"can1357/oh-my-pi","slug":"no-build-but-no-tarball-found-pass-tarball-or","errorCode":null,"errorMessage":"--no-build but no tarball found; pass --tarball or drop --no-build","messagePattern":"--no-build but no tarball found; pass --tarball or drop --no-build","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/metaharness/src/runner.ts","lineNumber":1577,"sourceCode":"\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\n\t\t// rebuild the exact same invocation without re-specifying flags.\n\t\tfs.writeFileSync(path.join(benchDir, \"runner-config.json\"), JSON.stringify({ ...cfg, jobName }, null, \"\\t\"));\n\t}\n\n\tconst version = readPkgVersion();\n\n\t// tarball (local install only)\n\tlet tarball: string | null = cfg.tarball;\n\tif (cfg.agent === \"omp\" && cfg.install === \"local\" && !cfg.binaryArm64 && !cfg.binaryX64) {\n\t\tif (tarball) {\n\t\t\tprocess.stdout.write(dim(`using tarball ${tarball}\\n`));\n\t\t} else if (cfg.build) {\n\t\t\ttarball = buildTarball(path.join(cfg.jobsDir, \"_bench\"));\n\t\t} else {\n\t\t\ttarball = newestTarball(path.join(cfg.jobsDir, \"_bench\"));\n\t\t\tif (!tarball) throw new Error(\"--no-build but no tarball found; pass --tarball or drop --no-build\");\n\t\t}\n\t}\n\n\t// source mount (default): repo bind-mounted read-only + cached linux deps tree\n\tlet source: SourceMount | null = null;\n\tif (cfg.agent === \"omp\" && cfg.install === \"source\" && !cfg.binaryArm64 && !cfg.binaryX64) {\n\t\tsource = prepareSourceDeps(cfg);\n\t}\n\n\t// models.yml (gateway)\n\tlet modelsYaml = \"\";\n\tif (cfg.agent === \"omp\" && cfg.gateway) {\n\t\tmodelsYaml = writeModelsYaml(benchDir, cfg);\n\t\tif (!gatewayHealthOk(cfg.gatewayUrl)) {\n\t\t\tprocess.stderr.write(\n\t\t\t\tyellow(\n\t\t\t\t\t`warning: gateway ${cfg.gatewayUrl} health check failed (continuing). Is the pm2 'omp-auth-gateway' running?\\n`,\n\t\t\t\t),","sourceCodeStart":1559,"sourceCodeEnd":1595,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/src/runner.ts#L1559-L1595","documentation":"When package building is disabled (--no-build, i.e. cfg.build is false) and no explicit tarball was given, the runner falls back to the newest prebuilt tarball in the _bench jobs directory. If none exists, it cannot proceed and throws, telling the user to either pass --tarball or re-enable building.","triggerScenarios":"Invoking the runner with build disabled (cfg.build false via --no-build) without --tarball, when path.join(cfg.jobsDir, '_bench') contains no tarball artifacts (empty dir, wrong --jobs-dir, or first run with nothing previously built).","commonSituations":"Fresh checkout or clean CI workspace with no prior build artifacts; pointing --jobs-dir at the wrong directory; typo'd or missing --tarball path combined with --no-build.","solutions":["Pass an explicit package tarball: --tarball /path/to/package.tgz","Drop --no-build so the runner builds the tarball itself via buildTarball()","Run a build once to populate <jobsDir>/_bench with a tarball, then rerun with --no-build","Check you passed the correct --jobs-dir containing the _bench tarballs"],"exampleFix":"// before\n$ omp-metaharness --no-build\n// Error: --no-build but no tarball found\n\n// after\n$ omp-metaharness --no-build --tarball ./dist/oh-my-pi-1.0.0.tgz\n// or simply\n$ omp-metaharness","handlingStrategy":"validation","validationCode":"const tarball = opts.tarball ?? newestTarball(path.join(cfg.jobsDir, \"_bench\"));\nif (!cfg.build && !tarball) {\n  throw new Error(\"--no-build requires --tarball or an existing tarball in <jobsDir>/_bench\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runBenchmark(cfg);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"no tarball found\")) {\n    console.error(\"Build a tarball first or pass --tarball <path>.tgz\");\n    process.exitCode = 1;\n    return;\n  }\n  throw err;\n}","preventionTips":["Always pass --tarball explicitly in CI pipelines where builds are disabled","Verify <jobsDir>/_bench contains a .tgz before using --no-build","Cache build artifacts between CI runs so the newest-tarball fallback succeeds","Prefer letting the runner build (omit --no-build) unless artifacts are guaranteed"],"tags":["missing-artifact","cli-arguments","build-config"],"backgroundTag":"missing-build-artifact","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}