{"record":{"id":"c6f1fd033b72d921","repo":"ruvnet/ruflo","slug":"learning-module-not-initialized","errorCode":null,"errorMessage":"Learning module not initialized","messagePattern":"Learning module not initialized","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/ruvector-upstream/src/bridges/learning.ts","lineNumber":110,"sourceCode":"\n  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(): LearningModule | null {\n    return this._module;\n  }\n\n  /**\n   * Train on trajectories\n   */\n  train(trajectories: Trajectory[], config?: Partial<LearningConfig>): number {\n    if (!this._module) throw new Error('Learning module not initialized');\n    const mergedConfig = { ...this.config, ...config };\n    return this._module.train(trajectories, mergedConfig);\n  }\n\n  /**\n   * Predict action for state\n   */\n  predict(state: Float32Array): { action: number; qValues: Float32Array } {\n    if (!this._module) throw new Error('Learning module not initialized');\n    return this._module.predict(state);\n  }\n\n  /**\n   * Evaluate state value\n   */\n  evaluate(state: Float32Array): number {\n    if (!this._module) throw new Error('Learning module not initialized');\n    return this._module.evaluate(state);","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/ruvector-upstream/src/bridges/learning.ts#L92-L128","documentation":"Guard in train: the lazily loaded LearningModule (_module) must exist before training on trajectories; the error fires when train is called before successful initialization or after destroy() nulled the module.","triggerScenarios":"Thrown at v3/plugins/ruvector-upstream/src/bridges/learning.ts:110 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"}