brainy/tests/unit
David Snelling 8b191224ce feat(8.0): wire the two cor-confirmed metadata-provider contract additions
Both shapes confirmed with cor for the lockstep (cor builds the native side
against these; the JS index is a no-op / unchanged):

- probeConsistency?(): Promise<boolean> — OPTIONAL O(1) cold-open consistency
  sampler on MetadataIndexProvider. brainy calls it ONCE per brain on the first
  read; on `false` it self-heals via detectAndRepairCorruption() — the metadata
  counterpart of the 7.33.2 graph cold-load guard, completing the phantom triad's
  detect-and-repair-on-open. Best-effort: a probe failure never breaks a read
  (the one-shot guard resets so a transient failure retries). The JS index omits
  the method, so it is simply never probed.

- getIdsForFilter(filter, opts?: { limit?; offset? }) — brainy passes a page
  bound on the UNSORTED find({ type, where, limit }) path so a native provider can
  early-stop and return only the [0, limit) prefix, killing the O(N) FFI marshal
  at billion scale (pairs with cor #75). brainy passes offset:0 and ALWAYS
  re-windows the result itself (visibility filter + slice); the JS index ignores
  opts and returns all matches (behaviour unchanged).

New unit tests cover brainy's call behaviour for both (probe→repair on false,
healthy→no-repair, failure-is-best-effort, once-per-brain; opts passed with
offset 0 on the unsorted path). Full gate green: unit 1718, integration 607.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 12:11:00 -07:00
..
aggregation feat: exact percentile and distinctCount aggregation ops 2026-05-26 16:18:47 -07:00
brainy feat(8.0): wire the two cor-confirmed metadata-provider contract additions 2026-06-29 12:11:00 -07:00
db refactor(8.0): remove the 4 deprecated query-operator aliases (clean break) 2026-06-29 10:29:20 -07:00
graph feat(8.0): graph analytics — brain.graph.rank / communities / path 2026-06-23 12:32:03 -07:00
hnsw perf(8.0): HNSW removeItem is O(in-degree) via a reverse-adjacency index 2026-06-29 11:06:22 -07:00
import refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
indexes/columnStore fix(8.0): column-store range queries honor exclusive bounds (lessThan/greaterThan) 2026-06-19 11:01:41 -07:00
neural refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
performance feat(8.0): zero-config finalize + cut JS quantization (config.vector = recall + persistMode) 2026-06-15 10:08:51 -07:00
storage perf(8.0): cursor pagination for the verb walk — full edge pagination O(N²) → O(N) 2026-06-20 16:55:02 -07:00
transaction feat(8.0): thread commit generation through the graph-write provider contract 2026-06-16 09:42:35 -07:00
types feat(8.0): reserved-field contract — one canonical location, typed prevention, unified read/write 2026-06-11 13:13:09 -07:00
universal feat(8.0): id-normalization (#18) + aggregation min/max delete-safety + RC-safe release 2026-06-20 14:46:40 -07:00
utils feat(8.0): GraphAccelerationProvider contract — the native graph-engine seam 2026-06-21 08:12:22 -07:00
vfs feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00
boundary-no-native.test.ts refactor(8.0): API-surface + quality polish from the readiness audit 2026-06-29 10:04:19 -07:00
brainy-core.unit.test.ts fix(8.0): stats() per-type counts no longer inflate with HNSW re-saves 2026-06-17 17:07:58 -07:00
brainy-get-optimization.test.ts feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -07:00
create-entities-default.test.ts feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00
fieldTypeInference.test.ts feat: production-ready value-based temporal field detection 2025-10-16 13:58:57 -07:00
plugin-version-coupling.test.ts fix(8.0): close GA-blocking correctness gaps from the readiness audit 2026-06-29 10:03:38 -07:00
plugin.test.ts feat(8.0): version-coupling guard — a mismatched/failed native plugin fails loud, never silent JS fallback 2026-06-19 10:13:04 -07:00
test-suite-coverage-guard.test.ts test(8.0): re-home orphaned test files into the gate + guard against recurrence 2026-06-29 11:47:18 -07:00
type-filtering.unit.test.ts feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -07:00
vfs-multi-instance-diagnostic.test.ts feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -07:00
vfs-restart-fix.test.ts feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00