Repository navigation
fix: SONA zero-vector bug, RVF wasm persistence, metadata safety (#704, #705, #706, #707) - #708
Merged
Merged
Conversation
… gaps - #706: apply_micro_lora/apply_base_lora seeded their output buffer with zeros in napi.rs, napi_simple.rs, and wasm.rs, but the Rust LoRA forward pass has residual semantics (adds delta into the buffer). Cold queries collapsed to the zero vector, and post-feedback queries returned only the delta instead of input+delta. Fixed by seeding with a clone of the input in all three binding layers. Added regression tests. - #705: WasmBackend had no byte-level persistence. The underlying rvf_store_export/rvf_store_open C-ABI functions already existed — wired them into WasmBackend.exportBytes()/openBytes() and RvfDatabase.exportBytes()/openBytes(), verified against the real compiled .wasm binary. - #704: NodeBackend.ingestBatch() silently dropped RvfIngestEntry.metadata instead of forwarding it, and query() filter serialization omitted the native parser's required valueType. Since a full field-name-to-id design for metadata durability is a larger follow-up, applied the issue's own suggested interim fix: ingest now throws MetadataNotSupported instead of silently losing data. Filter serialization now infers and includes valueType. - #707: docs/api/NODEJS_API.md and docs/guides/ADVANCED_FEATURES.md advertised HybridSearch/FilteredSearch/MMRSearch/ConformalPredictor as Node exports; none are bound by crates/ruvector-node. Corrected with explicit "not yet shipped" notes pointing at the tracking issue. README corrections for #705/#707 (WasmRvfStore, HybridSearch docs) are staged separately — a repo hook requires a visual design-grade ritual for any README change that this session cannot complete (no browser/screenshot access), so they'll follow once that's resolved. Co-Authored-By: claude-flow <ruv@ruv.net>
ruvnet
added a commit
that referenced
this pull request
Jul 17, 2026
crates/rvf/README.md and npm/packages/rvf-wasm/README.md described an unshipped WasmRvfStore class. Corrected both to show the actual @ruvector/rvf WasmBackend usage, including the new exportBytes()/ openBytes() persistence API from #708. Co-Authored-By: claude-flow <ruv@ruv.net>
This was referenced Jul 17, 2026
This was referenced Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apply_micro_lora/apply_base_loraseeded their output buffer with zeros innapi.rs,napi_simple.rs, andwasm.rs, but the Rust LoRA forward pass has residual semantics (adds the delta into the buffer). Cold queries returned the zero vector; post-feedback queries returned only the delta instead of input+delta. Fixed by seeding the output buffer with a clone of the input in all three binding layers. Added 3 regression tests tonpm/packages/sona/test/basic.test.js(verified they fail on the old code, pass on the fix, via a real build of the native addon).WasmBackendhad no byte-level persistence. The underlyingrvf_store_export/rvf_store_openC-ABI functions already existed incrates/rvf/rvf-wasm— wired them intoWasmBackend.exportBytes()/openBytes()andRvfDatabase.exportBytes()/openBytes(). Verified end-to-end against the real compiled.wasmbinary (round-trips vectors through export → reopen).NodeBackend.ingestBatch()silently droppedRvfIngestEntry.metadatainstead of forwarding it to native, andquery()filter serialization omitted the native parser's requiredvalueType. A full field-name↔fieldId design for durable metadata is a larger follow-up (native metadata also doesn't survive close/reopen at the Rust level — separate issue), so this PR applies the issue's own suggested interim fix: ingest now throwsMetadataNotSupportedinstead of silently losing data. Filter serialization now infers and includesvalueType. 8 new tests.docs/api/NODEJS_API.mdanddocs/guides/ADVANCED_FEATURES.mdadvertisedHybridSearch/FilteredSearch/MMRSearch/ConformalPredictoras Node exports; none are bound bycrates/ruvector-node. Corrected with explicit "not yet shipped" notes.Not included in this PR: README corrections for
crates/rvf/README.mdandnpm/packages/rvf-wasm/README.md(both also describe the unshippedWasmRvfStoreclass). A local repo hook requires a screenshot-based visual design-grade for any README change that I can't complete in this environment (no browser/screenshot access) — will follow in a separate PR once that's sorted out, or feel free to fold the diff in yourself; it's a pure doc correction with no code risk.Test plan
cargo build -p ruvector-sona --features napi— compiles cleannpm run build:debuginnpm/packages/sona) and rannpm test— 14/14 pass including 3 new SONA N-API applyMicroLora returns zero/delta instead of identity plus delta #706 testsnpx tsc --noEmitinnpm/packages/rvf— cleanrvf-wasmmodule path and ran newtest-wasm-persistence.jsagainst the actual shipped.wasmbinary — 3/3 passnode tests/test-metadata-and-filters.js— 8/8 passnpm/packages/rvf/tests/*andnpm/packages/sona/test/*suites — no regressionsCo-Authored-By: claude-flow ruv@ruv.net