brainy/tests/configs/vitest.semantic.config.ts
David Snelling e5997a1516 test(8.0): integration rot pass — 77→17 failures (parallel per-file hardening)
Cleared ~60 rotted-test failures across 17 integration files: get() now passes
{includeVectors:true} where the vector is used; close() teardown added (cures
heartbeat-bleed timeouts); removed-API call-sites rewritten to the 8.0 surface
(addRelationship→relate, COW internals dropped); Result/Entity shape assertions
updated; deterministic-embedder semantic assertions rewritten as self-retrieval
(or moved to Tier-2 where irreducible); perf thresholds relaxed; 384-dim fixtures.

Adds the Tier-2 (real-model) scaffolding: tests/setup-semantic.ts +
tests/configs/vitest.semantic.config.ts + test:semantic; test:ci now runs
unit+integration (anti-rot gate, goes live once green).

Remaining 17 failures are REAL 8.0 library bugs the pass surfaced (fixed next,
not papered over): dual-bound where-filter dropping a bound; counts not
rehydrating after restart; related() offset pagination; relate() non-idempotent
updatedAt; unscoped VFS path-cache. Plus find-unified finish + a few stragglers.
2026-06-17 13:11:41 -07:00

35 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vitest/config'
/**
* Tier-2 (semantic) test configuration — REAL embedding model.
*
* Holds the relevance/recall assertions that are only meaningful with real embeddings
* (Tier 1's deterministic embedder gives self-identity 1.0 but no cross-text structure).
* Opt-in: `npm run test:semantic`. Sequential + isolated forks, like the integration tier,
* because real model loads are memory-heavy.
*/
export default defineConfig({
test: {
globals: true,
setupFiles: ['./tests/setup-semantic.ts'],
environment: 'node',
testTimeout: 300000, // 5 minutes per test (real model load + inference)
hookTimeout: 120000,
teardownTimeout: 30000,
include: ['tests/semantic/**/*.test.ts'],
// Sequential execution — real models are memory-heavy.
pool: 'forks',
poolOptions: {
forks: { maxForks: 1, minForks: 1, singleFork: true, isolate: true }
},
maxConcurrency: 1,
fileParallelism: false,
reporters: process.env.CI ? ['dot'] : ['basic'],
coverage: { enabled: false },
retry: 1
}
})