n8n-io/n8n · error · Error
A case declares ${String(byName.size)} distinct scenario see
Error message
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. What it means
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.
Source
Thrown at packages/@n8n/instance-ai/evaluations/harness/seed-tables.ts:65
logger: EvalLogger,
): InstanceAiEvalSeedDataTable[] {
const byName = new Map<string, InstanceAiEvalSeedDataTable>();
for (const scenario of scenarios) {
for (const table of scenario.seedDataTables ?? []) {
const existing = byName.get(table.name);
if (existing) {
if (!sameSeedTableShape(existing, table)) {
logger.warn(
` Scenario seed table "${table.name}" is declared more than once with different columns/rows; keeping the first declaration and ignoring the rest.`,
);
}
continue;
}
byName.set(table.name, table);
}
}
if (byName.size > MAX_SEED_DATA_TABLES) {
throw new Error(
`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.`,
);
}
return [...byName.values()];
}
/**
* A note appended to the build's opening message naming the data tables that
* already exist in the workspace (created empty before the build turn) so the
* agent discovers and binds the REAL table (via the Data Table node's
* list/schema) instead of creating a duplicate — the production-faithful flow
* where the user's table pre-exists (TRUST-311 follow-up). Empty when the case
* declares no scenario seed tables.
*/
export function buildSeededTablesNote(tables: InstanceAiEvalSeedDataTable[]): string {
if (tables.length === 0) return '';
const lines = tables.map((table) => {
const columns = table.columns.map((column) => `${column.name}: ${column.type}`).join(', ');View on GitHub (pinned to 5ac6606e81)
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).
Example fix
// before — three scenarios each declare a uniquely-named table
scenarios: [
{ name: 'a', seedDataTables: [{ name: 'a_users', ... }] },
{ name: 'b', seedDataTables: [{ name: 'b_users', ... }] },
{ name: 'c', seedDataTables: [{ name: 'c_users', ... }] },
]
// after — one shared table name; rows are reseeded per scenario
scenarios: [
{ name: 'a', seedDataTables: [{ name: 'users', rows: [...a] }] },
{ name: 'b', seedDataTables: [{ name: 'users', rows: [...b] }] },
{ name: 'c', seedDataTables: [{ name: 'users', rows: [...c] }] },
] Defensive patterns
Strategy: validation
Validate before calling
const MAX_SEED_DATA_TABLES = 10; // keep in sync with harness
function tableCountOk(scenarios: { seedDataTables?: { name: string }[] }[]): boolean {
const names = new Set<string>();
for (const s of scenarios) for (const t of s.seedDataTables ?? []) names.add(t.name);
return names.size <= MAX_SEED_DATA_TABLES;
}
if (!tableCountOk(caseSpec.scenarios)) {
throw new Error('too many distinct seed tables; consolidate names or split the case');
} Type guard
null
Try / catch
try {
collectSeedTables(caseSpec.scenarios, logger);
} catch (e) {
if (e instanceof Error && /exceeding the .*-table restore limit/.test(e.message)) {
// consolidate table names across scenarios, then retry
}
throw e;
} Prevention
- Reuse table names across scenarios; only rows differ.
- Lint case files for distinct table-name counts before running.
- Split large cases early.
When it happens
Trigger: 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.
Common situations: Authoring a complex multi-scenario case with per-scenario fixtures; merging several cases into one without consolidating tables.
Related errors
- No runs for thread ${ref.threadId} in LangSmith project "${s
- Thread ${ref.threadId}: the live turn is the first/only user
- Scenario "${scenario.name}" declares seed table "${table.nam
- Node type ${nodeType} not found
- Could not read node catalogue at ${jsonPath}: ${message} Run
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/79fe58b10b2300af.
Report an issue: GitHub.