{"record":{"id":"427adb041c31f3f6","repo":"ruvnet/ruflo","slug":"hierarchy-too-deep-maxdepth-100","errorCode":null,"errorMessage":"Hierarchy too deep: ${maxDepth} > 100","messagePattern":"Hierarchy too deep: (.+?) > 100","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts","lineNumber":463,"sourceCode":"\n      const parent = hierarchy.nodes.find(n => n.id === node.parent);\n      if (!parent) {\n        depths.set(node.id, 0);\n        return 0;\n      }\n\n      const depth = computeDepth(parent) + 1;\n      depths.set(node.id, depth);\n      return depth;\n    };\n\n    let maxDepth = 0;\n    for (const node of hierarchy.nodes) {\n      maxDepth = Math.max(maxDepth, computeDepth(node));\n    }\n\n    if (maxDepth > 100) {\n      throw new Error(`Hierarchy too deep: ${maxDepth} > 100`);\n    }\n  }\n\n  private computeDistanceGradient(\n    x: Float32Array,\n    y: Float32Array,\n    c: number\n  ): { child: Float32Array; parent: Float32Array } {\n    const eps = 1e-6;\n    const childGrad = new Float32Array(x.length);\n    const parentGrad = new Float32Array(x.length);\n\n    const d0 = poincareDistance(x, y, c);\n\n    for (let i = 0; i < x.length; i++) {\n      // Gradient w.r.t. x\n      const xPlus = new Float32Array(x);\n      xPlus[i] += eps;","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts#L445-L481","documentation":"validateHierarchy() computed the maximum node depth via the parent chain and it exceeds 100. Hyperbolic embeddings degrade beyond that depth, so the hierarchy is refused; flatten the tree or raise the depth cap.","triggerScenarios":"Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:463 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"}