Skip to content

@ruvector/gnn: isGNNAvailable() returns false at test runtime despite package resolving at import time #37

@DarkCodePE

Description

@DarkCodePE

Blocks A1 + INV-4 in [260526-kpoimj] (issue #35).

Package @ruvector/gnn resolves successfully at import('@ruvector/gnn') time (confirmed: node -e "import('@ruvector/gnn').then(() => console.log('ok'))" prints ok).

However, isGNNAvailable() at agentdb/src/wrappers/gnn-wrapper.ts:288-297 returns false inside the vitest process (confirmed via test stderr: [AgentDB] GNN backend construction failed: RuvectorGnnLearningBackend: GNN native module not available).

The probe calls a 2D Float32Array test operation against the NAPI binding, which fails with "Given napi value is not an array" against Node.js v22.22.1.

Consequence: A1 fails (learningBackend remains undefined). MUST M1 cannot be verified until the binding is stable in the vitest process context.

Recommended investigation: run node -e "const m = require('@ruvector/gnn'); console.log(m)" and compare NAPI version against Node.js v22.22.1 ABI table. Verify whether worker thread isolation in vitest interferes with NAPI module loading.

Source: docs/plans/260526-kpoimj-gnn-completion.md §8 Blocker 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageMaintainer needs to evaluate

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions