mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-07-10 01:38:44 +00:00
2817 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c87541c950 |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
RuvLLM Benchmarks / Linux Benchmarks (NEON baseline) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (ubuntu-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (windows-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (macos-latest) (push) Has been cancelled
RuvLTRA-Small Tests / E2E Tests (macos-latest) (push) Has been cancelled
RuvLTRA-Small Tests / E2E Tests (ubuntu-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Apple Silicon Tests (push) Has been cancelled
RuvLTRA-Small Tests / Quantization Accuracy (push) Has been cancelled
RuvLTRA-Small Tests / Thread Safety (push) Has been cancelled
RuvLTRA-Small Tests / Performance Benchmarks (push) Has been cancelled
RuvLTRA-Small Tests / Stress Tests (push) Has been cancelled
RuvLTRA-Small Tests / Code Quality (push) Has been cancelled
RuvLTRA-Small Tests / Test Coverage (push) Has been cancelled
supply-chain / dependency-review (PRs only) (push) Has been cancelled
supply-chain / cargo audit (RustSec advisories) (push) Has been cancelled
supply-chain / cargo deny (license + source + ban policy) (push) Has been cancelled
supply-chain / npm audit (npm/ workspace) (push) Has been cancelled
supply-chain / lockfile integrity (Cargo.lock) (push) Has been cancelled
WASM Dedup Check / check-wasm-dedup (push) Has been cancelled
Benchmarks / Compare with Baseline (push) Has been cancelled
Build Native Modules / Commit Built Binaries (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Unit & CLI tests (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Functional smoke (npx ruvector) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Learning check (HNSW activates) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Performance benchmark (≥2× speedup at N=5000) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Recall quality (recall@10 ≥ 0.88 at N=10k) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Tarball integrity (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / CI pass (push) Has been cancelled
RuvLLM Benchmarks / Compare Benchmarks (push) Has been cancelled
RuvLTRA-Small Tests / Test Summary (push) Has been cancelled
Built from commit
|
||
|
|
4dd7f61a36 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
d13729a0a8 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
794d8c7026 |
chore(release): @ruvector/rvf 0.2.3, ruvector 0.2.34 (#641 fixes)
Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_017sXWL4ox5bhC86FYwJpmyK |
||
|
|
34390efe56
|
feat(ruvllm): add lattice as an optional macOS Metal LlmBackend (#642)
* feat(ruvllm): add lattice as an optional macOS LlmBackend Adds LatticeBackend, a pluggable LlmBackend implementation over lattice-inference's pure-Rust Qwen3.5 Metal GPU forward pass, gated behind a new default-OFF `lattice` feature (macOS-only: dependency under [target.'cfg(target_os = "macos")'.dependencies], module gated #[cfg(all(feature = "lattice", target_os = "macos"))]). - MetalQwen35State (!Send) is owned by a dedicated worker thread, mirroring lattice_serve.rs's spawn_worker/run_worker_loop pattern, but over plain std::sync::mpsc (TokenStream is std-mpsc-backed). - generate_stream_v2 streams every real decoded token via generate_streaming_with_cancel, unlike candle's prefill-only stream stub. - get_embeddings returns RuvLLMError::NotImplemented (honest, per ratified O1) rather than a fake zero vector. - create_backend() precedence: lattice (if enabled) > candle > NoopBackend. Root Cargo.toml carries an uncommitted dev-only [patch.crates-io] pointing lattice-inference at a local checkout; not included in this commit. * fix(ruvllm): enforce stop strings + reject unsupported penalties in LatticeBackend Codex round-1 fixes: - MAJOR 1: lattice's Metal generation loops honor EOS/stop_token_ids but not GenerateConfig::stop_strings, so callers' stop_sequences were silently ignored. Added StopScan: incremental stop-string scanner that holds back the longest possible stop prefix (char-boundary safe), excludes the matched stop from output, and halts generation through the token callback. Both generate (via the streaming loop, so a match actually stops decode) and generate_stream_v2 route through it; no stop strings = zero-overhead path. - MAJOR 2: frequency_penalty/presence_penalty are live ruvllm fields (serving/engine.rs:547, mistral_backend.rs:907), not dead ones; nonzero values now fail fast with NotImplemented instead of being silently dropped. - MINOR 3: em dashes removed from all added lines (repo prose lint). - 6 non-GPU unit tests: StopScan cut/holdback/multi-stop/UTF-8 + penalty rejection on both entry points. * chore(ruvllm): bump lattice-inference to 0.5 * fix(ruvllm): adapt LatticeBackend to lattice-inference 0.5 Result APIs generate and generate_streaming_with_cancel return Result in lattice 0.5; propagate failures as RuvLLMError::Backend on the once path and StreamEvent::Error on the stream path instead of unwrapping. * bench(ruvllm): add lattice_bench example, reproducible backend throughput harness Measures load time, TTFT, and decode throughput for the lattice backend (stream and blocking legs), with a BENCH_GREEDY env toggle so results can be compared against greedy standalone-engine numbers using the same prefill-canceling slope method. The candle backend is timed via blocking generate() only; its generate_stream_v2 emits a single token from prefill logits and is not a decode loop. Feature-gated: builds as a stub without the lattice feature. * docs(ruvllm): model-prep guide for lattice_bench + rustfmt The bench doc header now walks through obtaining a runnable model dir: f16 safetensors straight from HuggingFace, or quantizing with lattice's quantize_q4 and copying tokenizer.json + config.json next to the .q4 output (the quantizer writes weights only). Documents all flags and the BENCH_GREEDY toggle. README points to it from the lattice section. Also applies rustfmt to lattice_backend.rs (import order, comment alignment). * fix(ruvllm): derive safetensors precision label from torch_dtype, not hard-coded Bf16 load_worker_state stamped every safetensors checkpoint as Quantization::Bf16, so an f16/f32 checkpoint got a false precision label in ModelInfo and a wrong bytes_per_weight in the num_parameters estimate. Read torch_dtype from the already-open config.json instead — the same honesty guard lattice_bench.rs applies to the candle side — falling back to Bf16 (the Qwen3.5 release dtype and the previous fixed label) when the field is missing or unmapped, since a label must not fail a load that from_safetensors already accepted. Verified on macOS arm64 (M4, Metal): cargo test -p ruvllm --features lattice green, including the new safetensors_precision_label_follows_torch_dtype test. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_017sXWL4ox5bhC86FYwJpmyK --------- Co-authored-by: ruvnet <ruv@ruv.net> |
||
|
|
9dc244f1af
|
fix(rvf, ruvector): dimension/dimensions alias, working MCP rvf_create, embed-text stdin (#641) (#644)
* perf(hnsw): 4-accumulator AVX-512 kernels + SIMD wiring into search hot path - Replace single-accumulator AVX-512 distance kernels with 4-accumulator versions in simd_intrinsics.rs (euclidean, cosine, dot, manhattan). On Zen 5 with 4-cycle FMA latency, single-accumulator was latency-bound (96 cycles for 384-dim); 4-accumulator hides this to ~24 cycles. - Wire HNSW search hot path in DistanceFn::eval to call simd_intrinsics directly (inline, no Result wrapping, no simsimd FFI overhead). - Enable parallel batch insert via hnsw_rs::parallel_insert_slice (rayon). Measured: 6-10% QPS improvement on 128-dim/1K-vector bench; larger gains expected on 1M-vector workloads where distance computation dominates. 228 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * perf(hnsw): gate parallel_insert_slice behind 10K-vector threshold Rayon-based parallel insert (hnsw_rs::parallel_insert_slice) degrades graph connectivity for small batches (<10K vectors) because worker threads can't see each other's in-flight insertions, reducing optimal neighbor links. Add PARALLEL_THRESHOLD=10_000: use parallel insert only when the batch is large enough that the graph quality converges. Below threshold: sequential insert_data (same as before this PR). Above threshold: parallel_insert_slice for build-time speedup. 228 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * bench(sift1m): add SIFT-1M fvecs benchmark + hnswlib comparison tooling Adds two benchmark binaries driven by the real TEXMEX SIFT-1M dataset: * crates/ruvector-sota-bench/src/bin/sift1m_bench.rs Reads sift_base.fvecs / sift_query.fvecs / sift_groundtruth.ivecs directly (no HDF5 required). Sweeps ef_search to produce a recall@10 vs QPS table used for before/after PR #619 comparison. * scripts/sift1m_hnswlib_bench.mjs Same sweep via hnswlib-node (C++ HNSW) to measure the competitive gap. Cargo.toml: add simd-avx512 feature to sota-bench dependency so the full optimised kernel path is exercised. Measured on AMD Ryzen 9 9950X (Zen 5, AVX-512), M=16, efC=200, 1M vecs: Source Build ef=100 recall ef=100 QPS ef=200 recall ef=200 QPS before PR 849 s 0.9585 1,849 0.9713 1,058 after PR (#619) 774 s 0.9592 1,768 0.9722 1,024 hnswlib-node 322 s 0.9828 5,339 0.9957 2,897 Build speedup: +9.7 %. Query QPS at 1M-scale: within noise (memory- bandwidth bound, not compute-bound). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * style: cargo fmt for sift1m benchmark binary Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * fix(rvf): native COW dual-graph query correct for cosine metric (recall 0.10→~1.0) Root cause ---------- The manifest format stored `profile_id` at byte [18] of the header but left byte [19] as a reserved zero — it did NOT persist the `DistanceMetric`. When `boot()` deserialized a manifest it only restored `epoch`, `dimension`, and `profile_id`; the metric always stayed at `DistanceMetric::L2` (the `RvfOptions::default()`). In the COW dual-graph ANN path (`query_via_index_cow`) the parent store is lazily opened via `open_readonly()` → `boot()`. Because `boot()` never restored the metric, every COW child opened its parent with `metric = L2`, even when the store family was Cosine. The parent HNSW was then built with the L2 distance function, and parent query results were L2-ordered distances. Merging those with the child's cosine distances broke the result ordering: cosine recall@10 measured at ≈ 0.10 for 32-dim random vectors. Fix --- * `DistanceMetric` gets two new `pub(crate)` helpers: - `to_id() -> u8`: L2=0, InnerProduct=1, Cosine=2 - `from_id(u8) -> Self`: reverse mapping (unknown → L2, backward-compatible) * The manifest write path (`write_manifest_seg_with_identity`) now encodes the metric into byte [19] of the header (previously a reserved zero). Old stores have 0x00 there → `from_id(0)` == L2 — correct default. * `ParsedManifest` gains a `metric: DistanceMetric` field parsed from byte [19]. * `boot()` restores `self.options.metric = manifest.metric` so every `open()` / `open_readonly()` correctly reflects the stored metric. Before/after recall ------------------- | Path | Before fix | After fix | |---------------------|-----------|-----------| | COW cosine recall@10 | ≈ 0.10 | 1.0000 | | COW L2 recall@10 | 1.0000 | 1.0000 | Regression test --------------- New test `cow_ann_recall_vs_exact_cosine` in `cow_ann_recall.rs` mirrors the existing L2 test with `metric = DistanceMetric::Cosine` and cosine ground truth; asserts recall@10 ≥ 0.95. The L2 test (`cow_ann_recall_vs_exact`) is unchanged and still passes. Follow-on --------- A new `@ruvector/rvf-node` native binding build is needed to ship this fix to the Node.js surface used by agenticow. Until then, agenticow's existing L2-normalize workaround (driving the engine with pre-normalized vectors so L2 and cosine rankings agree) remains correct and safe to keep. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * style: cargo fmt for cosine-metric persistence fix Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * fix(rvf, ruvector): accept dimension/dimensions alias, fix MCP rvf_create, add embed-text stdin (#641) Issue 1 — store-creation options contract: - @ruvector/rvf: RvfDatabase.create now accepts `dimension` (singular) as an alias for the documented `dimensions`; a missing/invalid value fails fast with an error naming the public `dimensions` option instead of the native `dimension` field that callers must not use. - ruvector MCP `rvf_create`: pass `dimensions` (plural) to the SDK so the tool works at all; accept both spellings in the input schema; only emit the "Install @ruvector/rvf" hint when the package is actually missing. Issue 2 — raw text on argv: - `ruvector embed text` now reads from stdin ("-" sentinel or --stdin) or from a file (--input-file <path>), keeping sensitive text out of the process table and audit logs. Adds tests/test-create-options.js covering the alias, precedence, and error paths (mock native handle, no N-API addon needed). Fixes #641 Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_017sXWL4ox5bhC86FYwJpmyK --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
32341be64f |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
Workspace CI / Security audit (push) Has been cancelled
Clippy + fmt / Clippy (deny warnings) (push) Has been cancelled
Clippy + fmt / Rustfmt (push) Has been cancelled
regression-guard / reentrant-rwlock-double-write (push) Has been cancelled
regression-guard / case-insensitive-collisions (push) Has been cancelled
regression-guard / ruvector-core-no-avx512-builds-on-stable (push) Has been cancelled
regression-guard / hnsw-recall-at-1 (push) Has been cancelled
regression-guard / hnsw-insert-beam-no-m2-clamp (push) Has been cancelled
regression-guard / hnsw-distance-based-neighbor-pruning (push) Has been cancelled
regression-guard / vector-db-rebuilds-index-on-open (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/pi-brain) (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/ruvector) (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/rvf-wasm) (push) Has been cancelled
regression-guard / no-npx-execSync-in-route-enhanced (push) Has been cancelled
regression-guard / shell-injection-in-mcp-server (push) Has been cancelled
regression-guard / no-systemtime-in-wasm-crates (push) Has been cancelled
regression-guard / no-hardcoded-workspaces-paths (push) Has been cancelled
regression-guard / brain-hydration-counters-present (push) Has been cancelled
regression-guard / optional-deps-resolvable-on-npm (push) Has been cancelled
regression-guard / graph-condense-perception-tests (push) Has been cancelled
regression-guard / mincut-pin-tracks-workspace-version (push) Has been cancelled
SONA Drift Protection / Drift gate (parity + fingerprint) (push) Has been cancelled
supply-chain / dependency-review (PRs only) (push) Has been cancelled
supply-chain / cargo audit (RustSec advisories) (push) Has been cancelled
supply-chain / cargo deny (license + source + ban policy) (push) Has been cancelled
supply-chain / npm audit (npm/ workspace) (push) Has been cancelled
supply-chain / lockfile integrity (Cargo.lock) (push) Has been cancelled
WASM Dedup Check / check-wasm-dedup (push) Has been cancelled
Benchmarks / Compare with Baseline (push) Has been cancelled
Build Native Modules / Commit Built Binaries (push) Has been cancelled
Built from commit
|
||
|
|
044e85f2d5
|
feat(ruvllm): checkpoint metadata, true resume, best-checkpoint retention (2.6.0) (#638)
Three backward-compatible TrainingPipeline improvements (minor bump 2.5.7 → 2.6.0):
1. Checkpoint metadata + load validation. saveCheckpoint(path) now writes a
v2 envelope carrying adapter geometry {config:{inputDim,outputDim,rank}} and
{pipelineConfig:{learningRate,batchSize}}. loadCheckpoint() rejects a v2 file
whose geometry does not match the current adapter (returns false, adapter
untouched) instead of silently restoring mis-shaped weights. v1 files carry
no geometry and still load unchanged (back-compat). Adds LoraAdapter
getInputDim()/getOutputDim() to expose geometry that is not part of LoRAConfig.
2. True resume via explicit resumeFrom(path): boolean. It loads the checkpoint
(same v2 shape validation) AND primes the pipeline so the next train()
continues from the restored epoch/step — running the remaining epochs of
config.epochs and fast-forwarding the LR scheduler to the restored step, with
metrics history preserved. Chosen over mutating train() implicitly so that a
plain loadCheckpoint()+train() stays "from scratch" and a no-resume train()
is byte-for-byte the same run as 2.5.7 (same reset, scheduler, result shape).
3. Best-checkpoint retention via config keepBestCheckpoint?: string. When set,
the pipeline writes the current state (same v2 envelope) each time validation
loss improves, so the best-val model survives later degradation. No-op when
validation never runs (validationSplit 0 or no val batches).
Tests: extend test/checkpoint.test.js (v2 round-trip, dim + rank mismatch
rejection, v1 back-compat) and add test/resume.test.js (resume continues to
config total epochs, weights restored not re-initialized, mismatch refuses to
arm resume, keepBestCheckpoint writes on improvement and is a no-op without
validation, plain train() result shape unchanged). Full suite: 107 pass / 3
fail; the 3 failures are the pre-existing native-binding tests in basic.test.js
(query/route/memory), unchanged by this work.
|
||
|
|
ecf15b0ec0 |
chore: Update NAPI-RS binaries for all platforms
Some checks are pending
regression-guard / npm-publish-pipeline (npm/packages/rvf-wasm) (push) Waiting to run
regression-guard / no-npx-execSync-in-route-enhanced (push) Waiting to run
regression-guard / shell-injection-in-mcp-server (push) Waiting to run
regression-guard / no-systemtime-in-wasm-crates (push) Waiting to run
regression-guard / no-hardcoded-workspaces-paths (push) Waiting to run
regression-guard / brain-hydration-counters-present (push) Waiting to run
regression-guard / optional-deps-resolvable-on-npm (push) Waiting to run
regression-guard / graph-condense-perception-tests (push) Waiting to run
regression-guard / mincut-pin-tracks-workspace-version (push) Waiting to run
supply-chain / dependency-review (PRs only) (push) Waiting to run
supply-chain / cargo audit (RustSec advisories) (push) Waiting to run
supply-chain / cargo deny (license + source + ban policy) (push) Waiting to run
supply-chain / npm audit (npm/ workspace) (push) Waiting to run
supply-chain / lockfile integrity (Cargo.lock) (push) Waiting to run
WASM Dedup Check / check-wasm-dedup (push) Waiting to run
Workspace CI / Tests (ruvix) (push) Waiting to run
Workspace CI / Tests (rvagent) (push) Waiting to run
Workspace CI / Tests (vector-index) (push) Waiting to run
Workspace CI / Security audit (push) Waiting to run
Clippy + fmt / Clippy (deny warnings) (push) Waiting to run
Clippy + fmt / Rustfmt (push) Waiting to run
regression-guard / reentrant-rwlock-double-write (push) Waiting to run
regression-guard / case-insensitive-collisions (push) Waiting to run
regression-guard / ruvector-core-no-avx512-builds-on-stable (push) Waiting to run
regression-guard / hnsw-recall-at-1 (push) Waiting to run
regression-guard / hnsw-insert-beam-no-m2-clamp (push) Waiting to run
regression-guard / hnsw-distance-based-neighbor-pruning (push) Waiting to run
regression-guard / vector-db-rebuilds-index-on-open (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/pi-brain) (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/ruvector) (push) Waiting to run
Built from commit
|
||
|
|
2745f47670
|
fix(ruvllm): saveCheckpoint(path) actually persists to disk — 2.5.7 (#637)
saveCheckpoint() was private, ignored any argument, returned undefined, and never wrote a file — checkpoints were in-memory only and died with the process, while callers passing a path got 0 bytes silently (reported downstream: ruvnet/ruflo#2549). - saveCheckpoint(path?) is now public: always records the in-memory checkpoint (training-loop behavior unchanged); with a path it writes a versioned JSON envelope (parent dirs created) and returns {index, epoch, step, loss, path, bytes} instead of undefined. - loadCheckpoint(indexOrPath) loads by in-memory index (back-compat) or from a checkpoint file, rejecting foreign/malformed JSON. - 5 tests: metadata shape, non-empty file + byte accounting, disk round-trip of weights, index back-compat, missing/foreign rejection. Test suite: 97/101 pass — the 4 failures (query/route/memory native- binding tests) are pre-existing in a tree without build:native and fail identically at baseline. |
||
|
|
2b68dad01a |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
regression-guard / hnsw-recall-at-1 (push) Has been cancelled
regression-guard / hnsw-insert-beam-no-m2-clamp (push) Has been cancelled
regression-guard / hnsw-distance-based-neighbor-pruning (push) Has been cancelled
regression-guard / vector-db-rebuilds-index-on-open (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/pi-brain) (push) Has been cancelled
supply-chain / cargo deny (license + source + ban policy) (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/ruvector) (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/rvf-wasm) (push) Has been cancelled
regression-guard / no-npx-execSync-in-route-enhanced (push) Has been cancelled
regression-guard / shell-injection-in-mcp-server (push) Has been cancelled
regression-guard / no-systemtime-in-wasm-crates (push) Has been cancelled
regression-guard / no-hardcoded-workspaces-paths (push) Has been cancelled
regression-guard / brain-hydration-counters-present (push) Has been cancelled
regression-guard / optional-deps-resolvable-on-npm (push) Has been cancelled
regression-guard / graph-condense-perception-tests (push) Has been cancelled
regression-guard / mincut-pin-tracks-workspace-version (push) Has been cancelled
supply-chain / npm audit (npm/ workspace) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Build (push) Has been cancelled
supply-chain / dependency-review (PRs only) (push) Has been cancelled
supply-chain / cargo audit (RustSec advisories) (push) Has been cancelled
WASM Dedup Check / check-wasm-dedup (push) Has been cancelled
Benchmarks / Compare with Baseline (push) Has been cancelled
Build Native Modules / Commit Built Binaries (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Unit & CLI tests (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Functional smoke (npx ruvector) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Learning check (HNSW activates) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Performance benchmark (≥2× speedup at N=5000) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Recall quality (recall@10 ≥ 0.88 at N=10k) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Tarball integrity (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / CI pass (push) Has been cancelled
Built from commit
|
||
|
|
e134ba00ed
|
fix(test): skip optimized-ONNX contract when its wasm/model can't load in CI (#625)
The publish workflow's 'node --test tests/*.test.mjs' contract test failed (blocking automated publish of 0.2.32 and 0.2.33): the skip guard only wrapped the BASE initOnnxEmbedder(), but the optimized embedder lazily loads its own .wasm on first embed() — which throws 'Unknown file extension .wasm' under Node ESM in restricted CI. That throw escaped the guard and failed the test instead of skipping, despite the subtest being named '... skipped if model unavailable'. Wrap the optimized embed in try/catch: skip on model-load failure, but re-throw assert.AssertionError so genuine contract regressions (#523 FP16-log, readiness gates) still fail. Locally (model present) all assertions still run. |
||
|
|
d7ebec3c47 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
227bb3f876
|
fix(ruvector-npm): accurate MCP tool count + reconcile tool lists (0.2.33) (#624)
* fix(ruvector-npm): accurate MCP tool count + reconcile tool lists (0.2.33) The package advertised 103 MCP tools but the server registers 97, and the README listed 12 tools (brain_agi_*, midstream_*) that don't exist. Three independent sources had also drifted: server TOOLS array (97), the cli 'mcp tools' display list (91, missing the 6 decompile_* tools), and the README count (103). - README: 103 → 97; drop the 12 phantom tool bullets; point to 'npx ruvector mcp tools' as the authoritative list - cli.js 'mcp tools': add the missing 'decompile' group (6 tools) → now lists 97, matching the server - mcp-server.js: report version from package.json instead of the hardcoded (and stale) '0.2.30' - bump 0.2.32 → 0.2.33 All three sources now reconcile to 97. Full test suite passes (73 + 7 + 2 + 8 + 2 across the publish-gate files). Co-Authored-By: claude-flow <ruv@ruv.net> * fix(ci): commit optimizer module, ignore RUSTSEC-2026-0190, ship src/optimizer Root-causes three pre-existing CI failures on the ruvector npm package: 1. Optimizer test (Cannot find module src/optimizer/index.js): the module was never committed because .gitignore's bare 'index.js' rule (for napi artifacts) silently ignored this hand-written module. Add a negation exception (as already done for @ruvector/sona) and commit index.js — 8 profiles, detectTaskType, applyProfile. Test: 135/135 pass. 2. cargo deny (advisories FAILED): RUSTSEC-2026-0190 (unsoundness in anyhow's Error::downcast_mut, anyhow 1.0.102, single version in tree). Added to deny.toml ignore list with justification + re-review date, consistent with the existing unsoundness exceptions — we never downcast anyhow::Error to a mismatched mutable type. 3. src/optimizer/ now ships (added to package.json files), so the published package's 'optimize' command works instead of graceful-degrading. Pre-existing failures NOT addressed here (separate infra work; main is also red): Functional smoke / Recall quality / Learning check fail because the npm CI installs with --no-optional, so @ruvector/rvf + the native HNSW addon are absent and the engine runs degraded. dependency-review is already continue-on-error (awaiting a repo Dependency-Graph settings flip). Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
ee620d600f |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
ca8224e0cd
|
feat(maxsim): add GraphMaxSim centroid-graph variant (salvaged from #622) (#623)
Adds a fourth MultiVecIndex variant to ruvector-maxsim: a greedy kNN graph over per-document centroids + multi-seed beam search + exact MaxSim rerank. Complements the token-level HnswMaxSim with a one-node-per-document graph. Includes the consecutive-seeding correctness fix discovered in nightly PR #622: step-based beam seeding collapses recall when the step is a multiple of the cluster count. Documented in graph.rs and ADR-252. #622 produced a duplicate ruvector-maxsim crate (the name was already taken by #569, merged 2026-06-15); rather than merge the duplicate, its unique value is salvaged here. The public research gist from #622 remains published. - 5 new tests (recall vs Flat, dim validation, build/empty guards) — 23/23 pass - cargo fmt clean, cargo clippy -D warnings clean |
||
|
|
160957e18d |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
regression-guard / case-insensitive-collisions (push) Waiting to run
regression-guard / hnsw-recall-at-1 (push) Waiting to run
regression-guard / hnsw-insert-beam-no-m2-clamp (push) Waiting to run
regression-guard / hnsw-distance-based-neighbor-pruning (push) Waiting to run
regression-guard / vector-db-rebuilds-index-on-open (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/pi-brain) (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/ruvector) (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/rvf-wasm) (push) Waiting to run
regression-guard / no-npx-execSync-in-route-enhanced (push) Waiting to run
regression-guard / shell-injection-in-mcp-server (push) Waiting to run
regression-guard / no-systemtime-in-wasm-crates (push) Waiting to run
regression-guard / no-hardcoded-workspaces-paths (push) Waiting to run
regression-guard / brain-hydration-counters-present (push) Waiting to run
regression-guard / optional-deps-resolvable-on-npm (push) Waiting to run
regression-guard / graph-condense-perception-tests (push) Waiting to run
regression-guard / mincut-pin-tracks-workspace-version (push) Waiting to run
supply-chain / lockfile integrity (Cargo.lock) (push) Waiting to run
supply-chain / npm audit (npm/ workspace) (push) Waiting to run
supply-chain / dependency-review (PRs only) (push) Waiting to run
supply-chain / cargo audit (RustSec advisories) (push) Waiting to run
supply-chain / cargo deny (license + source + ban policy) (push) Waiting to run
WASM Dedup Check / check-wasm-dedup (push) Waiting to run
Build RVF Node Native Modules / Build darwin-x64 (push) Has been cancelled
Build RVF Node Native Modules / Build linux-arm64-gnu (push) Has been cancelled
Build RVF Node Native Modules / Build linux-x64-gnu (push) Has been cancelled
Build RVF Node Native Modules / Build win32-x64-msvc (push) Has been cancelled
Build RVF Node Native Modules / Build darwin-arm64 (push) Has been cancelled
SOTA Benchmark (Tier 1 Smoke) / SOTA Smoke (Tier 1) (push) Has been cancelled
SOTA Benchmark (Tier 1 Smoke) / SOTA Full Run (Tier 2, on demand) (push) Has been cancelled
Build RVF Node Native Modules / Commit RVF Node Binaries (push) Has been cancelled
Built from commit
|
||
|
|
4a47509f3b |
chore: Update RVF NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
9b3569887e
|
fix(rvf): native COW dual-graph query correct for cosine metric (recall 0.10→~1.0) (#621)
* perf(hnsw): 4-accumulator AVX-512 kernels + SIMD wiring into search hot path - Replace single-accumulator AVX-512 distance kernels with 4-accumulator versions in simd_intrinsics.rs (euclidean, cosine, dot, manhattan). On Zen 5 with 4-cycle FMA latency, single-accumulator was latency-bound (96 cycles for 384-dim); 4-accumulator hides this to ~24 cycles. - Wire HNSW search hot path in DistanceFn::eval to call simd_intrinsics directly (inline, no Result wrapping, no simsimd FFI overhead). - Enable parallel batch insert via hnsw_rs::parallel_insert_slice (rayon). Measured: 6-10% QPS improvement on 128-dim/1K-vector bench; larger gains expected on 1M-vector workloads where distance computation dominates. 228 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * perf(hnsw): gate parallel_insert_slice behind 10K-vector threshold Rayon-based parallel insert (hnsw_rs::parallel_insert_slice) degrades graph connectivity for small batches (<10K vectors) because worker threads can't see each other's in-flight insertions, reducing optimal neighbor links. Add PARALLEL_THRESHOLD=10_000: use parallel insert only when the batch is large enough that the graph quality converges. Below threshold: sequential insert_data (same as before this PR). Above threshold: parallel_insert_slice for build-time speedup. 228 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * bench(sift1m): add SIFT-1M fvecs benchmark + hnswlib comparison tooling Adds two benchmark binaries driven by the real TEXMEX SIFT-1M dataset: * crates/ruvector-sota-bench/src/bin/sift1m_bench.rs Reads sift_base.fvecs / sift_query.fvecs / sift_groundtruth.ivecs directly (no HDF5 required). Sweeps ef_search to produce a recall@10 vs QPS table used for before/after PR #619 comparison. * scripts/sift1m_hnswlib_bench.mjs Same sweep via hnswlib-node (C++ HNSW) to measure the competitive gap. Cargo.toml: add simd-avx512 feature to sota-bench dependency so the full optimised kernel path is exercised. Measured on AMD Ryzen 9 9950X (Zen 5, AVX-512), M=16, efC=200, 1M vecs: Source Build ef=100 recall ef=100 QPS ef=200 recall ef=200 QPS before PR 849 s 0.9585 1,849 0.9713 1,058 after PR (#619) 774 s 0.9592 1,768 0.9722 1,024 hnswlib-node 322 s 0.9828 5,339 0.9957 2,897 Build speedup: +9.7 %. Query QPS at 1M-scale: within noise (memory- bandwidth bound, not compute-bound). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * style: cargo fmt for sift1m benchmark binary Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * fix(rvf): native COW dual-graph query correct for cosine metric (recall 0.10→~1.0) Root cause ---------- The manifest format stored `profile_id` at byte [18] of the header but left byte [19] as a reserved zero — it did NOT persist the `DistanceMetric`. When `boot()` deserialized a manifest it only restored `epoch`, `dimension`, and `profile_id`; the metric always stayed at `DistanceMetric::L2` (the `RvfOptions::default()`). In the COW dual-graph ANN path (`query_via_index_cow`) the parent store is lazily opened via `open_readonly()` → `boot()`. Because `boot()` never restored the metric, every COW child opened its parent with `metric = L2`, even when the store family was Cosine. The parent HNSW was then built with the L2 distance function, and parent query results were L2-ordered distances. Merging those with the child's cosine distances broke the result ordering: cosine recall@10 measured at ≈ 0.10 for 32-dim random vectors. Fix --- * `DistanceMetric` gets two new `pub(crate)` helpers: - `to_id() -> u8`: L2=0, InnerProduct=1, Cosine=2 - `from_id(u8) -> Self`: reverse mapping (unknown → L2, backward-compatible) * The manifest write path (`write_manifest_seg_with_identity`) now encodes the metric into byte [19] of the header (previously a reserved zero). Old stores have 0x00 there → `from_id(0)` == L2 — correct default. * `ParsedManifest` gains a `metric: DistanceMetric` field parsed from byte [19]. * `boot()` restores `self.options.metric = manifest.metric` so every `open()` / `open_readonly()` correctly reflects the stored metric. Before/after recall ------------------- | Path | Before fix | After fix | |---------------------|-----------|-----------| | COW cosine recall@10 | ≈ 0.10 | 1.0000 | | COW L2 recall@10 | 1.0000 | 1.0000 | Regression test --------------- New test `cow_ann_recall_vs_exact_cosine` in `cow_ann_recall.rs` mirrors the existing L2 test with `metric = DistanceMetric::Cosine` and cosine ground truth; asserts recall@10 ≥ 0.95. The L2 test (`cow_ann_recall_vs_exact`) is unchanged and still passes. Follow-on --------- A new `@ruvector/rvf-node` native binding build is needed to ship this fix to the Node.js surface used by agenticow. Until then, agenticow's existing L2-normalize workaround (driving the engine with pre-normalized vectors so L2 and cosine rankings agree) remains correct and safe to keep. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * style: cargo fmt for cosine-metric persistence fix Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
a4b662bcf4 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
feb4ee2753
|
perf(hnsw): 4-acc AVX-512 + parallel-insert — +9.7% build throughput (query QPS unchanged: memory-bound at 1M scale) (#619)
* perf(hnsw): 4-accumulator AVX-512 kernels + SIMD wiring into search hot path - Replace single-accumulator AVX-512 distance kernels with 4-accumulator versions in simd_intrinsics.rs (euclidean, cosine, dot, manhattan). On Zen 5 with 4-cycle FMA latency, single-accumulator was latency-bound (96 cycles for 384-dim); 4-accumulator hides this to ~24 cycles. - Wire HNSW search hot path in DistanceFn::eval to call simd_intrinsics directly (inline, no Result wrapping, no simsimd FFI overhead). - Enable parallel batch insert via hnsw_rs::parallel_insert_slice (rayon). Measured: 6-10% QPS improvement on 128-dim/1K-vector bench; larger gains expected on 1M-vector workloads where distance computation dominates. 228 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * perf(hnsw): gate parallel_insert_slice behind 10K-vector threshold Rayon-based parallel insert (hnsw_rs::parallel_insert_slice) degrades graph connectivity for small batches (<10K vectors) because worker threads can't see each other's in-flight insertions, reducing optimal neighbor links. Add PARALLEL_THRESHOLD=10_000: use parallel insert only when the batch is large enough that the graph quality converges. Below threshold: sequential insert_data (same as before this PR). Above threshold: parallel_insert_slice for build-time speedup. 228 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * bench(sift1m): add SIFT-1M fvecs benchmark + hnswlib comparison tooling Adds two benchmark binaries driven by the real TEXMEX SIFT-1M dataset: * crates/ruvector-sota-bench/src/bin/sift1m_bench.rs Reads sift_base.fvecs / sift_query.fvecs / sift_groundtruth.ivecs directly (no HDF5 required). Sweeps ef_search to produce a recall@10 vs QPS table used for before/after PR #619 comparison. * scripts/sift1m_hnswlib_bench.mjs Same sweep via hnswlib-node (C++ HNSW) to measure the competitive gap. Cargo.toml: add simd-avx512 feature to sota-bench dependency so the full optimised kernel path is exercised. Measured on AMD Ryzen 9 9950X (Zen 5, AVX-512), M=16, efC=200, 1M vecs: Source Build ef=100 recall ef=100 QPS ef=200 recall ef=200 QPS before PR 849 s 0.9585 1,849 0.9713 1,058 after PR (#619) 774 s 0.9592 1,768 0.9722 1,024 hnswlib-node 322 s 0.9828 5,339 0.9957 2,897 Build speedup: +9.7 %. Query QPS at 1M-scale: within noise (memory- bandwidth bound, not compute-bound). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * style: cargo fmt for sift1m benchmark binary Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
9aceb2baca |
chore: Update RVF NAPI-RS binaries for all platforms
Some checks failed
Build DiskANN Native Modules / Build DiskANN win32-x64-msvc (push) Has been cancelled
Build Graph Node Native Modules / Build Graph darwin-arm64 (push) Has been cancelled
Build Graph Node Native Modules / Build Graph darwin-x64 (push) Has been cancelled
Build Graph Node Native Modules / Build Graph linux-arm64-gnu (push) Has been cancelled
Build Graph Node Native Modules / Build Graph linux-x64-gnu (push) Has been cancelled
Build Graph Node Native Modules / Build Graph win32-x64-msvc (push) Has been cancelled
ruvector-verified CI / check (--features coherence-proofs) (push) Has been cancelled
ruvector-verified CI / check (--features hnsw-proofs) (push) Has been cancelled
ruvector-verified CI / check (--features rvf-proofs) (push) Has been cancelled
ruvector-verified CI / check (--features serde) (push) Has been cancelled
ruvector-verified CI / check (--features ultra) (push) Has been cancelled
ruvector-verified CI / clippy (push) Has been cancelled
RuvLTRA-Small Tests / E2E Tests (macos-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (ubuntu-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (windows-latest) (push) Has been cancelled
RuvLTRA-Small Tests / E2E Tests (ubuntu-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (macos-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Apple Silicon Tests (push) Has been cancelled
RuvLTRA-Small Tests / Quantization Accuracy (push) Has been cancelled
RuvLTRA-Small Tests / Thread Safety (push) Has been cancelled
RuvLTRA-Small Tests / Performance Benchmarks (push) Has been cancelled
RuvLTRA-Small Tests / Stress Tests (push) Has been cancelled
RuvLTRA-Small Tests / Code Quality (push) Has been cancelled
RuvLTRA-Small Tests / Test Coverage (push) Has been cancelled
Build DiskANN Native Modules / Publish DiskANN Platform Packages (push) Has been cancelled
Build Graph Node Native Modules / Publish Graph Node Platform Packages (push) Has been cancelled
ruvector-verified CI / test (push) Has been cancelled
ruvector-verified CI / bench (push) Has been cancelled
RuvLLM Benchmarks / Compare Benchmarks (push) Has been cancelled
RuvLTRA-Small Tests / Test Summary (push) Has been cancelled
Built from commit
|
||
|
|
f1bba5d151 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
afcaf07669
|
feat(rvf): ANN search across COW branches (dual-graph merge) (#618)
* feat(rvf): ANN search across COW branches (dual-graph merge) Stack on feat/queryable-cow-branches (PR #617). That PR added branch(), CowEngine, MembershipFilter, and parent_path — but the HNSW/ANN paths were disabled for COW children (fell back to O(N) exact scan of child's own slab only, missing parent vectors entirely). This commit adds sub-linear ANN across the full parent ∪ child-edits view: Design — dual-graph query + merge (LSM-ANN pattern): 1. Child arm : query child's own HNSW (exact scan when child < 1 024 vectors) 2. Parent arm : lazily open parent store read-only, cache in parent_store Mutex<Option<Box<RvfStore>>>; query parent's HNSW (built once, no rebuild per branch) 3. Over-fetch : k' = k × 4 from each arm to absorb tombstones / overrides 4. Merge : child distances override parent for same ID; IDs removed from membership_filter (tombstoned via child delete) are excluded; re-rank by distance; return top-k 5. Chained COW : parent.query() walks parent's own HNSW; lineage works transitively Key changes to rvf-runtime/src/store.rs: - Add parent_store: Mutex<Option<Box<RvfStore>>> field (all constructors) - Fix query_routed early-return: COW children with 0 child-side vectors must not bail before parent read-through - New cow_ann_eligible() guard - New query_via_index_cow() — the dual-graph merge (replaces O(N) fallback) - New cow_exact_parent_scan() — exact parent read-through for the exact path; makes query_exact the correct ground-truth for recall comparison - Update query_exact to call cow_exact_parent_scan for COW children - Update delete() to tombstone parent IDs from membership_filter so child-side deletion of inherited parent vectors is correctly reflected New integration tests (cow_ann_recall.rs, 4 tests): - cow_ann_recall_vs_exact : 1 200-vector base, branch, add/override/delete; ANN recall@10 vs exact ground truth — measured 1.0000 (>= 0.95 contract) - cow_ann_override_correctness: child override returns child distance, not parent's stale entry - cow_ann_tombstone_absent : tombstoned ID absent from ANN and exact results - cow_branch_size_independence: child file (162 bytes) stays << parent (163 803 bytes) after queries — no HNSW rebuild in child file Approximation: dual-graph merge is slightly approximate (sub-linear in parent size, not exact). Measured recall@10 = 1.00 at ef_search=300 on 1 200-vector L2/32-dim dataset with C=4 over-fetch. force_exact=true always provides ground truth via cow_exact_parent_scan. Cost: 2 HNSW queries (child + parent), flat in parent size. Parent HNSW built once on first COW query then cached. Child HNSW only when child has >= 1 024 vectors. RaBitQ-across-COW deferred (exact fallback used until then). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * fix(diskann): make search_returns_self_as_nearest non-flaky The test used max_degree=16 / beam=16 on a 128-node graph whose initial topology comes from thread_rng() (VamanaGraph::init_random_graph). With small M and a random graph, point 5 can end up outside the 16-candidate window reachable from the medoid in some seedings — causing an intermittent CI failure unrelated to the caller's changes. Fix: bump max_degree to 32 and build_beam to 64 (matching production defaults) so the graph is dense enough to guarantee connectivity on 128 nodes; use n = v.len() as the search beam so the test validates the "self is retrievable" property exhaustively rather than testing ANN efficiency (which is covered by other tests). Fixes pre-existing flaky failure observed in Tests (vector-index) CI job. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
76ee5820a3 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
5e8a2ae20e |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
27d0a21f27 |
chore: Update RVF NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
bc1875bcfa
|
feat(rvf): queryable COW branches — wire CowEngine read-through to query path (#617)
* feat(rvf): queryable COW branches — wire CowEngine read-through to query path RVF's COW branch was created but not queryable: a derived/branched child returned only its own edits, never the inherited parent vectors. This wires parent read-through into the exact query path and exposes the real COW branch() through the node binding. Root cause (confirmed against source): - The node binding's derive() (rvf-node/src/lib.rs) called store::derive() which builds a child with cow_engine: None — a lineage/provenance delta, not a COW union. - The real COW path, branch() (store.rs), wires CowEngine::from_parent + a MembershipFilter, but was never exposed in the node binding. - query_exact()/read_path scanned only self.vectors (local edits). The cow_engine/membership_filter were consulted ONLY to *disable* the HNSW / RaBitQ fast paths (index_eligible/rabitq_eligible), never to merge parent data. CowEngine::read_vector/read_cluster were never called from the query path. - query_routed() additionally short-circuited to an empty result whenever self.vectors.len() == 0, so an unedited COW child returned nothing. - The existing cow_branching test asserted only MembershipFilter membership; it never ran a query, so the gap went unnoticed. Fix (exact-scan read-through slice): - store.rs: query_exact() now performs a COW read-through. For a COW child it lazily opens a read-only handle to the parent (cached in a new parent_store field), then merges every inherited parent vector that the child has not overridden (re-ingested locally) or deleted into the same bounded-heap scan — i.e. parent ∪ child-edits with the child winning on an id collision. Factored the heap admission into heap_consider(). - store.rs: query_routed() no longer short-circuits empty for COW children. - store.rs: branch() now sizes the MembershipFilter by max-id+1 (not the vector count) so sparse / non-contiguous ids are representable. - rvf-node/src/lib.rs: expose branch() (COW-enabled) alongside derive(). Scope: this is the EXACT (flat) read-through slice. The byte-level CowEngine::read_cluster path addresses raw cluster offsets, which do not correspond to RVF's segmented on-disk layout, so it cannot be wired to a real .rvf parent as-is. ANN-index (HNSW/RaBitQ) read-through across the COW boundary remains a follow-up; those paths already fall back to the exact scan for COW children, so correctness holds. Test: new branch_query_reads_through_to_parent — builds a 1k-vector base, branches a COW child, applies edits, and asserts (1) a query for a base vector returns it via read-through, (2) a query for an edited vector returns the child's override, (3) a newly added child vector is queryable, and (4) the branch file stays far smaller than the base (COW delta, not a full copy). All 9 cow_branching tests and the full rvf-runtime + rvf integration suites pass. Discovered via RVF-COW benchmarking in the agent-harness-generator (MetaHarness) project, which proved the branch was a lineage-only delta and pinpointed the unexposed branch() + unwired read path. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * fix(ci): sync Cargo.lock to ruvector-sona 0.2.1 for lockfile integrity Regenerate Cargo.lock (offline, no external version bumps) so the local ruvector-sona workspace member resolves at 0.2.1 — fixes the `cargo metadata --locked` lockfile-integrity check. No source/dep changes in this PR; drift was inherited from the base branch. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
3ae7e5f862
|
fix(graph-node): batchInsert nodes missing from label index (#616)
* fix(graph-node): batchInsert nodes missing from label index batchInsert only populated the hypergraph adjacency/vector index (used by kHopNeighbors and stats) but never inserted nodes into the property graph + label index that the Cypher `MATCH (n:Label) RETURN n` scan reads. As a result, the fastest ingest path produced query-invisible nodes: they were counted in stats() and traversable by kHopNeighbors, but a label-scoped MATCH returned 0. createNode did both; batchInsert did not. Extract the shared index-registration logic into a single `register_node` helper (single source of truth) and call it from both createNode and batchInsert so the hypergraph index, property graph + label index, and optional storage all stay consistent. batchInsert now also honors per-node labels/properties (previously ignored). Adds a Rust regression test asserting that nodes registered via the shared path are consistently visible through all three read surfaces: label-scoped scan (get_nodes_by_label), kHop adjacency (k_hop_neighbors), and stats() entity counts. Discovered via agent-harness-generator ruvector benchmarking (GRAPH-ANALYTICS-PROOF §5). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf * fix(ci): rustfmt graph-node test + sync Cargo.lock to ruvector-sona 0.2.1 - cargo fmt on crates/ruvector-graph-node/src/lib.rs (Rustfmt CI) - regenerate Cargo.lock so the local ruvector-sona workspace member resolves at 0.2.1 (offline, no external version bumps) — fixes `cargo metadata --locked` lockfile-integrity check Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019rVRYrRDKyxYK18kuVrDSf --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
ed95f498ba |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
Workspace CI / Tests (rvagent) (push) Waiting to run
Workspace CI / Tests (vector-index) (push) Waiting to run
Workspace CI / Security audit (push) Waiting to run
Clippy + fmt / Rustfmt (push) Waiting to run
Clippy + fmt / Clippy (deny warnings) (push) Waiting to run
regression-guard / reentrant-rwlock-double-write (push) Waiting to run
regression-guard / case-insensitive-collisions (push) Waiting to run
regression-guard / ruvector-core-no-avx512-builds-on-stable (push) Waiting to run
regression-guard / hnsw-recall-at-1 (push) Waiting to run
regression-guard / hnsw-insert-beam-no-m2-clamp (push) Waiting to run
regression-guard / hnsw-distance-based-neighbor-pruning (push) Waiting to run
regression-guard / vector-db-rebuilds-index-on-open (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/pi-brain) (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/ruvector) (push) Waiting to run
regression-guard / npm-publish-pipeline (npm/packages/rvf-wasm) (push) Waiting to run
regression-guard / no-npx-execSync-in-route-enhanced (push) Waiting to run
regression-guard / shell-injection-in-mcp-server (push) Waiting to run
regression-guard / no-systemtime-in-wasm-crates (push) Waiting to run
regression-guard / no-hardcoded-workspaces-paths (push) Waiting to run
regression-guard / brain-hydration-counters-present (push) Waiting to run
regression-guard / optional-deps-resolvable-on-npm (push) Waiting to run
regression-guard / graph-condense-perception-tests (push) Waiting to run
regression-guard / mincut-pin-tracks-workspace-version (push) Waiting to run
supply-chain / dependency-review (PRs only) (push) Waiting to run
supply-chain / cargo audit (RustSec advisories) (push) Waiting to run
supply-chain / cargo deny (license + source + ban policy) (push) Waiting to run
supply-chain / npm audit (npm/ workspace) (push) Waiting to run
supply-chain / lockfile integrity (Cargo.lock) (push) Waiting to run
WASM Dedup Check / check-wasm-dedup (push) Waiting to run
SONA Drift Protection / Drift gate (parity + fingerprint) (push) Has been cancelled
Built from commit
|
||
|
|
b2a32eae2f
|
feat(sona): metaharness-Darwin evolves EWC++ config beyond hand-tuned SOTA (#615)
* feat(sona): metaharness-Darwin evolves EWC++ config beyond hand-tuned SOTA examples/darwin_ewc: applies the Meta-Harness 'freeze the model, evolve the harness' pattern to SONA's continual-learning layer — frozen = the EWC++ algorithm (EwcPlusPlus), evolved = its EwcConfig genome (lambda schedule, Fisher decay, auto task-boundary threshold, learning rate). Benchmark: a single weight vector trained on a sequence of tasks (no replay, auto-detected boundaries) — the canonical plasticity-vs-forgetting frontier. Darwin (GA + coordinate-descent polish) evolves the genome on TRAIN task- sequences; results reported on HELD-OUT sequences (different seeds). Measured (deterministic), held-out: the evolved config beats EwcConfig::default() (the crate's hand-tuned 'OPTIMIZED' values) by 35% lower final loss and 98.6% less forgetting — a strict Pareto win (plasticity also improves), and it generalizes to unseen task sequences. clippy -D warnings clean, fmt clean. Co-Authored-By: claude-flow <ruv@ruv.net> * feat(sona): weightAdapter gene — Darwin selects/prunes a fine-tuned adapter Extends the metaharness-Darwin line: expose a fine-tuned adapter (e.g. a LoRA distilled from verified SWE-bench trajectories — the 'autonomous data engine') as a gene (which_adapter, alpha) so evolutionary selection decides whether/how much to apply it (w_eff = w_base + alpha·Δw) instead of assuming new weights are better. examples/darwin_weightadapter demonstrates it on two conflicting domains with a generalizing adapter and an overfit one. Key finding (sharpens the idea): 'selection prunes overfit adapters' holds ONLY under per-domain evaluation. Measured (held-out, in-dist-majority eval): overfit α=0.55 → ΔA +0.249 / ΔB -0.357 (regresses out-dist) AGGREGATE (volume-weighted) fitness → picks the overfit adapter (silent B regression) PER-DOMAIN (no-regression Pareto) → prunes it, keeps the generalizing adapter So: evolve the adapter as a gene, but score it per-repository. clippy/fmt clean. Co-Authored-By: claude-flow <ruv@ruv.net> * docs(adr): ADR-271 metaharness-Darwin for SONA self-improvement Documents the metaharness-Darwin-evolves-SONA architecture: EWC++ config evolution (PR #615), the weightAdapter gene (per-domain Pareto selection of fine-tuned adapters), the Autonomous Data Engine (execution-verified SWE-bench trajectories -> DPO pairs), and four Ornith-1.0 borrows (immutable-boundary + deterministic-monitor-with-exclude-from-advantage + frozen-LLM-judge-veto reward-hacking defense; per-task-category specialization; two-stage scaffold reward credit; staleness-weighted replay). Method-not-model: external evolutionary vs Ornith's in-weights RL. Co-Authored-By: claude-flow <ruv@ruv.net> * feat(sona): darwin-guard reward-hacking defense (Ornith-1.0 borrow, ADR-271) 3-layer defense for evolutionary config search: (1) immutable verifier boundary (screen is a pure fn of verifier output the candidate can't fabricate); (2) deterministic monitor — non-finite / out-of-bounds / degenerate candidates are EXCLUDED from selection (best_accepted), not zero-scored, so a hack can neither win nor bias the advantage; (3) IntentJudge trait = frozen-LLM veto-only layer. Wired into darwin_ewc: NaN/collapsed configs are excluded from the GA ranking (also fixes the partial_cmp().unwrap() NaN-panic). 4 unit tests; benchmark still reaches beyond-SOTA (35% lower loss, 98.6% less forgetting) unchanged. clippy -D warnings + fmt clean. Co-Authored-By: claude-flow <ruv@ruv.net> * feat(sona): per-task-category genome router beats single global config (ADR-271) Ornith-1.0 borrow #2 (per-category specialization): evolve a router task-class -> genome instead of one global EwcConfig. Two continual-learning workload classes with conflicting optima (STABLE wants high lambda / retain; VOLATILE wants low lambda / stay plastic). Guard-screened evolution. Measured (held-out, adequate per-class data): per-category router 0.1122 vs single best global genome 0.1144 -> router ~1.9% better on unseen sequences, because one config cannot serve conflicting workloads. Honest caveat (discovered + documented): the gain REVERSES when per-class data is scarce — a specialized config overfits while the pooled global generalizes. Per-category routing needs enough per-category samples (Ornith's regime). ADR-271 updated; clippy/fmt clean. Co-Authored-By: claude-flow <ruv@ruv.net> * feat(sona): online auto-tuner with staleness-weighted replay (ADR-271, Ornith borrow #4) auto_tuner module: StalenessSchedule (Ornith w(d_t): fresh<=k1, exp-decay, drop>k2) + StalenessWindow (staleness-weighted running estimate of recent config performance, evicts stale obs). 4 unit tests. examples/darwin_autotuner: a (1+1)-ES that adapts a DEPLOYED EwcConfig to a drifting workload stream (regime A -> B at the midpoint), scoring the incumbent on the staleness window and accepting a perturbation only when it beats the recent score. Measured: online tuner ~3% lower post-drift loss than the static deployment config (10 accepted re-tunes). Margin is modest on synthetic regimes; the durable win is the reusable staleness machinery + the online-adaptation principle (a fixed offline-tuned config goes stale under drift). Completes the four ADR-271 components. clippy --all-targets -D warnings + fmt clean; 102 sona tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> * feat(sona): contamination/disjointness guard in darwin-guard (weight-eft/ADR-198 borrow) Adds the train/eval contamination guard — the gap @metaharness/weight-eft exposed in our reward-hacking-only guard. contamination()/assert_train_eval_disjoint() fail on any train∩eval instance-ID overlap (training/selecting on eval instances is fake lift); filter_holdout() partitions a set disjoint-by-construction and surfaces what was excluded. The SONA-side analog of weight-eft's assertTrainEvalDisjoint. 2 new tests (6 total in darwin_guard). ADR-271 updated: §3 Data Engine now cites @metaharness/weight-eft + adopts its RLHF-correct recipe (SFT distills ALL gold incl. off-policy frontier successes; DPO ON-POLICY cheap-vs-cheap only), and the darwin-guard borrow gains layer (iv) the contamination disjointness guard. clippy -D warnings + fmt clean. Co-Authored-By: claude-flow <ruv@ruv.net> * chore(release): ruvector-sona 0.2.1 — darwin_guard + auto_tuner modules Non-breaking minor feature release (new public modules darwin_guard, auto_tuner). Patch bump keeps the ^0.2 requirement of all in-workspace dependents (ruvllm, rvlite, mcp-brain, ...) satisfied. Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
a67f3564e2 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
147d5ea1d9
|
chore(release): publish ruvector-mragent 0.1.0 to npm (#614)
Make examples/mragent npm-publishable: private:false, public publishConfig, files whitelist, repository/homepage, and an MIT LICENSE file. Published ruvector-mragent@0.1.0 (Cue-Tag-Content graph memory + Darwin harness optimizer incl. the GPU LLM write-layer). node_modules excluded via .gitignore. Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
074d529405 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
baf52cae0e |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
edf96d83ed
|
feat(mragent): self-reconstructing graph memory over RuVector, evolved by Darwin (ADR-269/270) (#611)
* feat(mragent): MRAgent graph memory over RuVector with Darwin optimization
Add ADR-269 and a runnable reference implementation of MRAgent ("Memory is
Reconstructed, Not Retrieved") on RuVector, optimized by Meta-Harness Darwin
Mode under the "freeze the model, evolve the harness" invariant.
- Frozen model: deterministic Cue-Tag-Content memory substrate mirroring
RuVector hybrid (RRF) search + bounded-depth Cypher traversal semantics
(examples/mragent/agent/memory.mjs)
- Evolved harness: 10-gene reconstruction genome (cueK, efSearch, hybridAlpha,
fusion, traversalDepth, tagFanout, pruneThreshold, maxContent, rerank,
promptStrategy) in DARWIN_MUTABLE_BLOCK regions (agent/harness.mjs)
- Darwin evolution loop with mapLimit/paretoFront and ADR-150 graceful fallback
when @metaharness/darwin is absent (optimize.mjs)
- scorePolicy.ts fitness mirroring ADR-266; benchmark + probe + 7 deterministic
acceptance gates
- eval corpus with chained multi-hop "bridge" tasks so traversal depth, fan-out
and pruning are genuinely load-bearing
Runs with zero optional deps: baseline 83.3% -> evolved 100% accuracy, faster
and ~33% smaller context. Darwin discovers traversalDepth=3 (LINKED_TO*1..3).
Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_017MDmEV4svuFxuDBGg8zek2
* feat(mragent): self-reconstructing graph memory, beyond SOTA (ADR-270)
Extend the MRAgent harness past the paper into calibrated, adaptive,
self-reorganizing memory, co-evolved by Darwin. Also fixes the corpus being
silently excluded by the root .gitignore data/ rule (the example was missing
its eval set).
Beyond-SOTA mechanisms (each a tunable gene Darwin evolves):
- Adaptive depth (haltConfidence): halt traversal once evidence is decisive
- Abstention + risk-adjusted utility (abstainThreshold): refuse on weak
evidence instead of hallucinating; graded on calibrated utility, not raw acc
- Consolidation/replay (agent/consolidate.mjs): store reorganizes its own
topology, laying Cue->shortcut->Content edges (RuVector self-learning GNN)
Substrate upgrades:
- Concept layer (agent/concepts.mjs): dense (concept) vs sparse (token) signals
genuinely decoupled, so hybridAlpha/fusion become load-bearing
- Hardened 24-task corpus, 6 classes (semantic/lexical/hybrid/bridge/
distractor/unanswerable) synthesized from structured signal specs
- All 12 genes proven load-bearing (some via epistatic interaction)
- Memetic optimizer: GA (mapLimit/paretoFront) + multi-start coordinate-descent
polish that reliably finds the narrow calibration optimum
Measured (deterministic, zero optional deps): baseline acc 81% / risk 0.708 /
halluc 0.13 -> evolved 100% / risk 1.000 / halluc 0.00; consolidation -25%
hops at 100% accuracy. 11 acceptance gates pass. ADR-150 compliant.
Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_017MDmEV4svuFxuDBGg8zek2
* feat(mragent): generalization protocol (train/test/CV) + overfit fixes
Add a held-out evaluation regime that proves the evolved harness GENERALIZES
rather than memorizing the eval set, and fix the overfitting it surfaced.
Protocol:
- Scale corpus to 60 tasks via a deterministic generator (tools/genCorpus.mjs,
npm run gen-corpus), 10 per class, difficulty-varied (1-hop AND 2-hop bridges,
1-3 ranking-distractors) so train constrains every gene
- Optimizer evolves on a class-stratified TRAIN split, selects via 3-fold
cross-validation with a variance penalty (mean - 0.5*range), and reports a
held-out TEST split it never saw
- Generalization gate = does evolution improve the unseen split
Overfit fixes uncovered by held-out eval:
- Abstention confidence now derives from the answer's RAW relevance, not its
decay^depth path score, so deep-but-relevant bridge answers aren't mistaken
for weak ones (b-test confidence 0.39 -> 0.79); abstention generalizes across
depths. Adaptive-depth halt uses the same raw-relevance signal.
- Larger difficulty-varied corpus + CV variance penalty stop the optimizer
shaving under-constrained genes (maxContent->1) to train-fragile settings
Result (held-out test, reproducible): baseline ~30% acc / risk 0.25 / halluc
0.17 -> evolved ~65% / 0.81 / 0.04 (+35pt acc, +0.56 risk). Honest ceiling
(~80%) documented: synthetic embedding noise + one global hybridAlpha can't
serve both dense- and sparse-keyed queries. 12 acceptance gates pass.
Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_017MDmEV4svuFxuDBGg8zek2
* feat(mragent): GPU LLM write-layer for the Darwin optimizer (local RTX 5080)
Adds the directed-proposal layer the GA lacks (ADR-260 'real Darwin write-layer
proposes leaps from failure traces'): agent/llmMutator.mjs shows a local,
GPU-served code model (qwen2.5-coder via an OpenAI-compatible endpoint) the
current genome + its failing cases and asks for improved genomes. Every proposal
is clamped to the declared gene bounds (coerceGenome) before entering the
population, so untrusted LLM output can only ever be a safe genome — never an
unsafe gene. Wired into optimize.mjs every 3rd generation; folded into the
archive so GPU candidates compete in polish + acceptance.
Fully opt-in + gracefully degrading (ADR-150): MRAGENT_LLM=off or no reachable
endpoint => identical deterministic GA+coordinate-descent run as before. Auto-
detects http://localhost:11434/v1 (ollama) by default; MRAGENT_LLM_URL/MODEL
override.
Measured (RTX 5080, qwen2.5-coder:7b): 8 genomes proposed across gens, bounds-
safe; the deterministic polish still wins on this small synthetic corpus (the
GA+grid already enumerates the optimum), so the write-layer is a no-regression
enhancement that matters on larger corpora the grid can't cover. 14/14 tests
pass (2 new coerceGenome safety tests).
Co-Authored-By: claude-flow <ruv@ruv.net>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: ruvnet <ruvnet@gmail.com>
|
||
|
|
48dbbb663c
|
chore(release): publish timesfm + ruvector-timesfm 2.2.4 (#613)
timesfm gained quantization/f16/select_device/serde after 2.2.3 was published; bump to 2.2.4 and publish so ruvector-timesfm (new crate, uses those APIs) can depend on it. Adds ruvector-timesfm README. Only ruvector-timesfm depends on timesfm, so the off-workspace-version pin is self-contained. Co-authored-by: ruvnet <ruvnet@gmail.com> |
||
|
|
1329db1f24 |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
a437ffd034
|
feat(timesfm): real-model tests + GPU/batch optimization + ruvector-timesfm crate + metaharness (#608)
* feat(timesfm): GPU/device optimization + ruvector-timesfm integration crate
timesfm:
- cuda/metal features now imply candle (so `--features cuda` alone compiles
the numeric path); add timesfm::select_device() (TIMESFM_DEVICE=cpu|cuda|metal)
and use it in the bench instead of hardcoding Device::Cpu.
- Validated real-weight decode on RTX 5080: 45.2 ms (CPU) -> 3.97 ms (cuda) =
~11.4x, parity preserved (max-abs 8.58e-6). Note: decode at h<=128 is a single
forward pass (horizon_len=128), so KV-cache is a no-op there; GPU/f16 are the
real levers. Derive serde on PruneDecision for the MCP boundary.
ruvector-timesfm (new crate): RuVector-facing integration.
- Forecaster: load-once, forecast(series, horizon) -> point + calibrated p10..p90
quantile bands.
- anomaly: forecast-band detection (flag observed points outside their p10/p90).
- sweep::EarlyStopper: ADR-191 TimesFM-driven early-stopping for ruflo/Darwin
sweeps (wraps prune::decide_prune with min_history + confidence gate).
- ruvector-timesfm-forecast: JSON-in/out CLI = the time_series_forecast MCP tool
entry point.
- telemetry_anomaly example (flags injected spikes on real weights), integration
tests (5 candle + 3 pure-logic, all green; gated/skip without 814MB weights).
clippy --all-targets -D warnings clean (both feature states); fmt clean.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(harness): add generated timesfm metaharness bundle (ADR-041)
Authentic output of the agent-harness-generator (create-agent-harness v0.2.7,
kernel 0.1.2) synthesizing an engineering-pod harness for the TimesFM
forecasting crates. Template vertical:coding (the generator's recommended
rust-crate-harness archetype); host claude-code.
- score: scaffoldReady, 6/6 hard constraints, toolSafety 100, compileConfidence 90
- genome: repo_type rust, topology maintainer/tester/security, risk 0.37,
mcp_surface local_default_deny
- witness: .harness/manifest.sha256 over .harness/manifest.json, verified valid
(7c45ab91…). PROVENANCE.md records the repro command, score, genome, witness,
and the link to the time_series_forecast MCP tool (ruvector-timesfm-forecast).
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(ruvector-timesfm): batched forecasting (throughput path)
Forecaster::forecast_batch forecasts B equal-length series in one model call.
Measured on real weights (B=32, ctx=256, h=64):
- CPU: 27 -> 166 forecasts/s (6.16x), bit-exact vs per-series
- cuda: 244 -> 2078 forecasts/s (8.45x), rel diff 1.7e-4 (GPU reduction order)
Adds the throughput example (sequential vs batched + correctness check with a
relative tolerance for GPU) and a real-model batch-parity integration test.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(harness): Darwin evolve via OpenRouter, key sourced from GCP Secret Manager
Adds scripts/evolve-openrouter.{sh,mjs} to optimize the timesfm-harness with
Darwin Mode's OpenRouter LLM mutator (library-only; not CLI-exposed). The
OpenRouter API key is fetched from GCP Secret Manager at runtime
(gcloud secrets versions access OPENROUTER_API_KEY, project cognitum-20260110)
and exported only into the run's process — never stored in the repo/dotfile/logs.
Driver resolves @metaharness/darwin (devDependency) or DARWIN_DIST for local
monorepo runs. Validated: real-sandbox evolve (1 gen x 2 children,
google/gemini-2.5-flash) scored baseline 0.985 with safety 1.0 and zero
secret-exposure flags; ~$0.003. Mutations pass the validateGeneratedCode gate
and only promote on measured improvement. PROVENANCE.md documents usage.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(timesfm): int8/int4 weight quantization (QLinear + load_quantized)
Adds QLinear (full-precision or ggml-quantized weight via QMatMul) threaded
through the decoder; PatchedTimeSeriesDecoder::load_quantized(cfg, vb, dtype)
quantizes the 2 ResidualBlocks + 20 transformer layers (embeddings/norms/scaling
stay f32). Exposed as Forecaster::load_quantized(.., Quant::Q8_0|Q4_0).
Measured on real weights (CPU, ctx=512/h=128) — quant is a MEMORY win, not a
CPU-speed win (dequant overhead dominates the small 16-patch matmuls):
f32 : 46 ms 814 MB
Q8_0 : 242 ms ~212 MB (4x smaller) rel err 3.5e-3 (recommended)
Q4_0 : 246 ms ~112 MB (7x smaller) rel err 3.1e-2
All outputs finite. f32 path unchanged (QLinear::Full == prior Linear; parity
still 8.58e-6). quant_bench example + Q8_0 integration test added.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(ruvector-timesfm): forecast-driven HNSW rebuild scheduler (vector-db hook)
rebuild module: forecast an index's recall-drift curve with TimesFM and advise
WHEN to rebuild — schedule the rebuild to land just before the conservative
(p10) recall forecast crosses a floor, instead of fixed-schedule or
after-the-fact. Forecaster::advise_rebuild(recall_history, floor, horizon,
lead_steps) -> RebuildAdvice{rebuild_now, steps_until_floor, ...}. Ties into the
ruvector-diskann recall-trigger work. Pure-logic + real-model tests.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(timesfm): f16-on-load path (Forecaster::load_f16) + GPU bench
Run the forward in f16 (f16 weights/activations). Three localized dtype fixes
make the path f16-clean (attention mask coerce, decode padding dtype, RevIN
scalar-extraction slices); the f32 path is untouched (parity still 8.583e-6).
Forecaster gains a dtype field + load_f16; forecast/forecast_batch build inputs
in the load dtype and surface f32 to callers.
Measured RTX 5080 (B=32, ctx=256, h=64): batched f32 2082 -> f16 3261
forecasts/s (1.57x), sequential 238 -> 303/s. f16 forecasts within rel 2e-2 of
f32. (CPU f16 is slower, like quant — GPU is where f16 pays off.) f16 + Q8
remain the two precision knobs: f16 for GPU latency, Q8_0 for edge memory.
Co-Authored-By: claude-flow <ruv@ruv.net>
---------
Co-authored-by: ruvnet <ruvnet@gmail.com>
|
||
|
|
3971093d46 |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
Build Tiny Dancer Native Modules / Build Tiny Dancer darwin-arm64 (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer darwin-x64 (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer linux-arm64-gnu (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer linux-x64-gnu (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer win32-arm64-msvc (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer win32-x64-msvc (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer linux-arm64-musl (push) Has been cancelled
Build Tiny Dancer Native Modules / Build Tiny Dancer linux-x64-musl (push) Has been cancelled
RuvLLM Benchmarks / Linux Benchmarks (NEON baseline) (push) Has been cancelled
RuvLTRA-Small Tests / Quantization Accuracy (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (ubuntu-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (windows-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Unit Tests (macos-latest) (push) Has been cancelled
RuvLTRA-Small Tests / E2E Tests (macos-latest) (push) Has been cancelled
RuvLTRA-Small Tests / E2E Tests (ubuntu-latest) (push) Has been cancelled
RuvLTRA-Small Tests / Apple Silicon Tests (push) Has been cancelled
RuvLTRA-Small Tests / Thread Safety (push) Has been cancelled
RuvLTRA-Small Tests / Performance Benchmarks (push) Has been cancelled
RuvLTRA-Small Tests / Stress Tests (push) Has been cancelled
RuvLTRA-Small Tests / Code Quality (push) Has been cancelled
RuvLTRA-Small Tests / Test Coverage (push) Has been cancelled
SOTA Benchmark (Tier 1 Smoke) / SOTA Smoke (Tier 1) (push) Has been cancelled
SOTA Benchmark (Tier 1 Smoke) / SOTA Full Run (Tier 2, on demand) (push) Has been cancelled
Build Graph Node Native Modules / Publish Graph Node Platform Packages (push) Has been cancelled
Build GNN Native Modules / Commit Built GNN Binaries (push) Has been cancelled
Build GNN Native Modules / Publish GNN Platform Packages (push) Has been cancelled
Build RVF Node Native Modules / Commit RVF Node Binaries (push) Has been cancelled
Build Tiny Dancer Native Modules / Publish Tiny Dancer Platform Packages (push) Has been cancelled
RuvLLM Benchmarks / Compare Benchmarks (push) Has been cancelled
RuvLTRA-Small Tests / Test Summary (push) Has been cancelled
Built from commit
|
||
|
|
2176625403
|
docs(ruvector-capgated): add crate README for crates.io publish (#607)
Cargo.toml declares `readme = "README.md"` but the file was missing, which blocks `cargo publish` (readme is only validated at package time, so CI was green). Add a concise crate-level README covering the capability model, the three variants, and measured results. Co-authored-by: ruv <ruvnet@users.noreply.github.com> |
||
|
|
9ffa9e534e |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
47654a7e6a |
chore: Update NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
1948ef6c0b |
chore: Update RVF NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
d718cff8a3 |
chore: Update GNN NAPI-RS binaries for all platforms
Built from commit
|
||
|
|
137a02ee9c
|
research(nightly): capability-gated-ann — per-vector read access control in ANN search (#604)
* research: add nightly survey for capability-gated-ann Selects capability-gated ANN search as 2026-06-25 nightly topic. Three research loop passes completed: Discover, Deepen, Critique. Topic fills the missing per-vector read access control gap in RuVector (ADR-227 already covers proof-gated writes; this adds gated reads). Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb * feat: add capability-gated ANN Rust proof of concept crates/ruvector-capgated: zero-dep Rust crate implementing three capability-gated ANN search variants using 64-bit CapMask bitsets. - CapMask: 64-bit bitset for capability requirements/holdings - CapGatedIndex trait: unified API across all backends - PostFilter: O(n) scan, 100% recall, baseline - EagerMask: O(auth_frac*n*d), 100% recall, 7.9x speedup at 12.5% access - CapGraph: k-NN graph walk with ef-bounded exploration, 90.6% recall - Oracle: brute-force ground truth for recall measurement - Deterministic LCG dataset generation (no external deps) Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb * test: add 22 numeric acceptance tests for capability-gated-ann Tests cover: CapMask satisfies semantics, dist_sq correctness, recall computation, Oracle filtering/ordering, PostFilter filtering/ordering/k-limit, EagerMask equivalence to Oracle, EagerMask zero-access, CapGraph authorisation enforcement, CapGraph k-limit, CapGraph empty index, CapGraph full-access, dataset determinism, pick_caps count/range, LCG reproducibility. All 22 tests pass with cargo test -p ruvector-capgated. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb * docs: add ADR-268 for capability-gated ANN search ADR-268-capability-gated-ann.md covers: - Context: gap between proof-gated writes (ADR-227) and read access control - Decision: CapGatedIndex trait, CapMask bitset, three variants - Benchmark evidence: PostFilter 2,023 QPS, EagerMask 17,548 QPS (low-access), CapGraph 3,396 QPS / 0.869 recall - Alternatives considered: post-hoc filter, per-group index, homomorphic encryption - Failure modes and security considerations - Migration path into ruvector-core Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb * bench: capture capability-gated-ann benchmark results Real cargo run --release numbers on x86_64 Linux, Rust 1.94.1: High-access (37.5% authorised): PostFilter: 494 μs mean / 2,023 QPS / 1.000 recall EagerMask: 175 μs mean / 5,728 QPS / 1.000 recall (2.8x speedup) CapGraph: 289 μs mean / 3,466 QPS / 0.906 recall Low-access (12.5% authorised): PostFilter: 450 μs mean / 2,221 QPS / 1.000 recall EagerMask: 57 μs mean / 17,548 QPS / 1.000 recall (7.9x speedup) CapGraph: 295 μs mean / 3,396 QPS / 0.869 recall ACCEPTANCE RESULT: PASS -- all thresholds met. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb * docs: add SEO gist for capability-gated-ann docs/research/nightly/2026-06-25-capability-gated-ann/gist.md: - Public-facing technical article with real benchmark numbers - Comparison table vs Milvus, Qdrant, Weaviate, Pinecone, LanceDB, FAISS, pgvector, Chroma, Vespa - 8 practical applications, 8 exotic applications - Deep research notes with ACORN, filtered-ANN, Milvus citations - Usage guide, optimization guide, roadmap - SEO keywords and GitHub topic tags Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_01Gayqu5K44VptZqJLhxX1Vb * fix(ruvector-capgated): clippy + rustfmt cleanup for clean CI Resolve the clippy warnings that were red on #604: unused VecEntry import, needless_range_loop (dataset.rs cap-mask build), useless_vec (eager_mask), and unusual_byte_groupings (benchmark SEED literal). Apply rustfmt. cargo clippy -p ruvector-capgated --all-targets -- -D warnings now clean; 22/22 tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: ruv <ruvnet@users.noreply.github.com> |
||
|
|
e4d19b3454
|
research(nightly): spann-partition-spill — boundary-safe ANN in Rust (#602)
* research: add nightly survey for spann-partition-spill SPANN-inspired partition spilling for boundary-safe ANN (2026-06-24). Three measured variants, zero external deps, 10 passing tests. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_015jtrAifbFHQ1YWupgjA5HH * docs: add ADR-268 for spann-partition-spill ADR documents the design, benchmark evidence, failure modes, migration path, and open questions for SPANN-style partition spilling in RuVector. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_015jtrAifbFHQ1YWupgjA5HH * docs: add nightly research README and SEO gist for spann-partition-spill Research document with full benchmark results, ecosystem fit analysis, practical applications, exotic applications, and production roadmap. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_015jtrAifbFHQ1YWupgjA5HH * fix(ruvector-spann): remove nested workspace root + lint cleanup The crate declared its own [workspace] while also being a member of the root workspace, producing "multiple workspace roots" and turning every CI check red (build, check, all test shards, fmt). Remove the stray [workspace] block and the committed nested Cargo.lock, then apply clippy --fix (sort_by -> sort_by_key) and rustfmt. cargo build/test/clippy -p ruvector-spann now green: 10/10 tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: ruv <ruvnet@users.noreply.github.com> |
||
|
|
e2439ff62f
|
feat(timesfm): TimesFM 1.0 200M decoder-only inference port to candle (#603)
* feat(timesfm): TimesFM 1.0 200M decoder-only inference port to candle
Native Rust/candle port of google-research/timesfm (pytorch_patched_decoder.py)
for temporal embeddings + zero-shot forecasting inside RuVector. Behind an opt-in
`candle` feature (default = [], cpu-fallback pattern like ruvector-hailo); no
lockfile churn (candle 0.9.2 already pinned by ruvllm).
- config.rs: TimesfmConfig (1280 dim, 20 layers, 16 heads, 80 head_dim, patch 32/128)
- model.rs: ResidualBlock patch embedding, sinusoidal pos-emb (no RoPE), 20x decoder
(fused qkv, learnable per-head-dim softplus scaling, causal+padding mask), RevIN
instance norm, forward [B,N,128,10] + autoregressive decode to arbitrary horizon
- scripts/convert_weights.py: HF safetensors → VarBuilder key remap (--dry-run)
- 12 tests (shape + RevIN numerical regression); clippy -D warnings clean
Adversarial review caught + fixed a real RevIN bug (masked_mean_std did a global
mean/std instead of the reference's first-qualifying-patch selection) + added
regression tests. Honest scope: dimensionally + structurally faithful, but real
numerical weight-parity vs the published safetensors is NOT yet verified (tests
run on dummy weights). Open low-impact faithfulness deviations documented in code.
Co-Authored-By: claude-flow <ruv@ruv.net>
* style(timesfm): rustfmt the crate (format the RevIN-fix edits) — green the Rustfmt gate for this crate
Our crate is now fmt-clean + clippy-clean; the remaining workspace-wide fmt
diffs are pre-existing in other crates, out of scope for this PR.
Co-Authored-By: claude-flow <ruv@ruv.net>
* feat(timesfm): weight-parity validated against official PyTorch reference
Drives the candle TimesFM 1.0 200M port from "compiles on dummy weights" to
a real numerical PASS against google/timesfm-1.0-200m.
Measured (f32 CPU, deterministic 512-pt series, horizon 128):
max-abs-diff = 8.58e-6 MAE = 3.25e-6 rel-error = 5.83e-7
(target was <1e-2; we hit the f32 accumulation floor ~1e-5.)
Bridge: the real torch_model.ckpt state_dict (253 keys) maps 1:1 through
scripts/convert_weights.py with zero unmapped/missing keys.
Bug found + fixed (src/model.rs build_mask): the attention mask used
f32::NEG_INFINITY for masked positions. With real 0/1 paddings the padding
term `padding * -inf` computes `0 * -inf = NaN`, poisoning the whole mask
so softmax emitted NaN for every row (every forecast value was NaN). The
old `nan_to_zero` guard silently failed (where_cond dtype mismatch -> fallback
`NaN * 1 = NaN`). Replaced with the reference's large *finite* negative
(-0.7 * f32::MAX) and element-wise `minimum` merge, exactly matching
convert_paddings_to_mask + causal_mask + merge_masks. No NaN, exact parity.
Added:
- examples/parity.rs end-to-end parity runner with metrics + verdict
- tests/parity.rs gated integration test (skips cleanly w/o the
814MB artifacts; never fabricates a pass)
- scripts/gen_reference.py reference forecast generator (official decoder)
Co-Authored-By: claude-flow <ruv@ruv.net>
* bench(timesfm): forward-only latency bench — 45ms/forecast (200M, ctx512/h128, warm CPU); parity validated 8.58e-6
* feat(timesfm): predictive-pruning module for Darwin (ADR-191 §2)
Add crates/timesfm/src/prune.rs: forecast an optimization curve's plateau
from its first K points with TimesFM and decide PRUNE vs CONTINUE against a
viability threshold (lower=better, like exploitability). Decoupled — operates
on a generic Vec<f32>, no cross-repo poker-darwin dep.
- decide_prune(): forecast tail to target horizon, plateau = mean of last
horizon/4 steps; PRUNE iff plateau > threshold. Guards: non-finite forecast
=> CONTINUE conf 0 (never kill on a broken forecast); already-viable
(best_so_far <= threshold) => CONTINUE. Scale-invariant confidence.
- examples/predictive_prune.rs + tests/prune.rs: two synthetic curves with
REAL weights — doomed (floor 0.20) => PRUNE (forecast plateau 1.98, conf
0.72); healthy (already below 0.05) => CONTINUE. Both decisions correct.
Skips cleanly when weights absent (no fabricated pass).
- Honest calibration note: TimesFM mean-reverts upward on short synthetic
decays so absolute plateau is biased high; decision rides the robust
relative-ordering + already-viable signals, not absolute calibration.
- Doc-comment shows how poker-darwin calls this on its champion curve.
Tests: 12 shape + parity + prune = 14/14 green (candle); light build green.
Co-Authored-By: claude-flow <ruv@ruv.net>
* test(timesfm): bench24 harness for GCP 24-case deployment test (ADR-191 Phase B)
24 distinct forecast cases (varied period/trend/amp/noise/freq_id; ctx=512,
horizon=128) on real weights. Per-case latency + finiteness assert, aggregate
mean/p50/p95/p99, throughput, peak RSS, machine-readable JSON line. Non-finite
output is a hard FAIL (exit 1), never a silent pass.
Local baseline (ruvultra, 32-thread CPU): 24/24 finite, mean 42.5ms p95 44.2ms,
throughput 23.5 fps, peak RSS 1.55GB.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(ci) + feat(timesfm): README, publish=true, research-nightly shard, rustfmt
CI fixes:
- timesfm added to research-nightly shard (-p timesfm)
- timesfm excluded from core-and-rest shard (--exclude timesfm)
- cargo fmt -p timesfm: model.rs + 4 example files formatted
- cargo fmt -p ruvector-graph: typed_graph_bench.rs + 4 src files
(pre-existing rustfmt failure blocking the PR)
crates/timesfm/README.md (new):
- Architecture diagram (ResidualBlock → 20× decoder → RevIN → output)
- Feature flags table (candle/cuda/metal/hub)
- Quick-start: inference + weight loading workflow
- Known limitations section (weight parity, MLP mask, pos-emb shift)
- References (ICML 2024 paper, HuggingFace model card)
crates/timesfm/Cargo.toml:
- publish = true (was false)
- readme = "README.md"
Co-Authored-By: claude-flow <ruv@ruv.net>
* chore: cargo fmt ruvector-proof-gate (pre-existing rustfmt CI blocker)
Co-Authored-By: claude-flow <ruv@ruv.net>
* chore: cargo fmt temporal-coherence + tiny-dancer-core (pre-existing)
Co-Authored-By: claude-flow <ruv@ruv.net>
* chore: cargo fmt tiny-dancer-node + ruvllm openmythos (pre-existing)
Co-Authored-By: claude-flow <ruv@ruv.net>
* chore: cargo fmt rvf-runtime/store.rs (pre-existing)
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(ci): timesfm tests run with --features candle in research-nightly
The research-nightly shard was running timesfm without --features candle,
causing a compile error (all model code is behind the feature gate).
Fix: remove timesfm from the shared nextest run; add a dedicated step
that runs only timesfm tests with --features candle.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(ruvllm): remove broken private-item doc link (DepthLora)
Code Quality CI was failing: public doc in mod.rs linked to private
recurrent::DepthLora. Replace with plain backtick name.
Pre-existing issue surfaced by rustfmt touching the file.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(ruvllm): fix all private-item rustdoc links in openmythos/mod.rs
Three doc comments linked to private items (LtiInjection, RecurrentBlock,
DepthLora) in the recurrent module. rustdoc's -D warnings caught them.
Replaced with plain-text names. Pre-existing, surfaced by rustfmt touching
the file.
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(ruvllm): fix private attention module doc link
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(timesfm): gate bench/bench24 examples behind candle feature
The bench and bench24 examples import candle_core/candle_nn/timesfm::model
unconditionally, breaking Clippy and stock workspace builds that run without
--features candle. Add [[example]] required-features = ["candle"] so they are
skipped when the feature is off, matching parity/predictive_prune which already
self-gate via #[cfg(feature = "candle")].
Co-Authored-By: claude-flow <ruv@ruv.net>
* fix(maxsim): add ruvector-maxsim to workspace + make clippy-clean
The research-nightly CI shard referenced -p ruvector-maxsim (added
|
||
|
|
85d2314780 |
chore: Update NAPI-RS binaries for all platforms
Some checks failed
regression-guard / reentrant-rwlock-double-write (push) Has been cancelled
regression-guard / case-insensitive-collisions (push) Has been cancelled
regression-guard / hnsw-recall-at-1 (push) Has been cancelled
regression-guard / hnsw-insert-beam-no-m2-clamp (push) Has been cancelled
regression-guard / hnsw-distance-based-neighbor-pruning (push) Has been cancelled
regression-guard / vector-db-rebuilds-index-on-open (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/pi-brain) (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/ruvector) (push) Has been cancelled
regression-guard / npm-publish-pipeline (npm/packages/rvf-wasm) (push) Has been cancelled
regression-guard / no-npx-execSync-in-route-enhanced (push) Has been cancelled
regression-guard / shell-injection-in-mcp-server (push) Has been cancelled
regression-guard / no-systemtime-in-wasm-crates (push) Has been cancelled
regression-guard / no-hardcoded-workspaces-paths (push) Has been cancelled
regression-guard / brain-hydration-counters-present (push) Has been cancelled
regression-guard / optional-deps-resolvable-on-npm (push) Has been cancelled
regression-guard / graph-condense-perception-tests (push) Has been cancelled
regression-guard / mincut-pin-tracks-workspace-version (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Build (push) Has been cancelled
WASM Dedup Check / check-wasm-dedup (push) Has been cancelled
ruvector-verified CI / test (push) Has been cancelled
ruvector-verified CI / bench (push) Has been cancelled
Benchmarks / Compare with Baseline (push) Has been cancelled
Build Native Modules / Commit Built Binaries (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Unit & CLI tests (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Functional smoke (npx ruvector) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Learning check (HNSW activates) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Performance benchmark (≥2× speedup at N=5000) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Recall quality (recall@10 ≥ 0.88 at N=10k) (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / Tarball integrity (push) Has been cancelled
ruvector npm — functional, learning, optimized, effective / CI pass (push) Has been cancelled
Built from commit
|
||
|
|
146b595158 |
fix: resolve Cargo.toml merge conflict markers; regenerate Cargo.lock
The squash merge of #595 (sonic-ct) onto the rebased #566 (emergent-time) left unresolved conflict markers in Cargo.toml. Both crates are now correctly listed in the workspace exclude array. Also regenerates Cargo.lock to include both new crates. Co-Authored-By: claude-flow <ruv@ruv.net> |