test(agent): move the agent suites onto the memory contract (P1.5)
Rewrites the orchestrator, recall, compaction, save_memory and assembler suites for MemoryStore (createInMemoryMemoryStore; mem0 with the word embedder for the M3b integration test), string ids, async prompt building and setWorkspace(). Creation times are set with fake timers, since a write cannot set its own. Stores of Waggle's own data (identity, traces) are built on WaggleDB; the session-manager stubs use the new create() signature. Kept behaviour: importance lane (cap, active scope, temporary exclusion), profile and event lanes, date window and its fallback, catch-up, injection blocking of recall and preloaded context, autosave safety, decision consent, compaction update-in-place, reranker wiring. New tests: recall with a workspace active versus personal only; fetchRecentMemories ordering; toRecallFrame; context loader; save_memory routing, dedup, rate limit, dramatic-claim downgrade and contradiction scope; search_memory and search_all_workspaces; pattern write-back kinds, scopes and sign gate; read_other_workspace; reranker off unless WAGGLE_RERANKER=1, wider rerank pool, failure fallbacks. Deleted, because the behaviour is gone: - w46-rawdetail-recall.test.ts: the raw-turn (RAWDETAIL) recall lane. - orchestrator.test.ts, query_knowledge (3 tests) and the recall-hardening M4 "Key Knowledge" test: the knowledge graph is not in v1 (ADR-0002). - orchestrator-context-frames "profile override": scoring profiles. - Assertions on I/P frame types, GOP sessions, FTS rows, the "Memory Facts" lane, cognify stages and session/entity counts were replaced by the equivalent contract-level checks.
This commit is contained in:
@@ -10,7 +10,7 @@ describe('Self-Awareness', () => {
|
||||
],
|
||||
skills: ['code-review', 'summarize'],
|
||||
model: 'claude-sonnet-4-20250514',
|
||||
memoryStats: { frameCount: 42, sessionCount: 5, entityCount: 10 },
|
||||
memoryStats: { memoryCount: 42 },
|
||||
mode: 'local',
|
||||
version: '0.3.0',
|
||||
};
|
||||
@@ -33,7 +33,7 @@ describe('Self-Awareness', () => {
|
||||
expect(result).toContain('summarize');
|
||||
|
||||
// Memory stats
|
||||
expect(result).toContain('42 memories across 5 sessions, 10 knowledge entities');
|
||||
expect(result).toContain('Memory: 42 memories.');
|
||||
expect(result).toContain('search_memory');
|
||||
|
||||
// Footer
|
||||
@@ -45,7 +45,7 @@ describe('Self-Awareness', () => {
|
||||
tools: [{ name: 'test_tool', description: 'A test tool' }],
|
||||
skills: ['data-analysis', 'translation', 'code-gen'],
|
||||
model: 'gpt-4o',
|
||||
memoryStats: { frameCount: 0, sessionCount: 0, entityCount: 0 },
|
||||
memoryStats: { memoryCount: 0 },
|
||||
mode: 'team',
|
||||
version: '1.0.0',
|
||||
};
|
||||
@@ -63,7 +63,7 @@ describe('Self-Awareness', () => {
|
||||
tools: [],
|
||||
skills: [],
|
||||
model: 'unknown',
|
||||
memoryStats: { frameCount: 0, sessionCount: 0, entityCount: 0 },
|
||||
memoryStats: { memoryCount: 0 },
|
||||
mode: 'local',
|
||||
version: '0.0.0',
|
||||
};
|
||||
@@ -80,7 +80,7 @@ describe('Self-Awareness', () => {
|
||||
tools: [],
|
||||
skills: [],
|
||||
model: 'test',
|
||||
memoryStats: { frameCount: 0, sessionCount: 0, entityCount: 0 },
|
||||
memoryStats: { memoryCount: 0 },
|
||||
mode: 'local',
|
||||
version: '1.0.0',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user