Bug Summary
SonaTrajectoryService (from the agentdb package) fails to properly integrate with the native @ruvector/sona engine, resulting in SONA trajectory learning being effectively disabled. The service stores the module object instead of instantiating a SonaEngine, and calls nonexistent methods (recordStep, record, addStep, predict, selectAction) instead of the actual native API.
This bug has existed since the file first appeared in [email protected] and is present in every version through alpha.10.
Source File Missing from Git
The SonaTrajectoryService TypeScript source file does not exist anywhere in the git source of ruvnet/agentic-flow (agentdb's repo) — not on main, not on any of the 18 feature branches, and not in the commit history. The file only exists in the npm-published dist/ directory.
This is part of a broader pattern: 4 service files and 5 controller files exist in the npm package but have no corresponding source in git.
Impact
- SONA native learning is completely non-functional — trajectories are never recorded in the native engine
- Pattern extraction fails —
findPatterns is never called
- The service silently falls back to a simple JavaScript frequency counter, giving the appearance of working while providing no actual RL-based learning
- All Micro-LoRA, EWC++, and pattern clustering features of
@ruvector/sona are bypassed
- The service reports
engineType: 'native' and available: true while doing nothing with the native engine
Root Cause (3 bugs)
Bug 1: initialize() — Module vs Instance
Looks for SONA/Sona class name instead of SonaEngine. Falls back to storing the raw module object.
Bug 2: recordTrajectory() — Nonexistent Methods
Calls recordStep(), record(), addStep() — none exist on SonaEngine. Silent catch {}.
Bug 3: predict() — Nonexistent Methods
Calls predict(), selectAction() — neither exist. Falls back to frequency counter.
Fix
PR submitted: ruvnet/agentic-flow#121
- Uses
SonaEngine.withConfig() for proper instantiation
- Uses
beginTrajectory → addTrajectoryStep → endTrajectory → tick() pipeline
- Uses
findPatterns() for pattern-based predictions
- 54/54 test assertions passing across 10 test categories
- Full backward compatibility maintained
Bug Summary
SonaTrajectoryService(from theagentdbpackage) fails to properly integrate with the native@ruvector/sonaengine, resulting in SONA trajectory learning being effectively disabled. The service stores the module object instead of instantiating aSonaEngine, and calls nonexistent methods (recordStep,record,addStep,predict,selectAction) instead of the actual native API.This bug has existed since the file first appeared in
[email protected]and is present in every version throughalpha.10.Source File Missing from Git
The
SonaTrajectoryServiceTypeScript source file does not exist anywhere in the git source ofruvnet/agentic-flow(agentdb's repo) — not onmain, not on any of the 18 feature branches, and not in the commit history. The file only exists in the npm-publisheddist/directory.This is part of a broader pattern: 4 service files and 5 controller files exist in the npm package but have no corresponding source in git.
Impact
findPatternsis never called@ruvector/sonaare bypassedengineType: 'native'andavailable: truewhile doing nothing with the native engineRoot Cause (3 bugs)
Bug 1:
initialize()— Module vs InstanceLooks for
SONA/Sonaclass name instead ofSonaEngine. Falls back to storing the raw module object.Bug 2:
recordTrajectory()— Nonexistent MethodsCalls
recordStep(),record(),addStep()— none exist on SonaEngine. Silentcatch {}.Bug 3:
predict()— Nonexistent MethodsCalls
predict(),selectAction()— neither exist. Falls back to frequency counter.Fix
PR submitted: ruvnet/agentic-flow#121
SonaEngine.withConfig()for proper instantiationbeginTrajectory→addTrajectoryStep→endTrajectory→tick()pipelinefindPatterns()for pattern-based predictions