n8n-io/n8n · error · Error

eval-results.json does not include a workflowId and evalResu

Error message

eval-results.json does not include a workflowId and evalResult for scenario "${scenarioName}" in test case "${getSerializedTestCaseName(testCase) ?? args.testCasePath}". Re-run the workflow evals with this branch.

What it means

Thrown in main() when findStoredVerifierRun() returns undefined for the given test case + scenario. The eval-results.json file must contain, for this scenario, both a workflowId and an evalResult produced by the workflow verifier run. Their absence means the scenario was never verifier-run on the current branch, or the stored result is for a different test-case identity. The message tells the developer to re-run the workflow evals on this branch so the file regenerates.

Source

Thrown at packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts:335

}

function main(): void {
	const args = parseCliArgs(process.argv.slice(2));
	const testCase = readJson<WorkflowTestCaseJson>(args.testCasePath);
	const scenarios = getScenarios(testCase);
	const scenarioName = args.scenarioName ?? scenarios[0]?.name;
	if (!scenarioName) throw new Error(`No scenarios found in ${args.testCasePath}`);
	const scenario = scenarios.find((item) => item.name === scenarioName);
	if (!scenario) throw new Error(`Scenario "${scenarioName}" not found in ${args.testCasePath}`);
	const evalResults = readJson<StoredEvalResults<EvalResult>>(evalResultsPath);
	const storedTestCase = findStoredTestCaseResult(
		evalResults,
		args.testCasePath,
		getSerializedTestCaseName(testCase),
	);
	const storedRun = findStoredVerifierRun(storedTestCase, scenarioName);
	if (!storedRun) {
		throw new Error(
			`eval-results.json does not include a workflowId and evalResult for scenario "${scenarioName}" in test case "${getSerializedTestCaseName(testCase) ?? args.testCasePath}". Re-run the workflow evals with this branch.`,
		);
	}

	const workflowJson = getWorkflowJson(storedRun.workflowId);
	const checklist = [
		{
			id: 1,
			description: scenario.successCriteria,
			category: 'execution',
			strategy: 'llm',
		},
	];
	const evalResult = storedRun.evalResult;
	const artifact = buildVerificationArtifact(scenario, evalResult, workflowJson);
	const userMessage = `## Checklist\n\n${JSON.stringify(checklist, null, 2)}\n\n## Verification Artifact\n\n${artifact}\n\nVerify each checklist item against the artifact above.`;

	const requestBody = {

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Re-run the workflow evals on the current branch (e.g. the Instance AI workflow eval command) to regenerate eval-results.json with workflowId + evalResult for every scenario.
  2. If the test-case opening prompt was edited, the serialized identity changed — a full re-run is required, not just this script.
  3. Confirm the scenario name and testCasePath passed match the ones the eval runner wrote.
Defensive patterns

Strategy: validation

Validate before calling

// Pre-check eval-results.json has a verifier run for this scenario before exporting.
const storedTestCase = findStoredTestCaseResult(evalResults, args.testCasePath, getSerializedTestCaseName(testCase));
const storedRun = findStoredVerifierRun(storedTestCase, scenarioName);
if (!storedRun?.workflowId || !storedRun?.evalResult) {
  throw new Error(`eval-results.json has no verifier run for scenario "${scenarioName}". Re-run: <workflow eval command> --scenario ${scenarioName}.`);
}

Prevention

When it happens

Trigger: Running export-latest-verifier-request before the verifier has recorded a result for that scenario; after switching branches the eval-results.json is from the old branch; the test-case prompt (used as its serialized identity) changed so findStoredTestCaseResult no longer matches.

Common situations: Branch switch without re-running evals; editing the opening conversation prompt shifts the serialized test-case name and breaks the lookup; partial eval run that recorded some scenarios but not this one.

Related errors


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