mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 22:53:17 +09:00
Resolves the "four contradictory stat sources" item ADR-074 deferred to a future round. Turns out the four sources aren't duplicates — they authoritatively measure four different layers (globalStats = trajectory-pipeline counters, sonaCoordinator = in-process SONA, memory-bridge = AgentDB entries, neural-patterns = neural store rows). So the fix is to aggregate the *view*, not the store. - getUnifiedLearningStats() — returns all 4 sub-views with each sub-view naming its source path, plus a consistency block that *flags* cross-store drift (e.g. globalStats reports N patterns but neural_patterns is empty) instead of silently disagreeing. - hooks_intelligence_unified-stats — new MCP tool exposing it. - getMemoryBridgeStats() + getNeuralStoreStats() — exported helpers so any caller wanting a coherent learning-state snapshot uses the same primitives. Verification: - 7 cross-store consistency tests (__tests__/unified-stats-2245.test.ts) - Benchmark §F added — observed: globalStats=10/11 tracks SONA, bridge=10 rows, neural-patterns=10, sona.available=true, 1 consistency note (the pretrain- vs-neural-store gap the reporter caught in #2245) - 123/123 across unified-stats + self-learning + mcp-tools-deep bump 3.10.14 → 3.10.15. Co-Authored-By: RuFlo <ruv@ruv.net>
73 lines
1.9 KiB
JSON
73 lines
1.9 KiB
JSON
{
|
|
"runAt": "2026-05-30T16:00:50.536Z",
|
|
"benchmark": "self-learning-2245",
|
|
"n": 10,
|
|
"sections": {
|
|
"A_recordSignalProcessed": {
|
|
"calls": 10,
|
|
"signalsProcessedDelta": 10,
|
|
"passed": true,
|
|
"elapsedMs": 0.46
|
|
},
|
|
"B_taskCompleted_trainPatterns": {
|
|
"calls": 10,
|
|
"trainedViaPipeline": 10,
|
|
"trajectoriesDelta": 10,
|
|
"patternsLearnedDelta": 11,
|
|
"passed": true,
|
|
"elapsedMs": 201.32,
|
|
"avgLatencyMsPerCall": 20.13
|
|
},
|
|
"C_taskCompleted_recordedOnly": {
|
|
"calls": 10,
|
|
"trajectoriesDelta": 0,
|
|
"passed": true,
|
|
"note": "negative control — should NOT touch trajectories",
|
|
"elapsedMs": 0.04
|
|
},
|
|
"D_pretrain_neuralPatterns": {
|
|
"attempted": 10,
|
|
"stored": 10,
|
|
"listTotal": 10,
|
|
"passed": true,
|
|
"elapsedMs": 5.07
|
|
},
|
|
"E_multiStepTrajectory": {
|
|
"cycles": 5,
|
|
"persistedCount": 5,
|
|
"sonaUpdateCount": 5,
|
|
"passed": true,
|
|
"note": "MCP trajectory tools feed sonaCoordinator (see hooks_intelligence_stats), not globalStats — observable outcomes checked here",
|
|
"elapsedMs": 31.15
|
|
},
|
|
"F_unifiedStats": {
|
|
"shape": [
|
|
"global",
|
|
"sona",
|
|
"memoryBridge",
|
|
"neuralPatterns",
|
|
"consistency"
|
|
],
|
|
"observed": {
|
|
"global.patternsLearned": 11,
|
|
"global.trajectoriesRecorded": 10,
|
|
"global.signalsProcessed": 20,
|
|
"memoryBridge.totalEntries": 10,
|
|
"memoryBridge.reachable": true,
|
|
"neuralPatterns.patternCount": 10,
|
|
"sona.available": true,
|
|
"consistency.notes": 1
|
|
},
|
|
"passed": true,
|
|
"note": "ADR-075 — one aggregator across the 4 stores. Each sub-view names its source.",
|
|
"elapsedMs": 5.87
|
|
}
|
|
},
|
|
"finalState": {
|
|
"signalsProcessed": 10,
|
|
"trajectoriesRecorded": 10,
|
|
"patternsLearned": 11
|
|
},
|
|
"scratch": "/tmp/claude-501/learn-bench-m5Fe9p",
|
|
"passed": true
|
|
} |