feat(memory-v2): auto-accept candidate memories in active and canary modes
Let Personal Memory candidates pass policy gates without per-user manual review, while keeping shadow mode for explicit human approval. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,7 +37,7 @@ test('candidate store saves, lists, counts, and reviews with parameterized SQL',
|
||||
id: 'pmc_1', userId: 'u1', sessionId: 's1', memoryType: 'episodic',
|
||||
content: '决定使用 main 发布', importance: 0.9, confidence: 0.9,
|
||||
policyReason: 'decision_signal', evidence: { sourceId: 's1:0' }, createdAt: 1,
|
||||
}), { inserted: true });
|
||||
}, { autoAccept: true }), { inserted: true, status: 'accepted' });
|
||||
const rows = await store.listCandidates({ limit: 20 });
|
||||
assert.equal(rows[0].evidence.sourceId, 's1:0');
|
||||
assert.deepEqual(await store.countByStatus(), { candidate: 1 });
|
||||
|
||||
Reference in New Issue
Block a user