{"record":{"id":"3c49fc24032621df","repo":"deepseek-ai/deepseek-harness","slug":"name-must-be-a-positive-integer-one-based","errorCode":null,"errorMessage":"${name} must be a positive integer (one-based)","messagePattern":"(.+?) must be a positive integer \\(one-based\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/lsp/tool-lsp/src/render.ts","lineNumber":69,"sourceCode":"  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) {\n    throw new Error(`${name} must be a positive integer (one-based)`)\n  }\n  return value\n}\n\n/**\n * Render a locations result grouped by file, converting each zero-based location back to a one-based\n * `path:line:character` entry. A `file:` URI inside the workspace becomes a workspace-relative path;\n * outside it, a URI-derived absolute path; a non-`file:` URI is kept verbatim. Applies `maxLocations` and\n * appends an omission marker when it truncates by count, then applies the complete result cap.\n * @param locations - the seam's locations (possibly empty).\n * @param workspaceUri - the provider's canonical workspace `file:` URI.\n * @param maxLocations - the cap before truncation.\n * @param maxResultChars - the complete rendered-text cap, including truncation metadata.\n * @returns the rendered text; a distinct no-result line when there are none.\n */\nexport function formatLocations(\n  locations: readonly LspLocation[],\n  workspaceUri: string,","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/lsp/tool-lsp/src/render.ts#L51-L87","documentation":"Error \"${name} must be a positive integer (one-based)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/lsp/tool-lsp/src/render.ts:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one-based positive integers for line and column."],"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"}