{"record":{"id":"c2c4ac54f8341af6","repo":"deepseek-ai/deepseek-harness","slug":"fs-not-found","errorCode":"FS_NOT_FOUND","errorMessage":"file_path must be a non-empty string","messagePattern":"file_path must be a non-empty string","errorType":"exception","errorClass":"FsError","httpStatus":null,"severity":"error","filePath":"packages/e2b/fs-e2b/src/index.ts","lineNumber":178,"sourceCode":"    matches += 1\n    offset = found + oldString.length\n  }\n  if (matches === 0) throw new FsError(`cannot edit \"${displayPath}\": old_string was not found`, 'FS_EDIT_NOT_FOUND')\n  if (!request.replaceAll && matches !== 1) {\n    throw new FsError(`cannot edit \"${displayPath}\": old_string matched ${matches} times`, 'FS_AMBIGUOUS_EDIT')\n  }\n  return request.replaceAll ? content.split(oldString).join(newString) : content.replace(oldString, newString)\n}\n\n/** Remote filesystem backend sharing the sandbox owned by `ctx.e2b`. */\nexport class E2BFileSystem extends FileSystem {\n  static inject = ['e2b']\n\n  private readonly locks = new Map<string, Promise<unknown>>()\n\n  override async resolve(path: string, opts?: { cwd?: string; signal?: AbortSignal }): Promise<FsTarget> {\n    assertNotAborted(opts?.signal, 'resolve')\n    if (path.trim().length === 0) throw new FsError('file_path must be a non-empty string', 'FS_NOT_FOUND')\n    const displayPath = posix.resolve(opts?.cwd ?? this.ctx.e2b.cwd, path)\n    try {\n      const sandbox = await this.ctx.e2b.getSandbox()\n      const targetKey = await this.canonicalPath(sandbox, displayPath, opts?.signal)\n      assertNotAborted(opts?.signal, 'resolve')\n      return { targetKey: FsTargetKey(targetKey), displayPath }\n    } catch (error: unknown) {\n      throw mapError(error, 'resolve', displayPath, opts?.signal)\n    }\n  }\n\n  override processPath(target: FsTarget): string {\n    return String(target.targetKey)\n  }\n\n  override fileUrl(target: FsTarget): string {\n    const path = this.processPath(target)\n    if (!posix.isAbsolute(path)) throw new Error(`fs-e2b: expected an absolute process path: ${JSON.stringify(path)}`)","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/fs-e2b/src/index.ts#L160-L196","documentation":"Error \"file_path must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/fs-e2b/src/index.ts:178 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"}