{"record":{"id":"57b32b2e8d8691a6","repo":"ruvnet/ruflo","slug":"sona-module-not-initialized","errorCode":null,"errorMessage":"SONA module not initialized","messagePattern":"SONA module not initialized","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts","lineNumber":183,"sourceCode":"  async destroy(): Promise<void> {\n    this._module = null;\n    this._status = 'unloaded';\n  }\n\n  isReady(): boolean {\n    return this._status === 'ready';\n  }\n\n  getModule(): SonaModule | null {\n    return this._module;\n  }\n\n  /**\n   * Learn from trajectories\n   * Returns improvement score (0-1)\n   */\n  learn(trajectories: SonaTrajectory[], config?: Partial<SonaConfig>): number {\n    if (!this._module) throw new Error('SONA module not initialized');\n    const mergedConfig = { ...this.config, ...config };\n    return this._module.learn(trajectories, mergedConfig);\n  }\n\n  /**\n   * Predict next action\n   */\n  predict(state: Float32Array): SonaPrediction {\n    if (!this._module) throw new Error('SONA module not initialized');\n    return this._module.predict(state);\n  }\n\n  /**\n   * Store a pattern\n   */\n  storePattern(pattern: SonaPattern): void {\n    if (!this._module) throw new Error('SONA module not initialized');\n    this._module.storePattern(pattern);","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts#L165-L201","documentation":"SonaBridge.learn() was called while the SONA WASM module is not loaded (this._module null). All module-backed methods on this bridge (learn, predict, ...) carry the same not-initialized guard; call initialize() successfully first.","triggerScenarios":"Thrown at v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:183 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":"type-guard","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-14T00:17:10.932Z"}