brainy/tests/unit/neural
David Snelling 0a9d1d9a17 fix: extraction, multi-hop traversal, and aggregate result shape (BR-ADV-FEATURES-BUN)
Three advanced-API correctness fixes, all reproducible on Node (not Bun-specific):

- Entity/concept extraction returned []. SmartExtractor combined agreeing signals
  with a weighted sum compared against an absolute 0.60 gate, so a confident
  low-weight signal lost selection to a mediocre high-weight one that then failed
  the gate, dropping the whole result. Select and gate on a normalized weighted
  average instead. The public `confidence` option now controls the threshold (was
  a dead hardcoded 0.60), and the embedding-signal timeout is raised 100ms -> 2000ms
  so the neural signal is not silently dropped on slower runtimes.

- Multi-hop find({ connected }) returned only the 1-hop neighbour. executeGraphSearch
  ignored depth/via; it now delegates to the depth-aware neighbors() BFS.

- find({ aggregate }) hid groupKey/metrics/count under .metadata, so callers
  expecting AggregateResult saw empty rows. Expose those fields at the top level.

Adds real-embedding regression tests in tests/integration/advanced-apis-regression.test.ts.
2026-05-26 11:32:46 -07:00
..
signals fix: eliminate flaky test timeouts and add storage adapters guide 2026-01-31 09:11:20 -08:00
domain-time-clustering.test.ts fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
NaturalLanguageProcessor.test.ts fix: extraction, multi-hop traversal, and aggregate result shape (BR-ADV-FEATURES-BUN) 2026-05-26 11:32:46 -07:00
neural-simplified.test.ts fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
presets.test.ts feat: implement progressive flush intervals for streaming imports 2025-10-22 17:36:27 -07:00
SmartExtractor.test.ts fix: resolve 13 neural test failures (C++ regex, location patterns, test assertions) 2025-10-30 15:46:22 -07:00