earendil-works/pi · error · TypeError

At least one candidate harness is required.

Error message

At least one candidate harness is required.

What it means

Error "At least one candidate harness is required." thrown in earendil-works/pi.

Source

Thrown at packages/evals/src/vitest-evals/harness-table.ts:121

		if (typeof id === "string" && id.trim()) return id.trim();
	}
	const canonicalInput = JSON.stringify(canonicalizeJson(input, new WeakSet()));
	if (canonicalInput === undefined) throw new TypeError("Eval input must be JSON-serializable.");
	return createHash("sha256").update(canonicalInput).digest("hex");
}

export function deriveEvalGroupKey(input: unknown, repetition: number): string {
	return JSON.stringify([deriveInputKey(input), repetition]);
}

function validateOptions<TInput, TOutput extends JsonValue | undefined>(
	evalSet: string,
	baseline: Harness<TInput, TOutput>,
	candidates: readonly Harness<TInput, TOutput>[],
	repetitions: number,
): void {
	if (!evalSet.trim()) throw new TypeError("evalSet must not be empty.");
	if (candidates.length === 0) throw new TypeError("At least one candidate harness is required.");
	const harnesses = [baseline, ...candidates];
	const names = new Set(harnesses.map((harness) => harness.name));
	if (names.size !== harnesses.length) throw new TypeError("Harness names must be unique within an eval set.");
	if (!Number.isSafeInteger(repetitions) || repetitions < 1) {
		throw new TypeError("repetitions must be a positive integer.");
	}
}

function withIterationArtifact<TInput, TOutput extends JsonValue | undefined>(
	harness: Harness<TInput, TOutput>,
	plan: EvalHarnessIterationPlan,
): Harness<TInput, TOutput> {
	return {
		name: harness.name,
		async run(input, context) {
			const groupKey = deriveEvalGroupKey(input, plan.repetition);
			const artifact: EvalHarnessIterationArtifact = { ...plan, groupKey };
			context.setArtifact(EVAL_HARNESS_ITERATION_ARTIFACT, artifact);

View on GitHub (pinned to 4af9d21d3b)

When it happens

Trigger: Thrown at packages/evals/src/vitest-evals/harness-table.ts:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/2fbaca8fb4b45ef4. Report an issue: GitHub.