{"record":{"id":"c11d0665192b3919","repo":"ruvnet/ruflo","slug":"hierarchy-exceeds-maximum-size-of-1m-nodes","errorCode":null,"errorMessage":"Hierarchy exceeds maximum size of 1M nodes","messagePattern":"Hierarchy exceeds maximum size of 1M nodes","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts","lineNumber":407,"sourceCode":"\n    return {\n      items: topK,\n      totalCandidates: results.length,\n      searchTimeMs: performance.now() - startTime,\n    };\n  }\n\n  // ============================================================================\n  // Private Helper Methods\n  // ============================================================================\n\n  private validateHierarchy(hierarchy: Hierarchy): void {\n    if (hierarchy.nodes.length === 0) {\n      throw new Error('Hierarchy must have at least one node');\n    }\n\n    if (hierarchy.nodes.length > 1_000_000) {\n      throw new Error('Hierarchy exceeds maximum size of 1M nodes');\n    }\n\n    // Check for cycles\n    const visited = new Set<string>();\n    const inStack = new Set<string>();\n\n    const hasCycle = (nodeId: string): boolean => {\n      if (inStack.has(nodeId)) return true;\n      if (visited.has(nodeId)) return false;\n\n      visited.add(nodeId);\n      inStack.add(nodeId);\n\n      const node = hierarchy.nodes.find(n => n.id === nodeId);\n      if (node?.parent) {\n        if (hasCycle(node.parent)) return true;\n      }\n","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts#L389-L425","documentation":"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.","triggerScenarios":"Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:407 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}