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:
john
2026-08-01 17:14:06 +08:00
parent 666db0b939
commit 6f3e53a56a
50 changed files with 3730 additions and 38 deletions
+29
View File
@@ -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}`);
});