{"record":{"id":"658ef84226fdf57b","repo":"paperclipai/paperclip","slug":"workspace-durable-seed-digest-mismatch","errorCode":"workspace_durable_seed_digest_mismatch","errorMessage":"workspace_durable_seed_digest_mismatch","messagePattern":"workspace_durable_seed_digest_mismatch","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/sandbox-managed-runtime.ts","lineNumber":774,"sourceCode":"    stream.on(\"error\", rejectDigest);\n    stream.on(\"end\", () => resolveDigest(digest.digest(\"hex\")));\n  });\n}\n\nasync function copyDurableSeedArchive(input: {\n  sourcePath: string;\n  targetPath: string;\n  expectedSha256?: string | null;\n}): Promise<void> {\n  const source = await fs.lstat(input.sourcePath);\n  if (source.isSymbolicLink() || !source.isFile()) {\n    throw new Error(\"workspace_durable_seed_invalid\");\n  }\n  if (\n    input.expectedSha256 &&\n    (await sha256File(input.sourcePath)) !== input.expectedSha256\n  ) {\n    throw new Error(\"workspace_durable_seed_digest_mismatch\");\n  }\n  await fs.copyFile(input.sourcePath, input.targetPath);\n}\n\nasync function persistDurableSeedArchive(input: {\n  sourcePath: string;\n  targetPath: string;\n}): Promise<void> {\n  const parent = path.dirname(input.targetPath);\n  await fs.mkdir(parent, { recursive: true, mode: 0o700 });\n  const parentStat = await fs.lstat(parent);\n  if (parentStat.isSymbolicLink() || !parentStat.isDirectory()) {\n    throw new Error(\"workspace_durable_seed_root_invalid\");\n  }\n  const temporary = path.join(\n    parent,\n    `.${path.basename(input.targetPath)}.${randomUUID()}.tmp`,\n  );","sourceCodeStart":756,"sourceCodeEnd":792,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/adapter-utils/src/sandbox-managed-runtime.ts#L756-L792","documentation":"Guard in copyDurableSeedArchive: the durable workspace seed archive at sourcePath exists but its SHA-256 digest does not match expectedSha256 from the runtime spec. It fires when the seed tarball was corrupted, truncated, or replaced between when its digest was recorded and when prepareSandboxManagedRuntime copies it.","triggerScenarios":"Thrown at packages/adapter-utils/src/sandbox-managed-runtime.ts:774 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rebuild or re-upload the durable workspace seed tarball so its bytes match the recorded digest","Update the spec's expected SHA-256 if the seed was intentionally regenerated","Verify disk and transport integrity (checksum after copy) to rule out bit rot or partial writes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}