ruvnet/ruflo · error · Error
Hierarchy exceeds maximum size of 1M nodes
Error message
Hierarchy exceeds maximum size of 1M nodes
What it means
validateHierarchy() found the hierarchy has more than 1,000,000 nodes, exceeding the hard size cap that keeps embedding compute and memory bounded. Split the hierarchy or prune nodes; the check runs before embedding starts.
Source
Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:407
return {
items: topK,
totalCandidates: results.length,
searchTimeMs: performance.now() - startTime,
};
}
// ============================================================================
// Private Helper Methods
// ============================================================================
private validateHierarchy(hierarchy: Hierarchy): void {
if (hierarchy.nodes.length === 0) {
throw new Error('Hierarchy must have at least one node');
}
if (hierarchy.nodes.length > 1_000_000) {
throw new Error('Hierarchy exceeds maximum size of 1M nodes');
}
// Check for cycles
const visited = new Set<string>();
const inStack = new Set<string>();
const hasCycle = (nodeId: string): boolean => {
if (inStack.has(nodeId)) return true;
if (visited.has(nodeId)) return false;
visited.add(nodeId);
inStack.add(nodeId);
const node = hierarchy.nodes.find(n => n.id === nodeId);
if (node?.parent) {
if (hasCycle(node.parent)) return true;
}
View on GitHub (pinned to fa13ee4ad6)
Solutions
- Reduce the input size/depth below the documented limit, or batch the input into smaller chunks.
- Validate the limit before processing and report the measured versus allowed value to the caller.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:407 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/c11d0665192b3919.
Report an issue: GitHub.