You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SONA N-API applyMicroLora returns zero/delta instead of identity plus delta #706
AgentDB's SonaLearningBackend.enhance() returns the same zero vector before training.
After one raw trajectory followed by explicit flush(), applyMicroLora() returns a small nonzero delta, but still not the original input plus the learned delta.
Root cause
The Rust LoRA forward path has residual semantics: it adds the learned delta into the provided output buffer.
The N-API bindings in crates/sona/src/napi_simple.rs and crates/sona/src/napi.rs initialize that output buffer with zeros. Therefore the JavaScript API returns only the delta. AgentDB then replaces the query embedding with that returned value.
Impact
Before any learning, every enhanced query becomes the exact zero vector. After learning, queries become only a small adjustment vector rather than identity plus adjustment. This can collapse or badly distort retrieval rankings whenever SONA enhancement is enabled.
Requested fix
Initialize the micro-LoRA and base-LoRA output buffers from a clone of the input before invoking the Rust forward method.
Please add:
A cold-start identity test.
A post-feedback non-identity test.
AgentDB integration coverage confirming that a cold query is preserved rather than zeroed.
Resolved by #708 and published in @ruvector/sona@0.1.8. Both N-API paths now seed residual outputs from the input, with cold-start identity and post-feedback regression coverage in npm/packages/sona/test/basic.test.js.
Activity
fix: SONA zero-vector bug, RVF wasm persistence, metadata safety, doc…
chore(sona): bump @ruvector/sona to 0.1.8
ruvnet commentedon Jul 27, 2026
Resolved by #708 and published in @ruvector/sona@0.1.8. Both N-API paths now seed residual outputs from the input, with cold-start identity and post-feedback regression coverage in npm/packages/sona/test/basic.test.js.