Commit Graph

2 Commits

Author SHA1 Message Date
rUv 41efca8be3 dream(memory): #3056 hybridSearch reachable via explicit opt-in (evaluated, ACCEPT-scoped) (#3057)
* dream(memory): #3056 hybridSearch reachable via explicit opt-in without memoryService

The ADR-125 Phase 5 three-arm (dense+sparse+entity) RRF/MMR fusion
controller was fully built and tested but unreachable from any
production call site: its explicit-enable config override worked at
the isControllerEnabled() gate but the createController() factory
still unconditionally required a hand-built UnifiedMemoryService,
silently returning null otherwise. Falls back to the existing
this.backend when it type-guards as AgentDBAdapter-compatible,
reachable only via explicit controllers: { hybridSearch: true } --
default auto-enable behavior is unchanged.

New deterministic $0 benchmark quantifies the feature's actual
retrieval-quality effect for the first time (previously only
functional/unit tests existed): +0.267 aggregate recall@10, with a
disclosed, statistically significant regression on pure-paraphrase
queries where fusion noise dilutes an already-perfect dense signal.

Independent adversarial critic (fresh subagent): CONFIRMED-SAFE,
reproduced bit-for-bit. 75/75 tests passing in touched files, 458/459
in the full package (1 pre-existing environmental failure, unrelated).

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016T1JRz8NBeGGmxQJVPReWa

* dream(memory): #3056 update ledger with 2026-08-14..18 nights + PR #3057

Reconstructs the v2 live-entries table from PR/issue history since each
night's own LEDGER.md edit lives only on its unmerged branch and never
reaches main (0% merge rate). Adds tonight's row (memory, hybridSearch
reachability fix, ACCEPT scoped, witness b28714fb...).

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016T1JRz8NBeGGmxQJVPReWa

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-21 11:20:17 -04:00
ruv ed95d67822 feat(memory): #2061 ADR-125 Phase 6 — runnable benchmarks + baseline results
Previously `npm run bench` matched no files because `vitest.config.ts`
restricts include to `src/**/*.test.ts`. ADR-125 Phase 6 lands a dedicated
`vitest.bench.config.ts` that discovers `benchmarks/**/*.bench.ts`, and
the `bench` script now points at it.

Additions:
- `vitest.bench.config.ts` — bench discovery config; legacy custom-framework
  bench files (cache-hit-rate, hnsw-indexing, memory-write, vector-search)
  are excluded for now and will be ported in a follow-up alongside Phase 3.
- `benchmarks/hnsw-search.bench.ts` — first real vitest `bench()` suite.
  Measures `HNSWIndex.search` (k=10, k=50) and `addPoint` against 1k random
  128-dim vectors.
- `benchmarks/results/baseline-20260519T212453Z.md` — first measured baseline,
  committed so the README perf table has a real referent.
- `benchmarks/results/scripts/run-baseline.mjs` — companion script that
  produces the JSON blob the baseline.md references.

Measured baseline on Darwin / M-series:
  build_time_ms: 533.42      (1k vectors, 128-dim)
  search_k10_avg_ms: 0.5294  (~1.9k ops/s)
  search_k50_avg_ms: 0.5235
  add_avg_ms: 0.8656

378 tests still passing — no regression.

Refs: ADR-125 Phase 6
Closes: part of #2061

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-05-19 17:26:26 -04:00