test(cli): run the CLI suites on the mem0 store and waggle.db (P1.5)
The comprehensive and hard-persistence suites open a data directory the way the REPL does: mem0 in <dir>/memory (word embedder, no model download) and waggle.db for the profile card and tasks. Persistence across sessions now also checks identity and tasks after reopening. The packaged-runtime tests install @waggle/memory-contract and @waggle/memory-mem0 with the CLI (the weaver package is gone) and check that the REPL creates the memory store and waggle.db instead of default.mind. Deleted: T4 and T18 (knowledge graph entities and their persistence) and the knowledge-graph steps of the hard-persistence run; the graph is not in v1 (ADR-0002).
This commit is contained in:
@@ -222,11 +222,12 @@ async function stopProcess(child: ChildProcessWithoutNullStreams): Promise<void>
|
||||
|
||||
const CLI_PACKAGE_CLOSURE = [
|
||||
'@waggle/shared',
|
||||
'@waggle/memory-contract',
|
||||
'@waggle/memory-mem0',
|
||||
'@waggle/hive-mind-core',
|
||||
'@waggle/core',
|
||||
'@waggle/marketplace',
|
||||
'@waggle/agent',
|
||||
'@waggle/weaver',
|
||||
'@waggle/cli',
|
||||
] as const;
|
||||
|
||||
@@ -438,7 +439,7 @@ describe('@waggle/cli runtime UX', () => {
|
||||
|
||||
const install = await runInCwdAsync(
|
||||
bin('npm'),
|
||||
// The REPL opens MindDB on startup, so this install must allow better-sqlite3's
|
||||
// The REPL opens SQLite stores on startup, so this install must allow better-sqlite3's
|
||||
// native binding lifecycle rather than using the help-only --ignore-scripts path.
|
||||
['install', '--no-audit', '--no-fund', '--prefer-offline'],
|
||||
projectDir,
|
||||
@@ -503,7 +504,10 @@ describe('@waggle/cli runtime UX', () => {
|
||||
expect(stdout).toContain('Conversation cleared.');
|
||||
expect(stdout).toContain('Goodbye!');
|
||||
expect(stderr).not.toContain('Fatal error');
|
||||
expect(fs.existsSync(path.join(home, '.waggle', 'default.mind'))).toBe(true);
|
||||
// Memory (mem0) and Waggle's own database live in the data directory (ADR-0007).
|
||||
expect(fs.existsSync(path.join(home, '.waggle', 'memory', 'waggle-memory.json'))).toBe(true);
|
||||
expect(fs.existsSync(path.join(home, '.waggle', 'waggle.db'))).toBe(true);
|
||||
expect(fs.existsSync(path.join(home, '.waggle', 'default.mind'))).toBe(false);
|
||||
} finally {
|
||||
if (child) await stopProcess(child);
|
||||
fs.rmSync(home, { recursive: true, force: true });
|
||||
|
||||
Reference in New Issue
Block a user