dream(performance): HNSWIndex efSearch query-time default (evaluated, REJECTED) - #3034
Draft
ruvnet wants to merge 3 commits into
Draft
dream(performance): HNSWIndex efSearch query-time default (evaluated, REJECTED)#3034ruvnet wants to merge 3 commits into
ruvnet wants to merge 3 commits into
Conversation
…-time efConstruction (evaluated, REJECTED) Given AgentDB's HNSWIndex-backed memory search, decoupling the implicit query-time candidate-pool default from efConstruction (200) into a dedicated efSearch default (50) cuts per-query latency ~56-58% (paired t~-31, n=60) but breaches a pre-declared recall@10>=0.90 invariant at N=8000 (0.8767) while holding at N=3000 (0.9633). REJECT per this pipeline's own rule: a failed pre-declared criterion rejects regardless of primary-effect strength. Evidence retained for a follow-up with a higher or scale-adaptive efSearch default. Evaluation receipts, seeded benchmark harness (deterministic clustered corpus, live brute-force recall@10 ground truth, paired per-query timing), and comparison script committed alongside the candidate diff.
Committed in place of gh gist create (no gist-creation tool available in this environment, consistent with every prior dream-cycle night).
…08-15 2026-08-14 (swarm, REJECTED) had a fully-run pipeline (issue #3026, PR #3027) but its live ledger row was never appended — cosmetic gap, verified via git ls-remote / gh pr list before backfilling, not assumed. 2026-08-15 (performance, REJECTED): HNSWIndex efSearch query-time default vs build-time efConstruction. Issue #3033, PR #3034.
Owner
Author
|
The "🤝 Agent Coordination Tests (performance-benchmarker, 1)" failure on That commit is already superseded by Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Hypothesis
2. Candidate
v3/@claude-flow/memory/src/hnsw-index.ts+types.ts— 2 code lines changed, 1 interface field added:HNSWConfig.efSearch: number(new field, default 50)search()'s implicit-default line:Math.max(k, efConstruction)→Math.max(k, efSearch)Previously, every caller of
HNSWIndex.search()that omittedef(which is every production caller inagentdb-adapter.ts— no in-repo caller currently passesef) implicitly used the build-time graph-quality knob (efConstruction, 200) as the query-time latency/recall knob. This decouples them, matching standard HNSW practice.3. Evaluation Receipt
New seeded benchmark:
v3/@claude-flow/memory/benchmarks/results/scripts/efsearch-default-benchmark.mjs. Clustered synthetic corpus (256-dim, N=3000/8000, 60 queries/N), live brute-force recall@10 ground truth (never stored), paired per-query timing.4. Baseline Comparison
Baseline =
git stashthe candidate diff, rebuild, rerun the identical script; candidate = restore diff, rebuild, rerun. Same script, same seeds, two code states — seereceipt-baseline.json/receipt-candidate.json/comparison-efsearch-final.jsonin this PR.5. Darwin Lineage
Skipped — candidate failed its own pre-declared quality invariant (STEP 12 precondition: "candidate passed basic evaluation" not met). Running bounded generations over a rejected baseline would tune toward passing a floor that already caught a real problem.
6. Flywheel Evidence
No signed
@metaharness/flywheelbundle — bespoke deterministic benchmark, not an LLM-task corpus the replay/verify tooling targets. Evidence retained as committed receipts + the issue/gist report.7. Reward Hack Check
Manual checklist clear: gold computed live (not stored), no threshold tuned to pass (0.90 floor set before the final run and the candidate fails it), both N sizes reported including the failing one, seeds identical across baseline/candidate labels, zero API cost.
8. Security Review
Not security-sensitive: in-process vector-index query-default change only. No credential/network/filesystem/MCP-authority surface touched.
9. Regression Analysis
Existing test suite 456/456 minus 1 pre-existing environmental failure (root bypasses a read-only-file-permission test, confirmed identical with/without the candidate via stash/rebuild) → 455/456 both before and after. Zero regressions attributable to the candidate.
10. ADR
None — simple parameter-default change, and REJECTED; doesn't meet this pipeline's bar for an architectural decision record.
11. Research Gist
docs/dream-cycle/dream-gist-2026-08-15.md(this session had no gist-creation tool available, consistent with every prior dream-cycle night).12. Issue
#3033
13. Witness
45e65b5dae5d2c312e70cd5ba90df0701ea05c282f2de7910ca69da3752d18c67964927871cf8a8b8ce1c470d1d798170f5e81fdd756e6d92234275d44976fe47668e8713fa359481abd3d9d85e983ec94a4dd2d14. Merge Policy
Human review required. Do not self-merge. Do not autonomously promote Flywheel state. This PR is REJECTED evidence, retained for reviewability and follow-up, not intended to be merged as-is — see Recommendation §15 in issue #3033 for the proposed follow-up direction (higher/scale-adaptive
efSearchdefault, fixHNSWIndex.deserialize()'s persistence gap, re-test at production-realistic 1536-dim).Generated by Claude Code