{"record":{"id":"e75dc6b59b2ba893","repo":"paperclipai/paperclip","slug":"job-created-without-a-uid","errorCode":null,"errorMessage":"Job created without a UID","messagePattern":"Job created without a UID","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/kubernetes/src/job-orchestrator.ts","lineNumber":18,"sourceCode":"import type { KubeClients } from \"./kube-client.js\";\nimport type { SandboxOrchestrator, SandboxStatus } from \"./sandbox-orchestrator.js\";\n\nexport class JobTimeoutError extends Error {\n  constructor(namespace: string, name: string, timeoutMs: number) {\n    super(`Job ${namespace}/${name} did not complete within ${timeoutMs}ms`);\n    this.name = \"JobTimeoutError\";\n  }\n}\n\nexport async function createJob(\n  clients: KubeClients,\n  namespace: string,\n  manifest: Record<string, unknown>,\n): Promise<{ uid: string }> {\n  const result = await clients.batch.createNamespacedJob({ namespace, body: manifest as never });\n  const uid = (result as { metadata?: { uid?: string } }).metadata?.uid;\n  if (!uid) throw new Error(\"Job created without a UID\");\n  return { uid };\n}\n\nexport type JobStatus = SandboxStatus;\n\nexport async function getJobStatus(\n  clients: KubeClients,\n  namespace: string,\n  name: string,\n): Promise<JobStatus> {\n  const result = await clients.batch.readNamespacedJobStatus({ namespace, name });\n  const body = (result as Record<string, unknown>) ?? {};\n  const status = (body.status as Record<string, unknown>) ?? {};\n  const active = (status.active as number) ?? 0;\n  const succeeded = (status.succeeded as number) ?? 0;\n  const failed = (status.failed as number) ?? 0;\n  const conditions = (status.conditions as { type: string; status: string; reason?: string; message?: string }[]) ?? [];\n  const completed = conditions.find((c) => c.type === \"Complete\" && c.status === \"True\");","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/plugins/sandbox-providers/kubernetes/src/job-orchestrator.ts#L1-L36","documentation":"Error \"Job created without a UID\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/kubernetes/src/job-orchestrator.ts:18 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry job creation; if persistent, check the Kubernetes API server/admission webhooks."],"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"}