{"record":{"id":"0524c86a0c48c238","repo":"ruvnet/ruflo","slug":"pr-coherence-violation","errorCode":"PR_COHERENCE_VIOLATION","errorMessage":"PR_COHERENCE_VIOLATION: Energy ${result.coherenceResult.energy.toFixed(3)}","messagePattern":"PR_COHERENCE_VIOLATION: Energy (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/plugins/prime-radiant/src/plugin.ts","lineNumber":661,"sourceCode":"      // Load WASM bundle (92KB)\n      await this.bridge.initialize();\n\n      // Store instances in plugin context\n      context.set('pr.bridge', this.bridge);\n      context.set('pr.coherenceGate', this.coherenceGate);\n      context.set('pr.cache', this.cache);\n      context.set('pr.config', this.config);\n\n      // Register with memory service if available\n      if (context.has('memory')) {\n        const memoryService = context.get<{\n          registerPreStoreHook: (hook: (entry: MemoryEntry) => Promise<MemoryEntry>) => void;\n        }>('memory');\n\n        memoryService.registerPreStoreHook(async (entry: MemoryEntry) => {\n          const result = await this.coherenceGate.validate(entry);\n          if (result.action === 'reject') {\n            throw new Error(\n              `${PrimeRadiantErrorCodes.COHERENCE_VIOLATION}: Energy ${result.coherenceResult.energy.toFixed(3)}`\n            );\n          }\n          return entry;\n        });\n      }\n\n      return { success: true };\n    } catch (error) {\n      return {\n        success: false,\n        error: error instanceof Error ? error.message : 'Unknown error',\n      };\n    }\n  }\n\n  /**\n   * Shutdown the plugin (cleanup WASM resources)","sourceCodeStart":643,"sourceCodeEnd":679,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/prime-radiant/src/plugin.ts#L643-L679","documentation":"The pre-store coherence hook ran a memory entry through the WASM coherence check and its energy exceeded the acceptable bound, so the entry is refused storage (error code PR_COHERENCE_VIOLATION). The measured energy value is embedded; the entry violates the coherence gate's energy criterion.","triggerScenarios":"Thrown at v3/plugins/prime-radiant/src/plugin.ts:661 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"validation","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"}