brainy/tests/benchmarks
David Snelling c605b34f98 test(8.0): A/B benchmark harness (open leg) — generic corpus+metrics lib, brainy-alone scaling bench, boundary guard, real-embedding recall guard
The open-core, Cortex-free half of the library A/B (handoff AJ/AK), authored once in
brainy so the proprietary A/B comparison can import it for both legs:

- tests/benchmarks/lib/corpus.js — deterministic clustered-mixture corpus generator
  (recompute-on-demand, O(clusters·dim) memory) for latency/ingest/memory at scale.
- tests/benchmarks/lib/metrics.js — percentiles, brute-force recall@k, RSS snapshot.
- tests/benchmarks/brainy-scale.js — brainy-alone scaling leg (ingest, find p50/p99 for
  vector/metadata/graph/triple, RSS). Recall is intentionally NOT measured on synthetic
  data — see below.
- tests/unit/boundary-no-cortex.test.ts — CI guard: fails if @soulcraft/cortex ever
  appears in a src/ or tests/ import or in any package.json dependency field.
- tests/integration/vector-recall.test.ts — semantic-search correctness on REAL
  embeddings (19-20/20 exact-text top-1).

Methodology note: synthetic vectors (random/one-hot/clustered/latent) are near-orthogonal
under cosine, so HNSW (any graph ANN, incl. DiskANN) cannot navigate them and recall
collapses regardless of engine — a property of the data, not the index. Brainy vector
search is verified correct on real embeddings. The A/B recall@10 column is therefore
measured on SIFT/BIGANN, identically for both legs.
2026-06-15 15:51:17 -07:00
..
lib test(8.0): A/B benchmark harness (open leg) — generic corpus+metrics lib, brainy-alone scaling bench, boundary guard, real-embedding recall guard 2026-06-15 15:51:17 -07:00
benchmark-real-world.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
benchmark-vs-industry.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
brainy-scale.js test(8.0): A/B benchmark harness (open leg) — generic corpus+metrics lib, brainy-alone scaling bench, boundary guard, real-embedding recall guard 2026-06-15 15:51:17 -07:00
find-composition-scale.js test(8.0): asOf() error-path spot-checks + find() triple-composition correctness + scale-bench harness 2026-06-15 11:55:26 -07:00
perf-final.js chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
perf-simple.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
performance-comprehensive.js chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
performance-profile.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
performance-v3.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
quick-benchmark-v3.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
quick-perf.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
quick-verify.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
scale-test.js refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00