{"record":{"id":"7a2b5c67b288c8a7","repo":"ruvnet/ruflo","slug":"index-id-already-exists","errorCode":null,"errorMessage":"Index ${id} already exists","messagePattern":"Index (.+?) already exists","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts","lineNumber":307,"sourceCode":"    const parentNorm = Math.sqrt(parent.coordinates.reduce((s, v) => s + v * v, 0));\n    const childNorm = Math.sqrt(child.coordinates.reduce((s, v) => s + v * v, 0));\n    return parentNorm < childNorm - threshold;\n  }\n\n  /**\n   * Get hierarchy depth from hyperbolic point\n   */\n  hierarchyDepth(point: HyperbolicPoint): number {\n    const norm = Math.sqrt(point.coordinates.reduce((s, v) => s + v * v, 0));\n    return Math.atanh(Math.min(norm, 1 - POINCARE_BALL_EPS));\n  }\n\n  /**\n   * Create or get an index\n   */\n  createIndex(id: string, dimension: number, curvature: number): void {\n    if (this._indices.has(id)) {\n      throw new Error(`Index ${id} already exists`);\n    }\n\n    this._indices.set(id, {\n      id,\n      embeddings: new Map(),\n      curvature,\n      dimension,\n    });\n  }\n\n  /**\n   * Add point to index\n   */\n  addToIndex(indexId: string, nodeId: string, point: HyperbolicPoint): void {\n    const index = this._indices.get(indexId);\n    if (!index) {\n      throw new Error(`Index ${indexId} not found`);\n    }","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts#L289-L325","documentation":"createIndex() found an index already registered under the same id in this._indices. Index ids are unique per bridge; reuse would silently overwrite embeddings, so the caller must pick a fresh id or reuse the existing index.","triggerScenarios":"Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:307 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a unique identifier, or delete/replace the existing index before creating a new one with the same id.","Check for existence first and treat 'create if absent' as a distinct code path."],"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"}