test(core): drop the legacy memory engine from core tests (P1.5)

- install audit: build fixtures on WaggleDB, the store's real home; drop the
  substrate SCHEMA_SQL parity half and the two MindDB-only recovery cases
  for rows stranded in install_audit__mig_old.
- workspace manager: create() and ensure() no longer leave a workspace.mind;
  getMindPath tests create the legacy file themselves. Drop the
  MultiMindCache cases (reopen of a missing mind, post-resolution junction
  swap): they tested the legacy cache, not the manager.
- transformers model load: use core's own in-process reranker.
This commit is contained in:
shumeiko.it
2026-10-24 13:33:27 +02:00
parent 52ee21ddb5
commit c6a9fbf85a
4 changed files with 36 additions and 163 deletions

View File

@@ -1,19 +1,15 @@
/**
* P7/D15 A3 — drift-lock for the install_audit CHECK constraints.
*
* The table is declared in TWO places: install-audit.ts (core, generated from
* the canonical @waggle/shared arrays) and hive-mind-core/src/mind/schema.ts
* (a private-monorepo literal). They MUST produce identical CHECK lists or
* auditStore.record() crashes on one path. The interleaved DDL is stripped from
* the curated OSS export. This test pins both to the
* single canonical source, so a drift in either fails CI instead of production.
* install-audit.ts generates the table DDL from the canonical @waggle/shared
* arrays. This test pins every CHECK list to that single source, so a drift
* fails CI instead of crashing auditStore.record() in production.
*/
import { describe, it, expect } from 'vitest';
import {
sqlInList, RISK_LEVELS, APPROVAL_CLASSES, AUDIT_ACTIONS,
AUDIT_CAPABILITY_TYPES, AUDIT_INITIATORS, TRUST_SOURCES,
} from '@waggle/shared';
import { SCHEMA_SQL } from '@waggle/hive-mind-core';
import { INSTALL_AUDIT_TABLE_SQL } from '../src/install-audit.js';
const COLUMNS = [
@@ -32,14 +28,9 @@ describe('install_audit CHECK parity (A3)', () => {
it(`core install-audit DDL pins ${col} to the canonical list`, () => {
expect(INSTALL_AUDIT_TABLE_SQL).toContain(expected);
});
it(`private substrate schema.ts pins ${col} to the canonical list`, () => {
expect(SCHEMA_SQL).toContain(expected);
});
}
it('both DDLs accept the P5/D4 uninstalled action', () => {
it('the DDL accepts the P5/D4 uninstalled action', () => {
expect(INSTALL_AUDIT_TABLE_SQL).toContain("'uninstalled'");
expect(SCHEMA_SQL).toContain("'uninstalled'");
});
});