fix: skip ALL node repository validation for langchain nodes (correct placement)

The previous fix placed the skip inside the `if (!nodeInfo)` block, but the database HAS langchain nodes loaded from @n8n/n8n-nodes-langchain, so nodeInfo was NOT null. This meant the skip never executed and parameter validation via EnhancedConfigValidator was running and failing.

Moving the skip BEFORE the nodeInfo lookup ensures ALL node repository validation is bypassed for langchain nodes:
- No nodeInfo lookup
- No typeVersion validation
- No EnhancedConfigValidator parameter validation

Langchain nodes are fully validated by dedicated AI-specific validators in validateAISpecificNodes().

Resolves #265 (AI validation Phase 2 - critical fix)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-10-07 10:12:44 +02:00
parent 28cff8c77b
commit 1ad2c6f6d2

View File

@@ -395,16 +395,17 @@ export class WorkflowValidator {
node.type = normalizedType;
}
// Skip ALL node repository validation for langchain nodes
// They have dedicated AI-specific validators in validateAISpecificNodes()
// This prevents parameter validation conflicts and ensures proper AI validation
if (normalizedType.startsWith('nodes-langchain.')) {
continue;
}
// Get node definition using normalized type
const nodeInfo = this.nodeRepository.getNode(normalizedType);
if (!nodeInfo) {
// Skip validation for langchain nodes - they're validated by AI-specific validators
// This prevents database dependency issues while still ensuring proper validation
if (normalizedType.startsWith('nodes-langchain.')) {
// Langchain nodes are validated separately by validateAISpecificNodes()
continue;
}
// Use NodeSimilarityService to find suggestions
const suggestions = await this.similarityService.findSimilarNodes(node.type, 3);