{"record":{"id":"e3e246ab9b082b6a","repo":"paperclipai/paperclip","slug":"job-namespace-name-did-not-complete-within","errorCode":null,"errorMessage":"Job ${namespace}/${name} did not complete within ${timeoutMs}ms","messagePattern":"Job (.+?)/(.+?) did not complete within (.+?)ms","errorType":"exception","errorClass":"JobTimeoutError","httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/kubernetes/src/job-orchestrator.ts","lineNumber":106,"sourceCode":"    name,\n    propagationPolicy: \"Foreground\",\n  });\n}\n\nexport async function waitForJobCompletion(\n  clients: KubeClients,\n  namespace: string,\n  name: string,\n  opts: { timeoutMs: number; pollMs?: number } = { timeoutMs: 120_000, pollMs: 2000 },\n): Promise<JobStatus> {\n  const deadline = Date.now() + opts.timeoutMs;\n  const pollMs = opts.pollMs ?? 2000;\n  while (Date.now() < deadline) {\n    const status = await getJobStatus(clients, namespace, name);\n    if (status.phase === \"Succeeded\" || status.phase === \"Failed\") return status;\n    await sleep(pollMs);\n  }\n  throw new JobTimeoutError(namespace, name, opts.timeoutMs);\n}\n\nfunction sleep(ms: number): Promise<void> {\n  return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Job-backed conformance to SandboxOrchestrator. Plugin.ts imports THIS value\n * (the swap point) — to use a different backend, swap this import for another\n * module exposing a SandboxOrchestrator-shaped default export.\n */\nexport const jobOrchestrator: SandboxOrchestrator = {\n  claim: createJob,\n  getStatus: getJobStatus,\n  findPod: findPodForJob,\n  streamLogs: streamPodLogs,\n  release: deleteJob,\n  waitForCompletion: waitForJobCompletion,","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/plugins/sandbox-providers/kubernetes/src/job-orchestrator.ts#L88-L124","documentation":"Error \"Job ${namespace}/${name} did not complete within ${timeoutMs}ms\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/kubernetes/src/job-orchestrator.ts:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the timeout or inspect the job/pod logs in the reported namespace for the hang cause."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}