{"record":{"id":"2ed29db63755c2a0","repo":"n8n-io/n8n","slug":"source-langtracer-requires-suite-slug-2ed29d","errorCode":null,"errorMessage":"--source langtracer requires --suite <slug>","messagePattern":"--source langtracer requires --suite <slug>","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/cli/build-mcp-manifest.ts","lineNumber":234,"sourceCode":"\t\t\t\tbreak;\n\t\t\tcase '-h':\n\t\t\tcase '--help':\n\t\t\t\treturn { helpRequested: true };\n\t\t\tdefault:\n\t\t\t\tif (arg.startsWith('--')) {\n\t\t\t\t\tthrow new Error(`Unknown flag: ${arg.split('=', 1)[0]} (use --help)`);\n\t\t\t\t}\n\t\t\t\tresult.slugs.push(arg);\n\t\t\t\ti += 1;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (result.iterations < 1) throw new Error('--iterations must be >= 1');\n\tif (result.concurrency < 1) throw new Error('--concurrency must be >= 1');\n\tif (result.maxAttempts < 1) throw new Error('--max-attempts must be >= 1');\n\tif (result.source === 'langtracer' && !result.suite) {\n\t\tthrow new Error('--source langtracer requires --suite <slug>');\n\t}\n\n\tmkdirSync(result.outputDir, { recursive: true });\n\tif (!result.manifestPath) result.manifestPath = join(result.outputDir, 'manifest.json');\n\tif (!result.logDir) result.logDir = join(result.outputDir, 'logs');\n\tconst base = result.manifestPath.replace(/\\.json$/, '');\n\tresult.statsPath = `${base}-stats.json`;\n\tmkdirSync(result.logDir, { recursive: true });\n\n\treturn { helpRequested: false, args: result };\n}\n\nfunction readJson(path: string, label: string): unknown {\n\tconst content = readFileSync(path, 'utf-8');\n\ttry {\n\t\treturn JSON.parse(content);\n\t} catch (error) {\n\t\tconst msg = error instanceof Error ? error.message : String(error);","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/cli/build-mcp-manifest.ts#L216-L252","documentation":"Thrown in parseArgs when --source langtracer is set but --suite is not provided. The langtracer source pulls test cases from a remote lang-tracer suite over MCP instead of reading JSON files from disk; the suite slug identifies which suite to pull from. Without it, the source has no way to locate test cases.","triggerScenarios":"Running `pnpm eval:build-mcp-manifest --source langtracer` without the `--suite <slug>` flag. The check at line 233 fires after all flags are parsed.","commonSituations":"Developer switches to the langtracer source but forgets the required --suite flag. Assumes --suite has a default value (it does not). Copies a partial command from documentation.","solutions":["Add --suite <slug> to the command (e.g. --suite baseline)","If you intend to use on-disk test cases, omit --source langtracer (disk is the default)","List available suite slugs in the lang-tracer UI or via the REST API before choosing one"],"exampleFix":"# before\npnpm eval:build-mcp-manifest --source langtracer\n\n# after\npnpm eval:build-mcp-manifest --source langtracer --suite baseline","handlingStrategy":"validation","validationCode":"// Validate source/suite pairing before running the CLI:\nconst source = 'langtracer';\nconst suite = undefined;\nif (source === 'langtracer' && !suite) {\n  throw new Error('--source langtracer requires --suite <slug>');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When using --source langtracer, always pair it with --suite <slug>","Keep a checklist of required flag pairings for each --source mode"],"tags":["cli","validation","langtracer","suite","build-mcp-manifest"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}