Skip to content

feat(retrieval): one search path, recency decay, honest degradation#476

Merged
plind-junior merged 1 commit into
mainfrom
feat/retrieval-defaults
Jul 13, 2026
Merged

feat(retrieval): one search path, recency decay, honest degradation#476
plind-junior merged 1 commit into
mainfrom
feat/retrieval-defaults

Conversation

@plind-junior

Copy link
Copy Markdown
Member

step 3 of the roadmap (.superpowers/roadmap.md): make good retrieval the default and stop lying about degradation.

  • kb.search had three copies of the backend waterfall (mcp, jsonl, cli) and they had already drifted — fusion landed in kb.context while kb.search auto still waterfalled embedding-first. context.search_kb is now the single implementation; the mcp tool and jsonl handler delegate to it. auto fuses embedding + fts5 via rrf and falls back to substring only when both are empty; an omitted backend defers to retrieval.backend in config.yaml (the starter default is hybrid).
  • honesty block: search and context responses carry retrieval = {configured, used, semantic_available, degraded}. a base install (no embeddings extra) serving lexical hits reports used=fts5 + degraded=true instead of a hollow hybrid label.
  • retrieval.recency: a config-gated half-life decay (default 90 days, whole-day quantized so same-day scores are deterministic) blended into fused context-pack scores — fresher knowledge outranks equally-relevant stale knowledge. rescoring-only; an artifact never vanishes from the pack. enabled in the starter config for new kbs; existing kbs keep byte-identical ordering until they add the key.

covered by new tests in test_retrieval_backend.py (recency on/off, degradation reporting, config-default backend, substring fallback, mcp/jsonl parity through search_kb). full local gate green: pytest, mypy, ruff.

kb.search had three copies of the backend waterfall (mcp, jsonl, cli)
and they drifted: fusion landed in kb.context while kb.search auto
still waterfalled embedding-first. context.search_kb is now the one
implementation; mcp and jsonl delegate to it. auto fuses embedding +
fts5 via rrf with a substring fallback, and an omitted backend defers
to retrieval.backend in config.yaml.

a retrieval block on search and context responses reports configured
vs used backend, semantic availability, and a degraded flag — a base
install serving lexical hits under a semantic-capable name now says
so instead of labelling them hybrid.

retrieval.recency blends a half-life decay (default 90 days, whole-day
quantized) into fused context-pack scores so fresher knowledge
outranks equally-relevant stale knowledge. rescoring-only: an old
artifact loses at most half its score and never vanishes. on by
default in the starter config; existing kbs keep byte-identical
ordering until they opt in.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@plind-junior, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a1daef7c-0e0f-4db2-8cc5-393e28e4ea43

📥 Commits

Reviewing files that changed from the base of the PR and between f1826ac and e7d6e76.

📒 Files selected for processing (6)
  • src/vouch/context.py
  • src/vouch/index_db.py
  • src/vouch/jsonl_server.py
  • src/vouch/server.py
  • src/vouch/storage.py
  • tests/test_retrieval_backend.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/retrieval-defaults

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added mcp mcp, jsonl, and http surfaces storage kb storage, migrations, schemas, and proposals retrieval context, search, synthesis, and evaluation tests tests and fixtures size: L 500-999 changed non-doc lines labels Jul 13, 2026
@plind-junior plind-junior merged commit 803bbf7 into main Jul 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp mcp, jsonl, and http surfaces retrieval context, search, synthesis, and evaluation size: L 500-999 changed non-doc lines storage kb storage, migrations, schemas, and proposals tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant