ruvnet/ruflo · error

[Prime Radiant] WASM module not found, using mock implementa

Error message

[Prime Radiant] WASM module not found, using mock implementation

What it means

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.

Source

Thrown at v3/plugins/prime-radiant/src/plugin.ts:137

  /**
   * 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;
    } catch {
      // Fallback to mock implementation for development
      console.warn('[Prime Radiant] WASM module not found, using mock implementation');
      return { mock: true };
    }
  }

  // Engine creation methods (scaffold implementations)
  private createCohomologyEngine(): unknown {
    return {
      computeSheafLaplacianEnergy: (vectors: Float32Array[]): number => {
        // Scaffold: compute simple variance-based coherence
        if (vectors.length < 2) return 0;
        const avgDist = this.computeAverageDistance(vectors);
        return Math.min(1, avgDist);
      },
      detectContradictions: (vectors: Float32Array[]): string[] => {
        const violations: string[] = [];
        for (let i = 0; i < vectors.length; i++) {
          for (let j = i + 1; j < vectors.length; j++) {
            const dist = this.cosineSimilarity(vectors[i], vectors[j]);

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Provide the Prime Radiant WASM module at the expected path so the real implementation loads.
  2. Verify WASM build artifacts are included in the published package.
  3. If running in an environment without WASM, ensure the mock is not used in production paths.
Defensive patterns

Strategy: fallback

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/0c003e98ce1e66a8. Report an issue: GitHub.