-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
- Fix GNNService parameter (agentic-flow)
- Update tests to use correct config
- Wait for upstream Result-based constructor
- Update to @ruvector/gnn with proper error handling
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
- Upstream: fix(ruvector-gnn): RuvectorLayer constructor panics instead of returning Result RuVector#216
- ADR-065: P1 Intelligent Agents (GNN routing)
- Test: `tests/integration/gnn-activation.test.ts`
Priority
P1 - Blocks GNN routing functionality, but has workaround.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working