{"record":{"id":"fdb42186a8e91c5d","repo":"deepseek-ai/deepseek-harness","slug":"fs-not-observed-fdb421","errorCode":"FS_NOT_OBSERVED","errorMessage":"cannot overwrite existing \"${displayPath}\" without reading it first","messagePattern":"cannot overwrite existing \"(.+?)\" without reading it first","errorType":"exception","errorClass":"FsError","httpStatus":null,"severity":"error","filePath":"packages/fs/fs-local/src/fsio.ts","lineNumber":502,"sourceCode":"  displayPath: string,\n  inspectPublicationTarget: (path: string) => Promise<BigIntStats>,\n): Promise<never> {\n  let existing: BigIntStats | undefined\n  try {\n    existing = await inspectPublicationTarget(absolutePath)\n  } catch (metadataError: unknown) {\n    if (!isENOENT(metadataError) && !isENOTDIR(metadataError)) {\n      throw new FsError(`cannot write \"${displayPath}\": ${errorMessage(metadataError)}`, 'FS_IO_ERROR', { cause: metadataError })\n    }\n  }\n\n  // Link errno values vary by platform and filesystem. Inspect the target entry\n  // after failure so a collision is not confused with missing hard-link support.\n  if (existing !== undefined) {\n    if (!existing.isFile()) {\n      throw new FsError(`cannot write \"${displayPath}\": not a regular file`, 'FS_NOT_REGULAR_FILE', { cause: error })\n    }\n    throw new FsError(\n      `cannot overwrite existing \"${displayPath}\" without reading it first`,\n      'FS_NOT_OBSERVED',\n      { cause: error },\n    )\n  }\n  if (isEEXIST(error)) {\n    throw new FsError(\n      `cannot overwrite existing \"${displayPath}\" without reading it first`,\n      'FS_NOT_OBSERVED',\n      { cause: error },\n    )\n  }\n  throw new FsError(`cannot write \"${displayPath}\": ${errorMessage(error)}`, 'FS_IO_ERROR', { cause: error })\n}\n\n/**\n * Atomically replace a file through a private, synced staging file in the same directory.\n * POSIX protects the staging directory and file with `0o700` and `0o600`. A new Windows file","sourceCodeStart":484,"sourceCodeEnd":520,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/fs-local/src/fsio.ts#L484-L520","documentation":"Error \"cannot overwrite existing \"${displayPath}\" without reading it first\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/fs-local/src/fsio.ts:502 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}