ruvnet/ruflo · error
PR_WASM_NOT_INITIALIZED
PR_WASM_NOT_INITIALIZED
Error message
PR_WASM_NOT_INITIALIZED
What it means
ensureInitialized() found this.initialized false — a PrimeRadiant operation was invoked before initialize() completed or after dispose(). The sentinel (PrimeRadiantErrorCodes.WASM_NOT_INITIALIZED) guards every engine-touching entry point.
Source
Thrown at v3/plugins/prime-radiant/src/plugin.ts:116
isInitialized(): boolean {
return this.initialized;
}
async dispose(): Promise<void> {
// Cleanup WASM resources
this.cohomologyEngine = null;
this.spectralEngine = null;
this.causalEngine = null;
this.quantumEngine = null;
this.categoryEngine = null;
this.hottEngine = null;
this.wasmModule = null;
this.initialized = false;
}
private ensureInitialized(): void {
if (!this.initialized) {
throw new Error(PrimeRadiantErrorCodes.WASM_NOT_INITIALIZED);
}
}
/**
* Load the WASM module
* In production, this loads from 'prime-radiant-advanced-wasm'
*/
private async loadWasmModule(): Promise<unknown> {
// Attempt to load the actual WASM module
try {
// Specifier behind a string var so tsc doesn't statically resolve this
// optionalDependency at build time (TS2307 when it isn't installed).
const pkg: string = 'prime-radiant-advanced-wasm';
const module = await import(pkg);
if (module.default) {
await module.default();
}
return module;View on GitHub (pinned to fa13ee4ad6)
Solutions
- Inspect the underlying cause in logs, fix the root issue, and retry the operation.
- Validate inputs and preconditions before invoking this code path so the error is avoided.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at v3/plugins/prime-radiant/src/plugin.ts:116 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/1c1093c0478802bf.
Report an issue: GitHub.