test(server): check waggle.db and the memory store instead of mind files (P1.5)

- trust wiring: read install_audit from waggle.db through the server; the
  old checks read a legacy personal.mind that nothing writes any more.
- data dir: a fresh install is marked by waggle.db, not personal.mind.
- backup: expect waggle.db and memory/ in the archive.
- cross-platform: replace the MindDB block with waggle.db checks (file, WAL,
  foreign keys) and memory round trips (plain, Unicode, 100 KB) through
  server.memory. FTS5 and session CRUD were legacy-engine features.
- store fixtures (install audit, cron) open WaggleDB instead of MindDB.
This commit is contained in:
shumeiko.it
2026-10-24 17:07:10 +02:00
parent 6573f817b0
commit f57d618bea
10 changed files with 76 additions and 183 deletions

View File

@@ -8,12 +8,12 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import Fastify from 'fastify';
import { MindDB, InstallAuditStore, type RecordAuditInput } from '@waggle/core';
import { WaggleDB, InstallAuditStore, type RecordAuditInput } from '@waggle/core';
import { extendRoutes } from '../../src/local/routes/extend.js';
import { marketplaceRoutes } from '../../src/local/routes/marketplace.js';
describe('Extend routes (Phase 4)', () => {
let db: MindDB;
let db: WaggleDB;
let auditStore: InstallAuditStore;
let server: ReturnType<typeof Fastify>;
@@ -31,7 +31,7 @@ describe('Extend routes (Phase 4)', () => {
}
beforeEach(async () => {
db = new MindDB(':memory:');
db = new WaggleDB(':memory:');
auditStore = new InstallAuditStore(db);
server = Fastify({ logger: false });