{"record":{"id":"2fbaca8fb4b45ef4","repo":"earendil-works/pi","slug":"at-least-one-candidate-harness-is-required","errorCode":null,"errorMessage":"At least one candidate harness is required.","messagePattern":"At least one candidate harness is required\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/evals/src/vitest-evals/harness-table.ts","lineNumber":121,"sourceCode":"\t\tif (typeof id === \"string\" && id.trim()) return id.trim();\n\t}\n\tconst canonicalInput = JSON.stringify(canonicalizeJson(input, new WeakSet()));\n\tif (canonicalInput === undefined) throw new TypeError(\"Eval input must be JSON-serializable.\");\n\treturn createHash(\"sha256\").update(canonicalInput).digest(\"hex\");\n}\n\nexport function deriveEvalGroupKey(input: unknown, repetition: number): string {\n\treturn JSON.stringify([deriveInputKey(input), repetition]);\n}\n\nfunction validateOptions<TInput, TOutput extends JsonValue | undefined>(\n\tevalSet: string,\n\tbaseline: Harness<TInput, TOutput>,\n\tcandidates: readonly Harness<TInput, TOutput>[],\n\trepetitions: number,\n): void {\n\tif (!evalSet.trim()) throw new TypeError(\"evalSet must not be empty.\");\n\tif (candidates.length === 0) throw new TypeError(\"At least one candidate harness is required.\");\n\tconst harnesses = [baseline, ...candidates];\n\tconst names = new Set(harnesses.map((harness) => harness.name));\n\tif (names.size !== harnesses.length) throw new TypeError(\"Harness names must be unique within an eval set.\");\n\tif (!Number.isSafeInteger(repetitions) || repetitions < 1) {\n\t\tthrow new TypeError(\"repetitions must be a positive integer.\");\n\t}\n}\n\nfunction withIterationArtifact<TInput, TOutput extends JsonValue | undefined>(\n\tharness: Harness<TInput, TOutput>,\n\tplan: EvalHarnessIterationPlan,\n): Harness<TInput, TOutput> {\n\treturn {\n\t\tname: harness.name,\n\t\tasync run(input, context) {\n\t\t\tconst groupKey = deriveEvalGroupKey(input, plan.repetition);\n\t\t\tconst artifact: EvalHarnessIterationArtifact = { ...plan, groupKey };\n\t\t\tcontext.setArtifact(EVAL_HARNESS_ITERATION_ARTIFACT, artifact);","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/evals/src/vitest-evals/harness-table.ts#L103-L139","documentation":"Error \"At least one candidate harness is required.\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/evals/src/vitest-evals/harness-table.ts:121 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":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}