{"record":{"id":"32cac8e0a5411f40","repo":"deepseek-ai/deepseek-harness","slug":"harness-definetool-path-enum-must-be-a-non-empt","errorCode":null,"errorMessage":"harness.defineTool ${path}.enum must be a non-empty array","messagePattern":"harness\\.defineTool (.+?)\\.enum must be a non-empty array","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/guard.ts","lineNumber":472,"sourceCode":"            kind: 'value',\n            value: value.items,\n            path: `${path}.items`,\n            forceRequired: false,\n            raw: task.raw,\n            parameterProperty: false,\n            destination: { kind: 'item', target: prop },\n          })\n        }\n        break\n      case 'string':\n      case 'number':\n      case 'integer':\n      case 'boolean':\n      case 'null':\n        assertSchemaKeys(value, path, ['type', 'enum', 'const', ...requiredKey, ...ANNOTATION_KEYS])\n        if (Object.hasOwn(value, 'enum')) {\n          if (!isDensePlainArray(value.enum) || value.enum.length === 0) {\n            throw new Error(`harness.defineTool ${path}.enum must be a non-empty array`)\n          }\n          prop.enum = cloneJson(value.enum, `harness.defineTool ${path}.enum`)\n        }\n        if (Object.hasOwn(value, 'const')) prop.const = cloneJson(value.const, `harness.defineTool ${path}.const`)\n        break\n      case 'json':\n        assertSchemaKeys(value, path, ['type', ...requiredKey, ...ANNOTATION_KEYS])\n        break\n      /* v8 ignore next 2 -- SCHEMA_TYPES narrows this closed switch before dispatch. */\n      default:\n        throw new Error(`harness.defineTool ${path} must declare a valid type: ${VALID_TYPES}`)\n    }\n  }\n  /* v8 ignore next -- the root map task assigns before scheduling descendants. */\n  return holder.value ?? {}\n}\n\nfunction markDynamicTool(tool: ToolDefinition): DynamicToolDefinition {","sourceCodeStart":454,"sourceCodeEnd":490,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/guard.ts#L454-L490","documentation":"Error \"harness.defineTool ${path}.enum must be a non-empty array\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/guard.ts:472 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"}