ruvnet/ruflo · error
SONA module not initialized
Error message
SONA module not initialized
What it means
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.
Source
Thrown at v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:183
async destroy(): Promise<void> {
this._module = null;
this._status = 'unloaded';
}
isReady(): boolean {
return this._status === 'ready';
}
getModule(): SonaModule | null {
return this._module;
}
/**
* Learn from trajectories
* Returns improvement score (0-1)
*/
learn(trajectories: SonaTrajectory[], config?: Partial<SonaConfig>): number {
if (!this._module) throw new Error('SONA module not initialized');
const mergedConfig = { ...this.config, ...config };
return this._module.learn(trajectories, mergedConfig);
}
/**
* Predict next action
*/
predict(state: Float32Array): SonaPrediction {
if (!this._module) throw new Error('SONA module not initialized');
return this._module.predict(state);
}
/**
* Store a pattern
*/
storePattern(pattern: SonaPattern): void {
if (!this._module) throw new Error('SONA module not initialized');
this._module.storePattern(pattern);View on GitHub (pinned to fa13ee4ad6)
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.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at v3/plugins/cognitive-kernel/src/bridges/sona-bridge.ts:183 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/57b32b2e8d8691a6.
Report an issue: GitHub.