Skip to content

test(storage): add OceanBase embedding-failure text fallback coverage… - #1153

Open
kic635 wants to merge 1 commit into
oceanbase:mainfrom
kic635:fix/issue-1094-oceanbase-embedding-fallback
Open

test(storage): add OceanBase embedding-failure text fallback coverage…#1153
kic635 wants to merge 1 commit into
oceanbase:mainfrom
kic635:fix/issue-1094-oceanbase-embedding-fallback

Conversation

@kic635

@kic635 kic635 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix #1094.
Add required-path unit coverage for OceanBase search when query embeddings are unavailable and the path must fall back to text retrieval (follow-up from PR #1052).
No production code changes.

Solution Description

Add tests/unit/test_oceanbase_embedding_fallback.py with two layers of coverage:

  1. StorageAdapter routing
    • auto / fts / hybrid with query_embedding=None and a text query are forwarded to an OceanBase-like store
    • vector mode without embedding returns empty and does not call the store
    • vector-only OceanBase backends (hybrid_search=False) return no false-positive results
    • threshold / filter / sparse / fusion / candidate_limit controls are forwarded correctly
  2. OceanBaseVectorStore production paths
    • real _vector_search safety belt: vectors=None / [] returns empty and does not call ann_search
    • FTS SQL generation and threshold behavior on the production FTS path
    • auto / hybrid without vectors still run FTS after the empty vector branch
    • weighted fusion with FTS-only results
    • remote parallel hybrid path
    • native hybrid falls back to application hybrid when vectors are missing
      Verified locally with:
python -m pytest tests/unit/test_oceanbase_embedding_fallback.py -v

…oceanbase#1094)

Cover StorageAdapter routing and OceanBaseVectorStore search paths when query embeddings are unavailable, including vector-only backends that must not return false positives.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copy link
Copy Markdown
Member

LGTM

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.

Add OceanBase coverage for embedding-failure text fallback

2 participants