ruvnet/ruflo · error
PR_COHERENCE_VIOLATION
PR_COHERENCE_VIOLATION
Error message
PR_COHERENCE_VIOLATION: Energy ${result.coherenceResult.energy.toFixed(3)} What it means
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.
Source
Thrown at v3/plugins/prime-radiant/src/plugin.ts:661
// Load WASM bundle (92KB)
await this.bridge.initialize();
// Store instances in plugin context
context.set('pr.bridge', this.bridge);
context.set('pr.coherenceGate', this.coherenceGate);
context.set('pr.cache', this.cache);
context.set('pr.config', this.config);
// Register with memory service if available
if (context.has('memory')) {
const memoryService = context.get<{
registerPreStoreHook: (hook: (entry: MemoryEntry) => Promise<MemoryEntry>) => void;
}>('memory');
memoryService.registerPreStoreHook(async (entry: MemoryEntry) => {
const result = await this.coherenceGate.validate(entry);
if (result.action === 'reject') {
throw new Error(
`${PrimeRadiantErrorCodes.COHERENCE_VIOLATION}: Energy ${result.coherenceResult.energy.toFixed(3)}`
);
}
return entry;
});
}
return { success: true };
} catch (error) {
return {
success: false,
error: error instanceof Error ? error.message : 'Unknown error',
};
}
}
/**
* Shutdown the plugin (cleanup WASM resources)View on GitHub (pinned to fa13ee4ad6)
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.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/plugins/prime-radiant/src/plugin.ts:661 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/0524c86a0c48c238.
Report an issue: GitHub.