Files
memind/memory-v2-recall-benchmark.test.mjs
T
john 6f3e53a56a feat(memory-v2): close Phase A with auto-review, product events, and H5 recall UI.
Add candidate auto-review pipeline, shadow audit tooling, admin metrics page,
and user-visible memory recall hints in chat with phase-a readiness checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 17:14:06 +08:00

30 lines
1.0 KiB
JavaScript

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}`);
});