ruvnet/ruflo · error · Error
Index ${id} already exists
Error message
Index ${id} already exists What it means
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.
Source
Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:307
const parentNorm = Math.sqrt(parent.coordinates.reduce((s, v) => s + v * v, 0));
const childNorm = Math.sqrt(child.coordinates.reduce((s, v) => s + v * v, 0));
return parentNorm < childNorm - threshold;
}
/**
* Get hierarchy depth from hyperbolic point
*/
hierarchyDepth(point: HyperbolicPoint): number {
const norm = Math.sqrt(point.coordinates.reduce((s, v) => s + v * v, 0));
return Math.atanh(Math.min(norm, 1 - POINCARE_BALL_EPS));
}
/**
* Create or get an index
*/
createIndex(id: string, dimension: number, curvature: number): void {
if (this._indices.has(id)) {
throw new Error(`Index ${id} already exists`);
}
this._indices.set(id, {
id,
embeddings: new Map(),
curvature,
dimension,
});
}
/**
* Add point to index
*/
addToIndex(indexId: string, nodeId: string, point: HyperbolicPoint): void {
const index = this._indices.get(indexId);
if (!index) {
throw new Error(`Index ${indexId} not found`);
}View on GitHub (pinned to fa13ee4ad6)
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.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/hyperbolic-bridge.ts:307 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/7a2b5c67b288c8a7.
Report an issue: GitHub.