Skip to content

fix(adk): repair PostgreSQL vector memory search (#726) - #727

Merged
cofin merged 6 commits into
mainfrom
fix/adk-pgvector-search
Aug 23, 2026
Merged

fix(adk): repair PostgreSQL vector memory search (#726)#727
cofin merged 6 commits into
mainfrom
fix/adk-pgvector-search

Conversation

@cofin

@cofin cofin commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

PostgreSQL ADK memory stores omitted persisted embeddings and bound vector operands in a form that required optional pgvector client codecs. BM25 capability detection also relied on pg_search although the index and operator require pg_textsearch.

This persists nullable embeddings and casts PostgreSQL vector bindings through float8[], applies the cast to vector and hybrid searches, and validates cached pg_textsearch capability before BM25 DDL or queries.

Fixes #726

@codecov-commenter

codecov-commenter commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.28916% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.08%. Comparing base (6a7433d) to head (cd38499).

Files with missing lines Patch % Lines
sqlspec/adapters/psycopg/config.py 73.33% 5 Missing and 3 partials ⚠️
sqlspec/adapters/asyncmy/adk/store.py 14.28% 6 Missing ⚠️
sqlspec/adapters/psycopg/adk/store.py 33.33% 2 Missing and 2 partials ⚠️
sqlspec/adapters/asyncpg/config.py 80.00% 1 Missing and 2 partials ⚠️
sqlspec/adapters/asyncpg/adk/store.py 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #727      +/-   ##
==========================================
+ Coverage   76.95%   77.08%   +0.13%     
==========================================
  Files         487      487              
  Lines       69755    69819      +64     
  Branches     9662     9676      +14     
==========================================
+ Hits        53677    53819     +142     
+ Misses      12643    12541     -102     
- Partials     3435     3459      +24     
Flag Coverage Δ
integration 60.60% <43.37%> (+0.09%) ⬆️
py3.10 75.35% <69.87%> (+0.13%) ⬆️
py3.11 75.36% <69.87%> (+10.70%) ⬆️
py3.12 75.38% <69.87%> (+0.14%) ⬆️
py3.13 75.37% <69.87%> (+0.14%) ⬆️
py3.14 76.28% <69.87%> (+0.12%) ⬆️
unit 65.14% <68.67%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/adapters/asyncmy/config.py 90.59% <100.00%> (ø)
sqlspec/adapters/asyncmy/litestar/store.py 80.46% <100.00%> (+0.15%) ⬆️
sqlspec/config.py 93.92% <100.00%> (ø)
...xtensions/adk/migrations/0001_create_adk_tables.py 80.80% <100.00%> (+2.15%) ⬆️
sqlspec/adapters/asyncpg/adk/store.py 64.37% <60.00%> (+3.19%) ⬆️
sqlspec/adapters/asyncpg/config.py 93.20% <80.00%> (+0.77%) ⬆️
sqlspec/adapters/psycopg/adk/store.py 61.02% <33.33%> (+9.30%) ⬆️
sqlspec/adapters/asyncmy/adk/store.py 59.54% <14.28%> (+0.09%) ⬆️
sqlspec/adapters/psycopg/config.py 89.97% <73.33%> (-0.63%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin
cofin merged commit 4f7afc5 into main Aug 23, 2026
27 checks passed
@cofin
cofin deleted the fix/adk-pgvector-search branch August 23, 2026 18:02
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.

[Bug]: ADK Memory Store vector distance search fails with 'operator does not exist: vector <=> double precision[]'

2 participants