Skip to content

ruvector@0.2.23: data-plane broken — VectorDB CRUD, GNN, attention, embed, rvf, benchmark all fail #402

@ronmikailov

Description

@ronmikailov

Summary

After exhaustive testing of every top-level subcommand in ruvector@0.2.23, the core data plane is non-functional. Failures cluster into 3 root causes, all in scope of the existing release-hygiene tracker (#399, #400, #401):

CLI-parser, help text, info/status commands, and a few utility commands (decompile, mcp tools, llm embed, identity, brain) are all healthy — so the CLI shell is fine, the binding integration is what's broken.


A. VectorDB API drift — entire CRUD lifecycle blocked

The CLI assumes a VectorDB API surface (insertBatch, on-disk persistence) that doesn't match what @ruvector/core@0.1.31 actually ships.

A1. create claims success but writes no file

$ ruvector create -d 4 ./test.db
- Creating database...
✔ Database created: ./test.db
  Dimension: 4
  Metric: cosine
  Implementation: native (@ruvector/core)

$ ls test.db
ls: cannot access 'test.db': No such file or directory   # <-- nothing on disk

The "✔" success line is printed but no file is created. Every downstream read/write then fails with ENOENT.

A2. insert calls a missing method

$ ruvector insert ./test.db ./vecs.json
✖ Failed to insert vectors
db.insertBatch is not a function

db.insertBatch doesn't exist on the current VectorDB binding. Same root cause causes:

A3. stats / search / export / import are all blocked

All fail with ENOENT because create doesn't actually persist. So even before hitting any API drift, the file simply isn't there. After one round-trip, the entire VectorDB CLI workflow is unusable.

Likely fix

Audit the CLI handlers in bin/cli.js against the current @ruvector/core surface. Either:

  • Wire the CLI to whatever the actual method names are now (add, addBatch, etc.), or
  • Restore insertBatch / persistence on @ruvector/core if it was an unintentional regression.

B. GNN + attention N-API errors — every operation crashes

Every meaningful op in the gnn and attention subsystems crashes:

$ ruvector gnn layer -i 8 -h 16 --test
✔ GNN Layer created
- Running test forward pass...
✖ Failed to create GNN layer
Get TypedArray info failed

$ ruvector gnn search -q "[0.1,0.2,0.3,0.4]" -c ./cands.json -k 2
✖ Failed to run search
Get TypedArray info failed

$ ruvector gnn compress -f ./cands.json
✖ Failed to compress embeddings
Get TypedArray info failed

$ ruvector attention compute -q "[0.1,0.2,0.3,0.4]" -k ./cands.json
✖ Failed to compute attention
Failed to convert napi value Undefined into rust type \`u32\`

Get TypedArray info failed is napi-rs's error when a value passed across the FFI boundary isn't actually a typed array. The CLI is likely passing plain number[] arrays where the Rust binding expects Float32Array / Float64Array. The attention compute failure (Undefined into u32) is the same shape — a missing/malformed scalar arg.

Same root cause as ruvector demo --gnn (see #400).

Likely fix

In the gnn and attention handlers, convert JS arrays to Float32Array (or whatever dtype the binding expects) before crossing the FFI boundary. Add explicit shape/dtype validation up front so the user gets a friendlier error than `Get TypedArray info failed`.


C. More missing `dist/` paths (extends #399)

In addition to the missing top-level `dist/index.js` reported in #399, the CLI also requires:

$ ruvector embed text "hello world"
Embedding failed: Cannot find module '../dist/core/onnx-embedder.js'

$ ruvector rvf status /path/to/store.rvf
Cannot find module '../dist/core/rvf-wrapper.js'
$ ruvector rvf segments /path/to/store.rvf
Cannot find module '../dist/core/rvf-wrapper.js'
$ ruvector rvf create -d 4 ./test.rvf
Cannot find module '../dist/core/rvf-wrapper.js'

So the entire `embed` and `rvf` subsystems are blocked for the same reason as `doctor` was in #399 — the build artifact under `dist/` is missing from the published tarball. `prepublishOnly` runs `tsc`, so either the build is failing silently or the `files` allowlist isn't matching.

This extends #399 from a doctor-only false negative into "5+ subsystems blocked."


D. What works (so the picture isn't all bleak)

These commands run cleanly with sensible output:

  • All 33 ` --help` invocations (CLI parser is fine).
  • `info`, `setup`, `doctor` (after ruvector@0.2.23: published tarball missing dist/ — ruvector doctor falsely reports 'Native binding failed to load' #399 shim).
  • `mcp info`, `mcp test` (97 tools registered), `mcp tools` (full list).
  • `identity show`, `brain status`, `edge status`.
  • `llm info`, `llm models` (3 models listed), `llm embed` (returns dimensions, though all-zero output suggests the model isn't actually loaded — separate finding worth investigating).
  • `sona info`, `sona status`, `sona stats`, `sona patterns ` (graceful empty result).
  • `route classify` (graceful "no routes" message).
  • `gnn info`, `attention info`, `attention list`, `graph --info`, `router --info`, `cluster --info` (info commands all work).
  • `hooks stats`, `workers stats/triggers/presets/phases`, `native list`, `rvf examples` (45 example files listed).
  • `decompile chalk` (real decompile, writes `decompiled/chalk@5.6.2/`, witness root computed) — actually impressive!

Suggested CI / release gate

Combining suggestions across #399, #400, #401, and this issue:

  1. Smoke test every top-level command on a fresh global install:
    • ` --help` exits 0 (already passes).
    • Safe info subcommand of each grouped command exits 0 (would have caught `embed text`, `rvf status`, `optimize` failures).
  2. Round-trip CRUD test: `create → insert → stats → search → export → import` against a tiny fixture. Would have caught the `create` no-file regression and the `insertBatch` API drift in one stroke.
  3. GNN/attention shape test: one fixture forward pass per binding. Would have caught the typed-array marshalling regression.
  4. `files` allowlist audit: make sure every path `bin/cli.js` `require`s lives under a `files` entry. Would have caught all the `Cannot find module '../dist/...'` failures (ruvector@0.2.23: published tarball missing dist/ — ruvector doctor falsely reports 'Native binding failed to load' #399 + this issue's section C + ruvector@0.2.23: optimize command crashes (missing src/optimizer/ from tarball) + router references wrong package name #401).

Environment

  • ruvector: 0.2.23
  • @ruvector/core: 0.1.31
  • @ruvector/gnn: 0.1.x (whatever `ruvector install gnn` resolves)
  • @ruvector/attention: included with core
  • @ruvector/graph-node: latest
  • @ruvector/router: 0.1.30
  • ruvector-extensions: latest
  • @ruvector/agentic-synth: latest
  • Node.js: v20.19.6
  • npm: 10.8.2
  • OS: Linux x64 (WSL2)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions