ruvnet/ruflo · error · Error
GnnBridge not initialized
Error message
GnnBridge not initialized
What it means
GnnBridge.forward() found this._module null — the module was never loaded (initialize() not called, failed with error status, or dispose() ran). The forward pass is refused rather than executing on a missing module; the same guard protects the other bridge methods.
Source
Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:194
this._status = 'error';
throw new Error(`Failed to initialize GnnBridge: ${error instanceof Error ? error.message : String(error)}`);
}
}
/**
* Dispose of resources
*/
async dispose(): Promise<void> {
this._module = null;
this._status = 'unloaded';
}
/**
* Forward pass through GNN
*/
forward(graph: Graph, config: Partial<GnnConfig> = {}): GnnResult {
if (!this._module) {
throw new Error('GnnBridge not initialized');
}
const mergedConfig = { ...this._config, ...config };
// Message passing layers
let embeddings = graph.nodeFeatures.map(f => new Float32Array(f));
for (let layer = 0; layer < mergedConfig.numLayers; layer++) {
const newEmbeddings = embeddings.map(emb => new Float32Array(mergedConfig.hiddenDim).fill(0));
// Aggregate neighbor messages
for (const [src, tgt] of graph.edges) {
const srcEmb = embeddings[src];
const weight = graph.edgeWeights?.[graph.edges.indexOf([src, tgt] as [number, number])] ?? 1;
if (srcEmb) {
for (let i = 0; i < Math.min(srcEmb.length, mergedConfig.hiddenDim); i++) {
newEmbeddings[tgt]![i] += srcEmb[i]! * weight;View on GitHub (pinned to fa13ee4ad6)
Solutions
- Ensure the module/bridge/plugin initialize() method has been called and awaited before invoking this operation.
- Guard against calls made during startup: await the initialization promise or check the initialized flag and fail fast with a clear setup hint.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at v3/plugins/hyperbolic-reasoning/src/bridges/gnn-bridge.ts:194 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/590a93798ee5afed.
Report an issue: GitHub.