Skip to content

Commit 8a9bb2e

Browse files
ruvnetclaude
andcommitted
fix(agentdb): Add string ID mapping to RuVectorBackend to prevent silent data loss
The @ruvector/core N-API layer converts IDs via Number(), causing non-numeric string IDs (UUIDs, hex hashes, prefixed IDs) to become NaN and be silently dropped. Added bidirectional idToLabel/labelToId mapping in the AgentDB layer as defense-in-depth alongside the upstream fix in @ruvector/rvf@0.2.0. - insert(): Maps string IDs to sequential numeric labels before N-API call - search(): Maps numeric labels back to original string IDs in results - remove(): Resolves string ID to numeric label before N-API call - save()/load(): Persists ID mappings in .meta.json sidecar (backward-compatible) - Updated ruvector dependency to ^0.1.99 - Bumped version to 2.0.0-alpha.2.12 Closes #114 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ef52561 commit 8a9bb2e

4 files changed

Lines changed: 787 additions & 92 deletions

File tree

0 commit comments

Comments
 (0)