{"record":{"id":"7ad9a8b04559e14b","repo":"deepseek-ai/deepseek-harness","slug":"file-path-must-be-a-non-empty-string","errorCode":null,"errorMessage":"file_path must be a non-empty string","messagePattern":"file_path must be a non-empty string","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/fs/tool-fs/src/edit.ts","lineNumber":48,"sourceCode":" */\ninterface EditToolArgs {\n  file_path: string\n  old_string: string\n  new_string: string\n  replace_all?: boolean\n  sandbox_permissions?: string\n  justification?: string\n}\n\n/**\n * Validate value constraints the schema DSL can't express: a non-blank\n * `file_path`, a non-empty `old_string`, and `old_string !== new_string`\n * (an equal pair would be a guaranteed no-op edit).\n * @param args - the schema-validated raw tool arguments.\n * @returns the camelCased input with `replace_all` defaulted to false.\n */\nexport function parseEditArgs(args: { file_path: string; old_string: string; new_string: string; replace_all?: boolean }): EditInput {\n  if (args.file_path.trim().length === 0) throw new Error('file_path must be a non-empty string')\n  if (args.old_string.length === 0) throw new Error('old_string must be a non-empty string')\n  if (args.old_string === args.new_string) throw new Error('old_string and new_string must differ')\n  return {\n    filePath: args.file_path,\n    oldString: args.old_string,\n    newString: args.new_string,\n    replaceAll: args.replace_all ?? false,\n  }\n}\n\n/**\n * Format an edit success (single-match or replace-all) as a Claude-style model-facing message.\n * @param displayPath - the backend-resolved path shown to the model.\n * @param replaceAll - selects the all-occurrences wording over the single-replacement one.\n * @returns the confirmation sentence the model sees as the tool result.\n */\nexport function formatEditOutput(displayPath: string, replaceAll: boolean): string {\n  return replaceAll","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/tool-fs/src/edit.ts#L30-L66","documentation":"Error \"file_path must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/tool-fs/src/edit.ts:48 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"}