{"record":{"id":"fb1d53b4973bf868","repo":"n8n-io/n8n","slug":"eval-results-json-does-not-include-a-workflowid-an","errorCode":null,"errorMessage":"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.","messagePattern":"eval-results\\.json does not include a workflowId and evalResult for scenario \"(.+?)\" in test case \"(.+?)\"\\. Re-run the workflow evals with this branch\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts","lineNumber":335,"sourceCode":"}\n\nfunction main(): void {\n\tconst args = parseCliArgs(process.argv.slice(2));\n\tconst testCase = readJson<WorkflowTestCaseJson>(args.testCasePath);\n\tconst scenarios = getScenarios(testCase);\n\tconst scenarioName = args.scenarioName ?? scenarios[0]?.name;\n\tif (!scenarioName) throw new Error(`No scenarios found in ${args.testCasePath}`);\n\tconst scenario = scenarios.find((item) => item.name === scenarioName);\n\tif (!scenario) throw new Error(`Scenario \"${scenarioName}\" not found in ${args.testCasePath}`);\n\tconst evalResults = readJson<StoredEvalResults<EvalResult>>(evalResultsPath);\n\tconst storedTestCase = findStoredTestCaseResult(\n\t\tevalResults,\n\t\targs.testCasePath,\n\t\tgetSerializedTestCaseName(testCase),\n\t);\n\tconst storedRun = findStoredVerifierRun(storedTestCase, scenarioName);\n\tif (!storedRun) {\n\t\tthrow new Error(\n\t\t\t`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.`,\n\t\t);\n\t}\n\n\tconst workflowJson = getWorkflowJson(storedRun.workflowId);\n\tconst checklist = [\n\t\t{\n\t\t\tid: 1,\n\t\t\tdescription: scenario.successCriteria,\n\t\t\tcategory: 'execution',\n\t\t\tstrategy: 'llm',\n\t\t},\n\t];\n\tconst evalResult = storedRun.evalResult;\n\tconst artifact = buildVerificationArtifact(scenario, evalResult, workflowJson);\n\tconst 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.`;\n\n\tconst requestBody = {","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts#L317-L353","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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.","If the test-case opening prompt was edited, the serialized identity changed — a full re-run is required, not just this script.","Confirm the scenario name and testCasePath passed match the ones the eval runner wrote."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check eval-results.json has a verifier run for this scenario before exporting.\nconst storedTestCase = findStoredTestCaseResult(evalResults, args.testCasePath, getSerializedTestCaseName(testCase));\nconst storedRun = findStoredVerifierRun(storedTestCase, scenarioName);\nif (!storedRun?.workflowId || !storedRun?.evalResult) {\n  throw new Error(`eval-results.json has no verifier run for scenario \"${scenarioName}\". Re-run: <workflow eval command> --scenario ${scenarioName}.`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always re-run the full workflow eval suite after switching branches or editing the opening prompt.","Treat the serialized test-case name (opening prompt) as part of the identity — editing it invalidates stored results.","Wire export-latest-verifier-request into the same CI step that produces eval-results.json."],"tags":["eval-results","verifier","test-case","data-lookup"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}