feat(retrieval): reranker, type-weighted graph, MMR, importance, passage-window (v3.9.0)#50
Merged
Merged
Conversation
…age-window (v3.9.0) Five opt-in, off-by-default retrieval-accuracy levers — each measured, the default path byte-identical (deterministic retrieval-bench unchanged: recall@5 1.000 / MRR 0.984 / hit@1 0.969 / nDCG 0.988 / MAP 0.984) — plus hardening. Retrieval (ADR-0026/0027/0028): - Cross-encoder reranker behind the [rerank] extra (fastembed TextCrossEncoder, lazy, durable cache, fail-safe fallback); CLI/MCP/env surfaces; off by default. - Type-weighted graph recall (verb-weighted typed relations) + importance/in-degree bias (bounded hub boost), both deterministic and opt-in. - MMR diversification (stdlib, reuses stored chunk vectors) + passage-window expansion (ranking-neutral richer snippet). - Harder golden set: negative queries, scored separately in bench_recall so they measure abstention without corrupting positive aggregates. Convex fusion evaluated and deferred. Hardening: - Go daemon: fix service Start/Stop goroutine+watcher leak (cancellable ctx), watch newly-created subdirectories, stop debounce timer on exit; new lifecycle tests. - Node MCP bridge: guard JSON.parse, clearer errors + Python-missing hint, advertise the real package version; accurate vault_fts_search description. - CI: prettier now covers .mjs/.js/.cjs/.ts (formatted once), test-node on Linux+Windows+macOS, go test -race on Linux. Agent surface + docs: new knobs surfaced in AGENTS.md/.agents rules + installed memory-rules block (regenerated, no drift); ADR-0026/0027/0028; ARCHITECTURE + CHANGELOG; all six version markers -> 3.9.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The new cross-platform test-node matrix (this release) surfaced a latent
macOS-only failure: `safeVaultPath` correctly resolves symlinks, but the test
compared the result against the unresolved `os.tmpdir()` ("/var/folders/…"),
which on macOS is a symlink to "/private/var/…". Compare against `realpath(vault)`.
Code unchanged — the test's assertion was the naive part.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Makes the kit's retrieval more accurate with five opt-in, off-by-default levers — each measured, with the default path byte-identical (deterministic
retrieval-benchunchanged: recall@5 1.000 / MRR 0.984 / hit@1 0.969 / nDCG 0.988 / MAP 0.984) — plus real-defect hardening across Go/Node/CI.Retrieval accuracy (ADR-0026/0027/0028)
[rerank]extra (fastembedTextCrossEncoder, lazy, durable cache, fail-safe fallback). CLI--rerank/--rerank-model, envOBSIDIAN_MEMORY_RERANK, andvault_hybrid_search(rerank: true). Default model is multilingualjina-reranker-v2. Off by default.graphTyped) — verb-weighted typed relations (supersedes/implements>relates_to).importance) — bounded hub boost; completes the relevance×recency×importance triad.mmr) + passage-window expansion (passageWindow, ranking-neutral richer snippet).bench_recall(measure abstention without corrupting positive aggregates). Convex fusion evaluated → deferred.Hardening
serviceStart/Stop goroutine + watcher leak (cancellable ctx), watch newly-created subdirectories, stop debounce timer on exit; new lifecycle tests.JSON.parse, clearer errors + Python-missing hint, advertise the real package version; accuratevault_fts_searchdescription..mjs/.js/.cjs/.ts(formatted once),test-nodeon Linux+Windows+macOS,go test -raceon Linux.Docs / surface
New ADR-0026/0027/0028; ARCHITECTURE + CHANGELOG; new knobs surfaced in
AGENTS.md/.agentsrules / installed memory-rules block (regenerated, no drift). All six version markers → 3.9.0.Honest notes
Verification
All CI-exact gates green locally:
go test,pytest(103),npm test(34+50),version:check,sync-agents:check,prettier,markdownlint,linkcheck(110),retrieval-benchgate.🤖 Generated with Claude Code