{"record":{"id":"4d66055ac0153eb5","repo":"ruvnet/ruflo","slug":"wasm-not-available","errorCode":null,"errorMessage":"WASM not available","messagePattern":"WASM not available","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/plugins/gastown-bridge/src/wasm-loader.ts","lineNumber":125,"sourceCode":"\n// ============================================================================\n// Module Cache - Lazy Loading with LazyWasm\n// ============================================================================\n\n/** WASM availability flag */\nlet wasmAvailable: boolean | null = null;\n/** Performance timings log */\nconst performanceLog: PerformanceTiming[] = [];\n\n/**\n * Lazy loader for gastown-formula-wasm module.\n * Only loads WASM when first accessed, not during startup.\n * Supports idle timeout for memory cleanup.\n */\nconst lazyFormulaWasm = new LazyWasm<FormulaWasmExports>(\n  async () => {\n    if (!isWasmAvailable()) {\n      throw new Error('WASM not available');\n    }\n    const module = await import('gastown-formula-wasm') as unknown as FormulaWasmExports;\n    if (typeof module.default === 'function') {\n      await module.default();\n    }\n    return module;\n  },\n  {\n    name: 'gastown-formula-wasm',\n    idleTimeout: 5 * 60 * 1000, // 5 minutes idle timeout for memory cleanup\n    onError: (error) => {\n      console.debug('[WASM Loader] gastown-formula-wasm load error:', error);\n    },\n  }\n);\n\n/**\n * Lazy loader for ruvector-gnn-wasm module.","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/gastown-bridge/src/wasm-loader.ts#L107-L143","documentation":"The gastown-formula WASM module is unavailable — wasmAvailable is false (module not installed, failed to load, or platform unsupported) and something required the native path. Operations needing the WASM exports cannot run; use the JS fallback or install the module.","triggerScenarios":"Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:125 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":"fallback","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"}