{"record":{"id":"4ba9ebafe730ac4f","repo":"ruvnet/ruflo","slug":"hnsw-index-not-initialized","errorCode":null,"errorMessage":"HNSW index not initialized","messagePattern":"HNSW index not initialized","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/ruvector-upstream/src/bridges/hnsw.ts","lineNumber":101,"sourceCode":"    return this._status === 'ready';\n  }\n\n  getModule(): HnswModule | null {\n    return this._module;\n  }\n\n  /**\n   * Get the HNSW index\n   */\n  getIndex(): HnswIndex | null {\n    return this._index;\n  }\n\n  /**\n   * Add a vector to the index\n   */\n  add(id: string, vector: Float32Array, metadata?: Record<string, unknown>): void {\n    if (!this._index) throw new Error('HNSW index not initialized');\n    this._index.add(id, vector, metadata);\n  }\n\n  /**\n   * Search for similar vectors\n   */\n  search(query: Float32Array, k: number): SearchResult[] {\n    if (!this._index) throw new Error('HNSW index not initialized');\n    return this._index.search(query, k);\n  }\n\n  /**\n   * Remove a vector from the index\n   */\n  remove(id: string): boolean {\n    if (!this._index) throw new Error('HNSW index not initialized');\n    return this._index.remove(id);\n  }","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/ruvector-upstream/src/bridges/hnsw.ts#L83-L119","documentation":"add() was called while this._index is null — the HNSW index has not been created because module initialization hasn't completed or failed. Sentinel guard: vectors cannot be inserted until an index instance exists.","triggerScenarios":"Thrown at v3/plugins/ruvector-upstream/src/bridges/hnsw.ts:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the module/bridge/plugin initialize() method has been called and awaited before invoking this operation.","Guard against calls made during startup: await the initialization promise or check the initialized flag and fail fast with a clear setup hint."],"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"}