{"record":{"id":"0c003e98ce1e66a8","repo":"ruvnet/ruflo","slug":"prime-radiant-wasm-module-not-found-using-mock","errorCode":null,"errorMessage":"[Prime Radiant] WASM module not found, using mock implementation","messagePattern":"\\[Prime Radiant\\] WASM module not found, using mock implementation","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/prime-radiant/src/plugin.ts","lineNumber":137,"sourceCode":"\n  /**\n   * Load the WASM module\n   * In production, this loads from 'prime-radiant-advanced-wasm'\n   */\n  private async loadWasmModule(): Promise<unknown> {\n    // Attempt to load the actual WASM module\n    try {\n      // Specifier behind a string var so tsc doesn't statically resolve this\n      // optionalDependency at build time (TS2307 when it isn't installed).\n      const pkg: string = 'prime-radiant-advanced-wasm';\n      const module = await import(pkg);\n      if (module.default) {\n        await module.default();\n      }\n      return module;\n    } catch {\n      // Fallback to mock implementation for development\n      console.warn('[Prime Radiant] WASM module not found, using mock implementation');\n      return { mock: true };\n    }\n  }\n\n  // Engine creation methods (scaffold implementations)\n  private createCohomologyEngine(): unknown {\n    return {\n      computeSheafLaplacianEnergy: (vectors: Float32Array[]): number => {\n        // Scaffold: compute simple variance-based coherence\n        if (vectors.length < 2) return 0;\n        const avgDist = this.computeAverageDistance(vectors);\n        return Math.min(1, avgDist);\n      },\n      detectContradictions: (vectors: Float32Array[]): string[] => {\n        const violations: string[] = [];\n        for (let i = 0; i < vectors.length; i++) {\n          for (let j = i + 1; j < vectors.length; j++) {\n            const dist = this.cosineSimilarity(vectors[i], vectors[j]);","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/prime-radiant/src/plugin.ts#L119-L155","documentation":"Fallback in PrimeRadiantPlugin.loadWasmModule(): the optional 'prime-radiant-advanced-wasm' package is not installed or failed to import, so the plugin falls back to a mock implementation. Advanced analyses will return mock data until the dependency is installed.","triggerScenarios":"Prime Radiant WASM artifact is not present at the expected path or fails to load; plugin substitutes a mock implementation so development flows continue without accelerated kernels.","commonSituations":"See trigger scenarios.","solutions":["Provide the Prime Radiant WASM module at the expected path so the real implementation loads.","Verify WASM build artifacts are included in the published package.","If running in an environment without WASM, ensure the mock is not used in production paths."],"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"}