import assert from 'node:assert/strict'; import test from 'node:test'; import { RECALL_BENCHMARK_CASES, probeEmbeddingModule, runRecallBenchmark, summarizeRecallBenchmark, } from './memory-v2-recall-benchmark.mjs'; test('probeEmbeddingModule reports local hash embedding dimensions', async () => { const probe = await probeEmbeddingModule({ moduleSpecifier: './scripts/embed-memory-v2-local-hash.mjs', importModule: (specifier) => import(specifier), }); assert.equal(probe.configured, true); assert.equal(probe.dimensions, 3); }); test('runRecallBenchmark hits hybrid recall cases with local hash embedding', async () => { const { embedQuery } = await import('./scripts/embed-memory-v2-local-hash.mjs'); const report = await runRecallBenchmark({ cases: RECALL_BENCHMARK_CASES, embedQuery, limit: 5, }); const summary = summarizeRecallBenchmark(report); assert.equal(report.caseCount, RECALL_BENCHMARK_CASES.length); assert.ok(summary.recallAt5 >= 0.75, `expected recall@5 >= 0.75, got ${summary.recallAt5}`); });