{"record":{"id":"79fe58b10b2300af","repo":"n8n-io/n8n","slug":"a-case-declares-string-byname-size-distinct-sc","errorCode":null,"errorMessage":"A case declares ${String(byName.size)} distinct scenario seed data tables, exceeding the ${String(MAX_SEED_DATA_TABLES)}-table restore limit; reduce the number of distinct table names.","messagePattern":"A case declares (.+?) distinct scenario seed data tables, exceeding the (.+?)-table restore limit; reduce the number of distinct table names\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/harness/seed-tables.ts","lineNumber":65,"sourceCode":"\tlogger: EvalLogger,\n): InstanceAiEvalSeedDataTable[] {\n\tconst byName = new Map<string, InstanceAiEvalSeedDataTable>();\n\tfor (const scenario of scenarios) {\n\t\tfor (const table of scenario.seedDataTables ?? []) {\n\t\t\tconst existing = byName.get(table.name);\n\t\t\tif (existing) {\n\t\t\t\tif (!sameSeedTableShape(existing, table)) {\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t`  Scenario seed table \"${table.name}\" is declared more than once with different columns/rows; keeping the first declaration and ignoring the rest.`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbyName.set(table.name, table);\n\t\t}\n\t}\n\tif (byName.size > MAX_SEED_DATA_TABLES) {\n\t\tthrow new Error(\n\t\t\t`A case declares ${String(byName.size)} distinct scenario seed data tables, exceeding the ${String(MAX_SEED_DATA_TABLES)}-table restore limit; reduce the number of distinct table names.`,\n\t\t);\n\t}\n\treturn [...byName.values()];\n}\n\n/**\n * A note appended to the build's opening message naming the data tables that\n * already exist in the workspace (created empty before the build turn) so the\n * agent discovers and binds the REAL table (via the Data Table node's\n * list/schema) instead of creating a duplicate — the production-faithful flow\n * where the user's table pre-exists (TRUST-311 follow-up). Empty when the case\n * declares no scenario seed tables.\n */\nexport function buildSeededTablesNote(tables: InstanceAiEvalSeedDataTable[]): string {\n\tif (tables.length === 0) return '';\n\tconst lines = tables.map((table) => {\n\t\tconst columns = table.columns.map((column) => `${column.name}: ${column.type}`).join(', ');","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/harness/seed-tables.ts#L47-L83","documentation":"Thrown by the seed-tables collector when a single eval case declares more distinct scenario seed data tables than MAX_SEED_DATA_TABLES. The limit exists because each distinct table name must be restored (created + seeded) in the target workspace before scenarios run, and unbounded table counts blow up workspace setup time and state. Tables with duplicate names are deduped (first declaration wins) before the count check.","triggerScenarios":"A case lists many scenarios each declaring unique table names, pushing the distinct-name count over the cap; the cap was lowered and an existing case now exceeds it; copy-paste created many near-duplicate tables with slightly different names.","commonSituations":"Authoring a complex multi-scenario case with per-scenario fixtures; merging several cases into one without consolidating tables.","solutions":["Reduce the number of distinct table names: reuse the same table name across scenarios where the shape matches (the harness binds by name and reseeds rows per-scenario).","Split the case into multiple cases each under the limit.","If the limit is genuinely too low for a legitimate case, raise MAX_SEED_DATA_TABLES (after evaluating workspace-setup cost)."],"exampleFix":"// before — three scenarios each declare a uniquely-named table\nscenarios: [\n  { name: 'a', seedDataTables: [{ name: 'a_users', ... }] },\n  { name: 'b', seedDataTables: [{ name: 'b_users', ... }] },\n  { name: 'c', seedDataTables: [{ name: 'c_users', ... }] },\n]\n\n// after — one shared table name; rows are reseeded per scenario\nscenarios: [\n  { name: 'a', seedDataTables: [{ name: 'users', rows: [...a] }] },\n  { name: 'b', seedDataTables: [{ name: 'users', rows: [...b] }] },\n  { name: 'c', seedDataTables: [{ name: 'users', rows: [...c] }] },\n]","handlingStrategy":"validation","validationCode":"const MAX_SEED_DATA_TABLES = 10; // keep in sync with harness\nfunction tableCountOk(scenarios: { seedDataTables?: { name: string }[] }[]): boolean {\n  const names = new Set<string>();\n  for (const s of scenarios) for (const t of s.seedDataTables ?? []) names.add(t.name);\n  return names.size <= MAX_SEED_DATA_TABLES;\n}\n\nif (!tableCountOk(caseSpec.scenarios)) {\n  throw new Error('too many distinct seed tables; consolidate names or split the case');\n}","typeGuard":"null","tryCatchPattern":"try {\n  collectSeedTables(caseSpec.scenarios, logger);\n} catch (e) {\n  if (e instanceof Error && /exceeding the .*-table restore limit/.test(e.message)) {\n    // consolidate table names across scenarios, then retry\n  }\n  throw e;\n}","preventionTips":["Reuse table names across scenarios; only rows differ.","Lint case files for distinct table-name counts before running.","Split large cases early."],"tags":["eval-harness","seed-tables","limits","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}