{"record":{"id":"0fe17d855086cec7","repo":"deepseek-ai/deepseek-harness","slug":"toolresultpruneconfig-unknown-key-key-allow","errorCode":null,"errorMessage":"ToolResultPruneConfig: unknown key \"${key}\" (allowed: thresholdChars, headChars, tailChars)","messagePattern":"ToolResultPruneConfig: unknown key \"(.+?)\" \\(allowed: thresholdChars, headChars, tailChars\\)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/compaction/compaction-tool-result-pruner/src/config.ts","lineNumber":39,"sourceCode":"\n/**\n * Count Unicode code points without splitting surrogate pairs.\n * @param text - text to measure.\n * @returns the Unicode code-point count.\n */\nexport function codePointLength(text: string): number {\n  return Array.from(text).length\n}\n\n/**\n * Resolve and validate pruning budgets.\n * @param config - raw plugin configuration.\n * @returns a detached deeply immutable configuration.\n */\nexport function resolveConfig(config: ToolResultPruneConfig = {}): ResolvedConfig {\n  for (const key of Object.keys(config)) {\n    if (!CONFIG_KEYS.has(key)) {\n      throw new Error(\n        `ToolResultPruneConfig: unknown key \"${key}\" `\n        + '(allowed: thresholdChars, headChars, tailChars)',\n      )\n    }\n  }\n\n  const resolved: ResolvedConfig = {\n    thresholdChars: config.thresholdChars ?? DEFAULTS.thresholdChars,\n    headChars: config.headChars ?? DEFAULTS.headChars,\n    tailChars: config.tailChars ?? DEFAULTS.tailChars,\n  }\n  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","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/compaction/compaction-tool-result-pruner/src/config.ts#L21-L57","documentation":"Error \"ToolResultPruneConfig: unknown key \"${key}\" (allowed: thresholdChars, headChars, tailChars)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/compaction/compaction-tool-result-pruner/src/config.ts:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only the allowed keys: thresholdChars, headChars, tailChars."],"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"}