Skip to content

feat(adk): align stores with ADK 2 contract#525

Open
cofin wants to merge 2 commits into
mainfrom
feat/adk-2.0.0-updates
Open

feat(adk): align stores with ADK 2 contract#525
cofin wants to merge 2 commits into
mainfrom
feat/adk-2.0.0-updates

Conversation

@cofin

@cofin cofin commented Jun 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Align SQLSpec ADK session and memory stores with the ADK 2 scoped contract and current event_data record shape.
  • Restore explicit sync-store surfaces for sync-backed adapters and bridge them from SQLSpecSessionService for async ADK callers.
  • Add reset migration coverage for recreated ADK tables and update adapter contract tests across Oracle, Postgres, Spanner, SQLite, DuckDB, MySQL-family, and ADBC paths.
  • Retire stale duplicate adapter-local ADK CRUD/event tests that were superseded by the shared contract matrix.

Validation

  • make lint
  • make type-check
  • .venv/bin/python -m pytest tests/unit/extensions/test_adk tests/unit/adapters/test_oracledb/test_oracle_adk_store.py tests/unit/adapters/test_psycopg/test_adk_store.py tests/unit/adapters/test_spanner/test_adk_store.py tests/integration/adapters/sqlite/extensions/adk/test_memory_store.py tests/integration/adapters/sqlite/extensions/adk/test_owner_id_column.py tests/integration/adapters/duckdb/extensions/adk/test_memory_store.py tests/integration/adapters/duckdb/extensions/adk/test_store.py tests/integration/adapters/adbc/extensions/adk/test_dialect_support.py tests/integration/adapters/adbc/extensions/adk/test_owner_id_column.py tests/integration/adapters/adbc/extensions/adk/test_memory_store.py -q
  • git diff --check
  • rg -n "event_json" sqlspec/extensions/adk sqlspec/adapters tests/integration/adapters/*/extensions/adk tests/unit/extensions/test_adk tests/unit/adapters -g '*.py'

@codecov-commenter

codecov-commenter commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.04469% with 1323 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.12%. Comparing base (5c375d3) to head (09269e2).

Files with missing lines Patch % Lines
sqlspec/adapters/mysqlconnector/adk/store.py 64.81% 122 Missing and 11 partials ⚠️
sqlspec/adapters/psycopg/adk/store.py 62.38% 117 Missing and 9 partials ⚠️
sqlspec/adapters/cockroach_psycopg/adk/store.py 64.58% 110 Missing and 9 partials ⚠️
sqlspec/adapters/adbc/adk/store.py 63.27% 94 Missing and 7 partials ⚠️
sqlspec/adapters/duckdb/adk/store.py 52.91% 88 Missing and 1 partial ⚠️
sqlspec/adapters/psqlpy/adk/store.py 53.80% 74 Missing and 5 partials ⚠️
sqlspec/adapters/pymysql/adk/store.py 74.00% 69 Missing and 9 partials ⚠️
sqlspec/adapters/aiomysql/adk/store.py 63.10% 67 Missing and 9 partials ⚠️
sqlspec/adapters/asyncmy/adk/store.py 64.25% 65 Missing and 9 partials ⚠️
sqlspec/adapters/sqlite/adk/store.py 64.32% 65 Missing and 6 partials ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
+ Coverage   74.90%   75.12%   +0.22%     
==========================================
  Files         442      443       +1     
  Lines       55120    57603    +2483     
  Branches     8697     8891     +194     
==========================================
+ Hits        41287    43276    +1989     
- Misses      11149    11523     +374     
- Partials     2684     2804     +120     
Flag Coverage Δ
integration 59.62% <58.12%> (+0.99%) ⬆️
py3.10 73.45% <63.04%> (+1.66%) ⬆️
py3.11 73.47% <63.04%> (+1.66%) ⬆️
py3.12 73.46% <63.01%> (+1.66%) ⬆️
py3.13 73.46% <63.01%> (+1.67%) ⬆️
py3.14 74.29% <62.93%> (+0.26%) ⬆️
unit 60.48% <28.57%> (-1.44%) ⬇️

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

Files with missing lines Coverage Δ
sqlspec/adapters/oracledb/adk/store.py 57.80% <ø> (+14.45%) ⬆️
sqlspec/config.py 92.99% <100.00%> (ø)
sqlspec/extensions/adk/_config_utils.py 84.00% <100.00%> (+2.75%) ⬆️
sqlspec/extensions/adk/_types.py 100.00% <100.00%> (ø)
sqlspec/extensions/adk/converters.py 100.00% <100.00%> (ø)
...xtensions/adk/migrations/0001_create_adk_tables.py 0.00% <0.00%> (ø)
sqlspec/extensions/adk/service.py 73.01% <77.19%> (+9.92%) ⬆️
sqlspec/extensions/adk/memory/store.py 71.52% <58.33%> (+0.09%) ⬆️
...extensions/adk/migrations/0002_reset_adk_tables.py 35.93% <35.93%> (ø)
sqlspec/adapters/asyncpg/adk/store.py 56.47% <60.17%> (-2.11%) ⬇️
... and 14 more

... and 4 files with indirect coverage changes

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

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.

2 participants