n8n-io/n8n · error · Error

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

Error message

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

What it means

Thrown by `findStoredTestCaseResult()` in eval-results-artifact.ts when matching stored eval-results entries by test-case slug (the filename without extension) yields more than one entry with the same `testCaseFile`. The function first tries slug-based matching, then falls back to name-based matching (error 435). Two entries with the same slug means the eval-results JSON has been duplicated or corrupted — usually a botched merge of two runs, or two different files that share a basename across different directories.

Source

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

	runIndex: number;
};

export function getTestCaseSlug(testCasePath: string): string {
	return path.basename(testCasePath, path.extname(testCasePath));
}

export function findStoredTestCaseResult<TEvalResult>(
	evalResults: StoredEvalResults<TEvalResult>,
	testCasePath: string,
	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>(

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Open `eval-results.json` (path: `<instanceAiRoot>/eval-results.json`) and find the two `testCases` entries sharing the cited `testCaseFile` slug.
  2. If one is stale (from a renamed/removed case), delete that entry.
  3. If two genuinely different case files share a basename, rename one of the source files so slugs are unique, then regenerate the results.
  4. Regenerate the artifact from a clean run rather than hand-merging.

Example fix

// before (eval-results.json)
{
  "testCases": [
    { "testCaseFile": "slack-setup", "name": "old", ... },
    { "testCaseFile": "slack-setup", "name": "new", ... }
  ]
}
// after (remove the stale entry)
{
  "testCases": [
    { "testCaseFile": "slack-setup", "name": "new", ... }
  ]
}
Defensive patterns

Strategy: validation

Validate before calling

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

Prevention

When it happens

Trigger: Two test-case files in different subdirectories share the same basename (e.g. `workflows/foo.json` and `agents/foo.json`), and both wrote entries into `eval-results.json` keyed by slug `foo`. A manual edit/merge of `eval-results.json` duplicated a test-case block. An older run's results were concatenated onto a newer run's results without de-duplication.

Common situations: Merging eval-results artifacts across branches. Renaming a case file but leaving the old slug's results in the artifact. A bug in whatever writes `eval-results.json` that emits a second entry instead of updating the first.

Related errors


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