{"record":{"id":"a1ac0b23e65b4d5d","repo":"n8n-io/n8n","slug":"suite-slug-id-is-required","errorCode":null,"errorMessage":"--suite <slug|id> is required","messagePattern":"--suite <slug\\|id> is required","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/cli/langtracer-push.ts","lineNumber":119,"sourceCode":"\t\t\t\tbreak;\n\t\t\tcase '--dry-run':\n\t\t\t\tresult.dryRun = true;\n\t\t\t\ti += 1;\n\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.suite) throw new Error('--suite <slug|id> is required');\n\tconst hasSelector =\n\t\tresult.slugs.length > 0 ||\n\t\tresult.changed ||\n\t\tresult.filter !== undefined ||\n\t\tresult.tier !== undefined;\n\tif (!hasSelector) {\n\t\tthrow new Error('select cases to push: pass <slugs...>, --changed, --filter, or --tier');\n\t}\n\n\treturn { helpRequested: false, args: result };\n}\n\nfunction nextArg(argv: string[], i: number, flag: string): string {\n\tconst value = argv[i + 1];\n\tif (value === undefined || value.startsWith('--')) throw new Error(`Missing value for ${flag}`);\n\treturn value;\n}\n","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/cli/langtracer-push.ts#L101-L137","documentation":"The langtracer-push CLI upserts test cases into a specific lang-tracer suite identified by --suite (slug or numeric ID). The flag is mandatory because pushing without a target would risk accidental writes to an unknown suite. The check at line 119 fires after all flags are parsed, verifying that result.suite is non-empty.","triggerScenarios":"Running `pnpm eval:langtracer-push --changed` (or any selector) without the `--suite` flag. The check runs after the parse loop completes.","commonSituations":"Developer forgets the --suite flag. Assumes a default suite exists (none does). Copies a partial command from docs or chat. The flag was present but its value was consumed by an adjacent flag.","solutions":["Add --suite <slug-or-id> to the command","Find available suite slugs in the lang-tracer UI or via the REST API (GET /suites)","Ensure --suite's value is not consumed by a following flag"],"exampleFix":"# before\npnpm eval:langtracer-push --changed\n\n# after\npnpm eval:langtracer-push --suite baseline --changed","handlingStrategy":"validation","validationCode":"if (!result.suite) {\n  throw new Error('--suite <slug|id> is required');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include --suite <slug-or-id> in langtracer-push commands","Look up suite slugs in the lang-tracer UI before running","Keep a reference of commonly used suite slugs"],"tags":["cli","validation","argument-parsing","suite","langtracer-push"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}