{"record":{"id":"2cd354ec759f7baa","repo":"deepseek-ai/deepseek-harness","slug":"attachment-write-failed-2cd354","errorCode":"ATTACHMENT_WRITE_FAILED","errorMessage":"Unable to persist image attachment.","messagePattern":"Unable to persist image attachment\\.","errorType":"exception","errorClass":"AttachmentError","httpStatus":null,"severity":"error","filePath":"packages/attachment/attachment-local/src/store.ts","lineNumber":239,"sourceCode":"    // that writer reaches its own durability boundary.\n    await syncDirectory(bucket)\n    await syncDirectory(join(root, 'objects'))\n    await unlink(temporary)\n  } catch (error) {\n    /* v8 ignore next -- A descriptor can remain open only when the underlying write/sync/close operation fails. */\n    if (handle !== undefined) await handle.close().catch(\n      /* v8 ignore next -- Close failure is superseded by the storage operation that entered cleanup. */\n      () => {},\n    )\n    await unlink(temporary).catch(\n      /* v8 ignore next -- The callback requires a second independent staging-unlink failure. */\n      (cleanupError: unknown) => {\n        /* v8 ignore next -- Cleanup is best-effort only for a staging file already removed by a failed operation. */\n        if (!(cleanupError instanceof Error && 'code' in cleanupError && cleanupError.code === 'ENOENT')) throw cleanupError\n      },\n    )\n    if (error instanceof AttachmentError) throw error\n    throw new AttachmentError('Unable to persist image attachment.', 'ATTACHMENT_WRITE_FAILED', { cause: error })\n  }\n  return prepared.ref\n}\n\n/**\n * Decode and normalize one image once, then publish the prepared object.\n * @param root - absolute `DSH_HOME/attachments/v1` root.\n * @param input - submitted encoded bytes and declared media type.\n * @param limits - resolved source admission policy.\n * @param policy - resolved normalization policy.\n * @returns durable content-addressed normalized image reference.\n */\nexport async function saveImageFile(\n  root: string,\n  input: SaveImageAttachment,\n  limits: ImageAttachmentLimits,\n  policy: NormalizationPolicy,\n): Promise<ImageAttachmentRef> {","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/attachment/attachment-local/src/store.ts#L221-L257","documentation":"Error \"Unable to persist image attachment.\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/attachment/attachment-local/src/store.ts:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check storage permissions and free disk space, then retry persisting the image."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}