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>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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}`);
|
||||
});
|
||||
Reference in New Issue
Block a user