{"record":{"id":"03338101d36e9897","repo":"ruvnet/ruflo","slug":"wasm-attention-module-not-available-using-js-fall","errorCode":null,"errorMessage":"WASM attention module not available, using JS fallback","messagePattern":"WASM attention module not available, using JS fallback","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/legal-contracts/src/bridges/attention-bridge.ts","lineNumber":91,"sourceCode":"  constructor(embeddingDim = 384) {\n    this.embeddingDim = embeddingDim;\n  }\n\n  /**\n   * Initialize the WASM module\n   */\n  async initialize(): Promise<void> {\n    if (this.initialized) return;\n\n    try {\n      // Dynamic import of WASM module\n      // In production, this would load from @claude-flow/ruvector-upstream\n      const wasmModule = await this.loadWasmModule();\n      this.wasmModule = wasmModule;\n      this.initialized = true;\n    } catch (error) {\n      // Fallback to pure JS implementation if WASM not available\n      console.warn('WASM attention module not available, using JS fallback');\n      this.wasmModule = null;\n      this.initialized = true;\n    }\n  }\n\n  /**\n   * Check if initialized\n   */\n  isInitialized(): boolean {\n    return this.initialized;\n  }\n\n  /**\n   * Compute cross-attention between clause embeddings\n   */\n  async computeCrossAttention(\n    queryEmbeddings: Float32Array[],\n    keyEmbeddings: Float32Array[],","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/legal-contracts/src/bridges/attention-bridge.ts#L73-L109","documentation":"Fallback in AttentionBridge.initialize(): dynamic import of the WASM attention module failed, so the bridge continues with the pure-JS cross-attention implementation. Results remain correct; only throughput is affected.","triggerScenarios":"Attention WASM module unavailable (missing build artifact or instantiation failure); legal-contracts bridge falls back to the JS attention implementation.","commonSituations":"See trigger scenarios.","solutions":["Ensure the WASM attention module is built and its path resolves so the native implementation loads.","Verify runtime WebAssembly support and any required feature flags.","If the JS fallback is acceptable, no action needed; otherwise fix the init-time load error."],"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"}