{"record":{"id":"91a4f74a7151bfcd","repo":"deepseek-ai/deepseek-harness","slug":"toolresultpruneconfig-name-value-must-be","errorCode":null,"errorMessage":"ToolResultPruneConfig: ${name} (${value}) must be a positive integer","messagePattern":"ToolResultPruneConfig: (.+?) \\((.+?)\\) must be a positive integer","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/compaction/compaction-tool-result-pruner/src/config.ts","lineNumber":69,"sourceCode":"  assertPositiveInteger('thresholdChars', resolved.thresholdChars)\n  assertNonNegativeInteger('headChars', resolved.headChars)\n  assertNonNegativeInteger('tailChars', resolved.tailChars)\n\n  const emittedChars = resolved.headChars\n    + codePointLength(PRUNE_MARKER)\n    + resolved.tailChars\n  if (emittedChars > resolved.thresholdChars) {\n    throw new Error(\n      `ToolResultPruneConfig: headChars + marker + tailChars (${emittedChars}) `\n      + `must be at most thresholdChars (${resolved.thresholdChars})`,\n    )\n  }\n  return deepFreeze(structuredClone(resolved))\n}\n\nfunction assertPositiveInteger(name: string, value: number): void {\n  if (!Number.isInteger(value) || value <= 0) {\n    throw new Error(`ToolResultPruneConfig: ${name} (${value}) must be a positive integer`)\n  }\n}\n\nfunction assertNonNegativeInteger(name: string, value: number): void {\n  if (!Number.isInteger(value) || value < 0) {\n    throw new Error(`ToolResultPruneConfig: ${name} (${value}) must be a non-negative integer`)\n  }\n}\n","sourceCodeStart":51,"sourceCodeEnd":78,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/compaction/compaction-tool-result-pruner/src/config.ts#L51-L78","documentation":"Error \"ToolResultPruneConfig: ${name} (${value}) must be a positive integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/compaction/compaction-tool-result-pruner/src/config.ts:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the config value to a positive integer."],"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"}