Skip to content

test(core): close reranker phase-1 coverage gaps - #1232

Merged
phernandez merged 3 commits into
mainfrom
test/1231-reranker-phase1
Aug 11, 2026
Merged

test(core): close reranker phase-1 coverage gaps#1232
phernandez merged 3 commits into
mainfrom
test/1231-reranker-phase1

Conversation

@phernandez

Copy link
Copy Markdown
Member

Phase 1 + the small-fixes section of #1231 (reranker test plan, post-#1143 audit).

Commits

  • fix(core): align reranker defaults and timeout config — the FastEmbed constructor's
    stale Xenova/ms-marco-MiniLM-L-6-v2 default now references the shared
    DEFAULT_FASTEMBED_RERANK_MODEL constant; new reranker_timeout config field
    (default 30.0, gt=0) threads through the factory to the LiteLLM provider and joins the
    singleton cache key (litellm only, so fastembed keys are unaffected). Documented in the
    semantic-search guide; FastEmbed ignores it by design.
  • fix(mcp): preserve retryable search outages — the ChatGPT-compatible search adapter
    no longer collapses rerank 503s into "Internal search error": it detects search_notes'
    service-unavailable response and returns a distinguishable "Search temporarily
    unavailable, retry shortly" payload so OpenAI clients can retry.
  • test(core): close reranker phase-1 coverage gaps
    • The 9 repository-integration rerank tests no longer skip on Postgres: a backend-aware
      rerank_search_repository fixture runs the identical scenarios against
      SQLiteSearchRepository and PostgresSearchRepository (37 pass on each backend, zero
      skips), so hybrid/vector rerank ordering is guarded in the main unit shards.
    • New FTS negative guard: with a provider configured (exploding fake), text/title/
      permalink searches never invoke it and match baseline ranking.
    • Wiring-seam tests: create_search_repository injects the provider into both backends;
      repository __init__ self-resolution only fires when semantic_search_enabled.
    • reranker_max_document_chars verified end-to-end from config to the document text the
      provider receives.

Verification

  • Focused suites (pipeline, factory, providers, ChatGPT adapter, config CLI): 148 passed.
  • BASIC_MEMORY_TEST_POSTGRES=1 pipeline run: 37 passed, no skips (testcontainers).
  • just typecheck, just lint: clean.

Ticks the Phase 1 and small-fixes checkboxes on #1231; Phases 2-4 (real-model smoke, live
provider harness, quality regression, operational drills) remain tracked there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CPdSXDbYyhyZ1TwgFnpEv8

Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Signed-off-by: phernandez <paul@basicmachines.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant