{"record":{"id":"80748879da358fa5","repo":"deepseek-ai/deepseek-harness","slug":"fs-not-found-807488","errorCode":"FS_NOT_FOUND","errorMessage":"file_path must be a non-empty string","messagePattern":"file_path must be a non-empty string","errorType":"error_code","errorClass":"FsError","httpStatus":null,"severity":"error","filePath":"packages/fs/fs-local/src/fsio.ts","lineNumber":147,"sourceCode":"/** One local directory child with a resolved target and cheap metadata. */\nexport interface LocalDirEntry {\n  name: string\n  type: 'file' | 'directory' | 'other'\n  target: LocalTarget\n  version?: FsVersion\n  size?: number\n}\n\n/**\n * Resolve a path to its absolute display path and realpath identity. For a missing target,\n * realpath the nearest existing ancestor and append the missing suffix, preserving identity\n * across symlinked ancestors before and after creation.\n * @param cwd - base directory a relative `path` resolves against.\n * @param path - absolute or relative path; empty/whitespace-only throws `FS_NOT_FOUND`.\n * @returns the absolute display path plus the realpath-derived stable target key.\n */\nexport async function resolveLocalTarget(cwd: string, path: string): Promise<LocalTarget> {\n  if (path.trim().length === 0) throw new FsError('file_path must be a non-empty string', 'FS_NOT_FOUND')\n  const displayPath = resolve(cwd, path)\n  try {\n    // Prefer the file's own realpath (resolves a symlinked file to its target).\n    return { displayPath, targetKey: FsTargetKey(await realpath(displayPath)) }\n  } catch (error: unknown) {\n    // A path component is a file, not a directory (e.g. \"afile/child.txt\" where\n    // \"afile\" is a regular file): the target can neither exist nor be created,\n    // so surface the structured taxonomy instead of a raw Node ENOTDIR.\n    /* v8 ignore next -- Windows reports this case as ENOENT and repairs it in the ancestor walk below. */\n    if (isENOTDIR(error)) throw new FsError(`cannot resolve \"${displayPath}\": a parent path segment is not a directory`, 'FS_NOT_FOUND')\n    /* v8 ignore next -- non-ENOENT realpath failure needs a permission/IO fault; ENOENT falls through to ancestor resolution. */\n    if (!isENOENT(error)) throw error\n  }\n  // File absent: realpath the nearest existing ancestor and re-append the\n  // missing suffix (the file basename plus any not-yet-created intermediate\n  // dirs), so the key is stable across creation of those dirs.\n  const missing = [basename(displayPath)]\n  let ancestor = dirname(displayPath)","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/fs-local/src/fsio.ts#L129-L165","documentation":"Error \"file_path must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/fs-local/src/fsio.ts:147 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"}