n8n-io/n8n · error · Error

Found multiple eval-results entries for test case "${seriali

Error message

Found multiple eval-results entries for test case "${serializedTestCaseName}"

What it means

Thrown by `findStoredTestCaseResult()` as the fallback branch: slug-based matching (error 434) did not yield exactly one entry, so the function tried matching by the serialized test-case name (`serializedTestCaseName`), and that ALSO matched more than one entry. This indicates duplicate display names in `eval-results.json` — multiple test-case blocks share the same `name` field. The function refuses to guess which one is canonical; the caller must disambiguate the source data.

Source

Thrown at packages/@n8n/instance-ai/evaluations/eval-results-artifact.ts:54

	serializedTestCaseName: string | undefined,
): StoredTestCaseResult<TEvalResult> | undefined {
	const slug = getTestCaseSlug(testCasePath);
	const bySlug = evalResults.testCases.filter(
		(testCaseResult) => testCaseResult.testCaseFile === slug,
	);
	if (bySlug.length === 1) return bySlug[0];
	if (bySlug.length > 1) {
		throw new Error(`Found multiple eval-results entries for test case slug "${slug}"`);
	}

	const byName = serializedTestCaseName
		? evalResults.testCases.filter(
				(testCaseResult) => testCaseResult.name === serializedTestCaseName,
			)
		: [];
	if (byName.length === 1) return byName[0];
	if (byName.length > 1) {
		throw new Error(
			`Found multiple eval-results entries for test case "${serializedTestCaseName}"`,
		);
	}

	return evalResults.testCases.length === 1 ? evalResults.testCases[0] : undefined;
}

export function findStoredVerifierRun<TEvalResult>(
	storedTestCase: StoredTestCaseResult<TEvalResult> | undefined,
	scenarioName: string,
): StoredVerifierRun<TEvalResult> | undefined {
	const storedScenario = storedTestCase?.scenarios.find(
		(scenarioResult) => scenarioResult.name === scenarioName,
	);
	if (!storedScenario) return undefined;

	for (let runIndex = 0; runIndex < storedScenario.runs.length; runIndex++) {
		const run = storedScenario.runs[runIndex];

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Open `eval-results.json` and find the entries sharing the cited name.
  2. Give each a unique `name` (or remove the stale duplicate).
  3. If the duplication comes from source case files with the same `name`, rename one in its JSON.
  4. Regenerate the artifact rather than editing by hand where possible.

Example fix

// before (eval-results.json)
{
  "testCases": [
    { "name": "linear-report", "testCaseFile": "a" },
    { "name": "linear-report", "testCaseFile": "b" }
  ]
}
// after
{
  "testCases": [
    { "name": "linear-report-a", "testCaseFile": "a" },
    { "name": "linear-report-b", "testCaseFile": "b" }
  ]
}
Defensive patterns

Strategy: validation

Validate before calling

function assertUniqueNames(results: StoredEvalResults<unknown>): void {
  const seen = new Set<string>();
  for (const t of results.testCases) {
    if (t.name && seen.has(t.name)) throw new Error(`Duplicate name: ${t.name}`);
    if (t.name) seen.add(t.name);
  }
}

Prevention

When it happens

Trigger: Two different test-case entries share the same `name` (e.g. both named 'cross-team linear report') but have different `testCaseFile` slugs. A copy-paste of an entry that kept the name. A name-collision between a workflow case and an agent case that wasn't disambiguated.

Common situations: Hand-editing the artifact. A writer bug that uses a default name when none was set. Two case files with the same top-level `name` field.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/75374a8cb4fa2b69. Report an issue: GitHub.