{"record":{"id":"9aeb56ee059f0614","repo":"JuliusBrussee/caveman","slug":"cave-build-lock-missing-approve-required-evals-t","errorCode":null,"errorMessage":"cave_build_lock_missing: approve required evals, then run npm run build","messagePattern":"cave_build_lock_missing: approve required evals, then run npm run build","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/agent/src/cli.ts","lineNumber":939,"sourceCode":"\nfunction configuredModelCandidates(baseline: string): string[] {\n  const models = new Set<string>([baseline]);\n  if (process.env.ANTHROPIC_API_KEY) models.add(\"anthropic/claude-haiku-4-5\");\n  if (process.env.OPENAI_API_KEY) models.add(\"openai/gpt-5.4-mini\");\n  if (process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY) models.add(\"google/gemini-2.5-flash\");\n  return [...models].sort();\n}\n\nasync function check(args: string[]): Promise<void> {\n  const root = process.cwd();\n  const configPath = args[0] ?? \"caveman.config.ts\";\n  const loaded = await loadBuildInputs(root, configPath);\n  let lock: CaveBuildLock;\n  try {\n    lock = await readLock(root);\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === \"ENOENT\") {\n      throw new Error(\"cave_build_lock_missing: approve required evals, then run npm run build\");\n    }\n    throw error;\n  }\n  const transformRegistrySha256 = await transformRegistrySHA256();\n  const checked = checkLock(lock, {\n    sourceSha256: loaded.sourceSha256,\n    agentDefinitionSha256: agentDefinitionSHA256(loaded.agent),\n    contextIRSha256: contextIRSHA256(await lowerBuildContext(\n      root,\n      loaded.agent,\n    ).then((value) => value.ir)),\n    evalSuiteSha256: sha256(stableStringify(loaded.evals.filter((item) => item.approved && item.required))),\n    runtimeVersion: FRAMEWORK_VERSION,\n    adapterVersion: PI_ADAPTER_VERSION,\n    upstreamVersion: PI_UPSTREAM_VERSION,\n    transformRegistrySha256,\n    catalogSha256: CATALOG_SHA256,\n  });","sourceCodeStart":921,"sourceCodeEnd":957,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/packages/agent/src/cli.ts#L921-L957","documentation":"Precondition guard in check: no build lock exists (or it is stale) because required evals have not been approved and npm run build has not produced caveman.build.lock. Follow the remediation in the message: approve required evals, then run the build.","triggerScenarios":"Thrown at packages/agent/src/cli.ts:939 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Approve the required evals in the build flow, then run npm run build","Run caveman-agent doctor to see what blocks a passing build","Re-run caveman-agent check after the lock is generated"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}