{"record":{"id":"ff18a397c04a91bc","repo":"deepseek-ai/deepseek-harness","slug":"file-path-must-be-a-non-empty-string-ff18a3","errorCode":null,"errorMessage":"file_path must be a non-empty string","messagePattern":"file_path must be a non-empty string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/lsp/tool-lsp/src/render.ts","lineNumber":50,"sourceCode":"export interface LspToolArgs {\n  readonly operation: string\n  readonly file_path: string\n  readonly line: number\n  readonly character: number\n}\n\n/**\n * Validate and convert model arguments: `operation` must be one of the four; `line`/`character` are\n * positive one-based integers converted to the seam's zero-based position.\n * @param args - the schema-validated raw arguments.\n * @returns the validated input with a zero-based position.\n * @throws Error when the operation is unknown or a coordinate is not a positive integer.\n */\nexport function parseLspArgs(args: LspToolArgs): LspToolInput {\n  if (!isOperation(args.operation)) {\n    throw new Error(`operation must be one of ${LSP_OPERATIONS.join(', ')}`)\n  }\n  if (args.file_path.trim().length === 0) throw new Error('file_path must be a non-empty string')\n  const line = oneBased(args.line, 'line')\n  const character = oneBased(args.character, 'character')\n  return {\n    operation: args.operation,\n    filePath: args.file_path,\n    // The model counts from 1; the seam (and protocol) count from 0.\n    position: { line: line - 1, character: character - 1 },\n  }\n}\n\n/** Whether a string is one of the four operations. */\nfunction isOperation(value: string): value is LspOperation {\n  return (LSP_OPERATIONS as readonly string[]).includes(value)\n}\n\n/** Validate a one-based coordinate is a positive integer. */\nfunction oneBased(value: number, name: string): number {\n  if (!Number.isInteger(value) || value < 1) {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/lsp/tool-lsp/src/render.ts#L32-L68","documentation":"Error \"file_path must be a non-empty string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/lsp/tool-lsp/src/render.ts:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty string file_path."],"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"}