Issue Summary
Upstream Issue: ruvnet/RuVector#216
GNNService in agentic-flow incorrectly passes config.layers instead of config.heads to the RuvectorLayer constructor, causing dimension mismatch errors.
Problem
// Current (WRONG)
const layer = new RuvectorLayer(config.layers); // Should be config.heads
// Example: config = { heads: 8, layers: 3 }
// Result: Tries to create layer with 128 % 3 ≠ 0 (invalid)
Impact
- Severity: Medium (GNN routing fails to initialize)
- Affected: GNNService, gnn-tools.ts (6 MCP tools)
- Workaround: Use correct head count in config
- Fix Location:
agentic-flow/src/services/gnn-router-service.ts
Root Cause
Two-part issue:
- agentic-flow (us): Passes wrong config parameter
- ruvector (upstream): Uses panic instead of Result (fatal in FFI)
Temporary Fix (Our Side)
```typescript
// In GNNService constructor
- const layer = new RuvectorLayer(config.layers);
- const layer = new RuvectorLayer(config.heads);
```
Upstream Fix Needed
@ruvector/gnn needs to return Result instead of panic:
```rust
// Current
pub fn new(num_heads: usize) -> Self {
assert!(EMBEDDING_DIM % num_heads == 0); // PANICS
// Proposed
pub fn new(num_heads: usize) -> Result<Self, GnnError> {
if EMBEDDING_DIM % num_heads != 0 {
return Err(GnnError::InvalidHeads { ... });
}
Ok(Self { ... })
}
```
Action Items
Files to Update
- `agentic-flow/src/services/gnn-router-service.ts` - Fix constructor call
- `tests/integration/gnn-activation.test.ts` - Update test configs
- `agentic-flow/src/mcp/fastmcp/tools/gnn-tools.ts` - Add config validation
Related
Priority
P1 - Blocks GNN routing functionality, but has workaround.
Issue Summary
Upstream Issue: ruvnet/RuVector#216
GNNService in agentic-flow incorrectly passes
config.layersinstead ofconfig.headsto the RuvectorLayer constructor, causing dimension mismatch errors.Problem
Impact
agentic-flow/src/services/gnn-router-service.tsRoot Cause
Two-part issue:
Temporary Fix (Our Side)
```typescript
// In GNNService constructor
```
Upstream Fix Needed
@ruvector/gnn needs to return Result instead of panic:
```rust
// Current
pub fn new(num_heads: usize) -> Self {
assert!(EMBEDDING_DIM % num_heads == 0); // PANICS
// Proposed
pub fn new(num_heads: usize) -> Result<Self, GnnError> {
if EMBEDDING_DIM % num_heads != 0 {
return Err(GnnError::InvalidHeads { ... });
}
Ok(Self { ... })
}
```
Action Items
Files to Update
Related
Priority
P1 - Blocks GNN routing functionality, but has workaround.