ruvnet/ruflo · error
[WASM Loader] topo_sort failed, using fallback:
Error message
[WASM Loader] topo_sort failed, using fallback:
What it means
Log warning in topoSort: the WASM topo_sort call on the serialized nodes/edges threw; topological ordering is computed by the JS fallback instead.
Source
Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:971
return cached;
}
// Use batch deduplication for concurrent requests
return graphDedup.dedupe(cacheKey, async () => {
const wasmModule = await loadGnnWasm();
if (wasmModule) {
try {
const resultJson = wasmModule.topo_sort(
JSON.stringify(nodes),
JSON.stringify(edges)
);
const result = JSON.parse(resultJson) as TopoSortResult;
topoSortCache.set(cacheKey, result);
recordTiming('topoSort', startTime, true);
return result;
} catch (error) {
console.warn('[WASM Loader] topo_sort failed, using fallback:', error);
}
}
// JavaScript fallback
const result = topoSortFallback(nodes, edges);
topoSortCache.set(cacheKey, result);
recordTiming('topoSort', startTime, false);
return result;
});
}
/**
* Detect cycles in a dependency graph.
* Uses WASM if available (150x faster), falls back to JavaScript.
*
* @param nodes - Array of node identifiers
* @param edges - Array of edges (from -> to dependencies)
* @returns Cycle detection resultView on GitHub (pinned to fa13ee4ad6)
Solutions
- Check the graph input and the WASM topo_sort error; the JS fallback is used — verify the dependency graph is well-formed.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:971 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/58078abe4fc1a9a6.
Report an issue: GitHub.