{"record":{"id":"ebfe651d82abf306","repo":"can1357/oh-my-pi","slug":"resume-supports-only-harbor-runs-jobname-is","errorCode":null,"errorMessage":"--resume supports only harbor runs (${jobName} is ${manager.benchmark})","messagePattern":"--resume supports only harbor runs \\((.+?) is (.+?)\\)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/metaharness/src/runner.ts","lineNumber":407,"sourceCode":" * whose reconstructed config differs from the recorded one.\n */\nexport function resolveResumeConfig(cli: Config): Config {\n\tconst spec = cli.resume as string;\n\tconst jobsDir = spec.includes(path.sep) ? path.dirname(path.resolve(spec)) : cli.jobsDir;\n\tconst jobName = path.basename(spec);\n\tconst jobDir = path.join(jobsDir, jobName);\n\tconst jobConfig = readJson(path.join(jobDir, \"config.json\")) as { environment?: { type?: string } } | null;\n\tif (!jobConfig) throw new Error(`--resume: ${jobDir} has no harbor config.json (not a harbor job dir)`);\n\n\tlet cfg: Config | null = null;\n\tconst saved = readJson(path.join(jobsDir, \"_bench\", jobName, \"runner-config.json\"));\n\tif (saved && typeof saved === \"object\") {\n\t\tcfg = { ...defaultConfig(), ...(saved as Partial<Config>) };\n\t} else {\n\t\tconst manager = readJson(path.join(jobDir, \"manager.json\")) as ManagerRecord | null;\n\t\tif (manager?.config) {\n\t\t\tif (manager.benchmark && manager.benchmark !== \"harbor\") {\n\t\t\t\tthrow new Error(`--resume supports only harbor runs (${jobName} is ${manager.benchmark})`);\n\t\t\t}\n\t\t\tconst dataset = manager.config.dataset ?? manager.dataset ?? \"terminal-bench@2.0\";\n\t\t\tcfg = parseArgs(harborRunnerArgs(manager.config, { jobsDir, jobName, dataset }));\n\t\t}\n\t}\n\tif (!cfg) {\n\t\tthrow new Error(\n\t\t\t`--resume: no recorded launch config for ${jobName} ` +\n\t\t\t\t`(missing both _bench/${jobName}/runner-config.json and ${jobName}/manager.json)`,\n\t\t);\n\t}\n\tcfg.jobsDir = jobsDir;\n\tcfg.jobName = jobName;\n\tcfg.resume = spec;\n\t// The recorded backend wins over any reconstruction-time preference\n\t// (e.g. apple-container auto-detection added after the original run).\n\tconst recorded = jobConfig.environment?.type;\n\tif ((recorded === \"docker\" || recorded === \"apple-container\") && cfg.envType !== recorded) {","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/src/runner.ts#L389-L425","documentation":"The resume path only supports harbor benchmark runs. When reconstructing config from <jobDir>/manager.json, if the recorded benchmark field exists and is anything other than \"harbor\", resolveResumeConfig throws, since harborRunnerArgs would build an incompatible config for the recorded run type.","triggerScenarios":"`runner --resume <name>` where the job was created by a different benchmark manager (e.g. a swe-bench or other benchmark recorded in manager.json), so manager.benchmark is set to a non-harbor value.","commonSituations":"Pointing --resume at a job dir produced by another tool that shares the jobs directory layout; an old job created before the benchmark field existed elsewhere; copy-pasting the wrong job name from a shared jobs dir.","solutions":["Confirm the job is a harbor run: check `benchmark` in <jobDir>/manager.json.","Use the correct runner/tool for that benchmark type instead of the harbor resume path.","Pick the right job name from `ls <jobsDir>` — you may be resuming a sibling job from a different benchmark.","Delete/archieve stale non-harbor job dirs from the shared jobs dir to avoid picking the wrong name."],"exampleFix":"// before\nrunner --resume swejob1   # manager.json says benchmark: \"swe-bench\"\n// after\nrunner --resume harborjob7   # a job whose manager.json benchmark is \"harbor\"","handlingStrategy":"validation","validationCode":"const manager = JSON.parse(fs.readFileSync(path.join(jobDir, \"manager.json\"), \"utf8\"));\nif (manager.benchmark && manager.benchmark !== \"harbor\") {\n  throw new Error(`job '${jobName}' is a '${manager.benchmark}' run; use that tool's resume path`);\n}","typeGuard":"function isHarborJob(m: { benchmark?: string } | null): boolean {\n  return !m?.benchmark || m.benchmark === \"harbor\";\n}","tryCatchPattern":"try {\n  await resumeJob(name);\n} catch (e) {\n  if (e instanceof Error && e.message.includes(\"supports only harbor runs\")) {\n    console.error(\"Pick a harbor job, or use the original benchmark's runner for this one.\");\n  } else throw e;\n}","preventionTips":["Keep different benchmarks in separate jobs directories to avoid name mixups.","Check manager.json's benchmark field before choosing a resume command.","Prefix job names with the benchmark type in shared dirs."],"tags":["resume","benchmark","validation"],"backgroundTag":"unsupported-benchmark-type","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}