Skip to content

refactor(adk): consolidate store implementations#638

Merged
cofin merged 6 commits into
mainfrom
agent/codebase-c11-adk
Jul 11, 2026
Merged

refactor(adk): consolidate store implementations#638
cofin merged 6 commits into
mainfrom
agent/codebase-c11-adk

Conversation

@cofin

@cofin cofin commented Jul 11, 2026

Copy link
Copy Markdown
Member

What changed

  • share common configuration, table state, logging, and lifecycle helpers across synchronous and asynchronous ADK base stores
  • implement synchronous adapter operations directly instead of forwarding through duplicate private wrappers
  • hoist adapter DDL templates so synchronous and asynchronous stores consume the same SQL definitions
  • centralize memory-store and artifact-backend sync/async dispatch
  • centralize owner-column configuration handling
  • align Oracle sync hash-partition DDL with the session table primary key used by the async store

Why

ADK session, memory, and artifact implementations had parallel paths that were costly to keep aligned. Consolidating their shared state, SQL, and dispatch behavior reduces drift while retaining each adapter's native database operations.

Impact

No public API changes are intended. Existing synchronous and asynchronous stores retain their contracts, and adapter-specific SQL remains adapter-owned. Oracle sync session tables configured for hash partitioning now partition on the existing id column instead of the nonexistent session_id column. Spanner and BigQuery implementations are unchanged.

Validation

  • complete ADK extension unit suite
  • concrete session, memory, and artifact store slot/property contracts
  • sync/async DDL equivalence across Psycopg, CockroachDB, MySQL Connector, and every Oracle JSON storage mode
  • owner-column, generated-column, covering-index, locality, table-option, and Oracle partition interpolation branches
  • focused Psycopg, CockroachDB, MySQL Connector, and Oracle unit suites
  • complete 17-backend ADK integration contract matrix
  • make lint
  • make type-check

@codecov-commenter

codecov-commenter commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.45161% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.92%. Comparing base (6bb5742) to head (e743f10).

Files with missing lines Patch % Lines
sqlspec/adapters/psycopg/adk/store.py 80.61% 17 Missing and 2 partials ⚠️
sqlspec/extensions/adk/store.py 79.22% 16 Missing ⚠️
sqlspec/adapters/cockroach_psycopg/adk/store.py 92.45% 7 Missing and 1 partial ⚠️
sqlspec/adapters/mysqlconnector/adk/store.py 88.70% 5 Missing and 2 partials ⚠️
sqlspec/adapters/sqlite/adk/store.py 91.30% 5 Missing and 1 partial ⚠️
sqlspec/extensions/adk/memory/service.py 73.33% 4 Missing ⚠️
sqlspec/extensions/adk/artifact/service.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #638      +/-   ##
==========================================
+ Coverage   76.82%   76.92%   +0.10%     
==========================================
  Files         473      473              
  Lines       66108    65850     -258     
  Branches     9821     9793      -28     
==========================================
- Hits        50785    50656     -129     
+ Misses      12031    11907     -124     
+ Partials     3292     3287       -5     
Flag Coverage Δ
integration 59.99% <68.81%> (-0.05%) ⬇️
py3.10 75.17% <86.45%> (+0.10%) ⬆️
py3.11 75.19% <86.45%> (+0.11%) ⬆️
py3.12 75.18% <86.45%> (+0.09%) ⬆️
py3.13 75.18% <86.45%> (+0.09%) ⬆️
py3.14 76.11% <86.45%> (+0.09%) ⬆️
unit 64.14% <76.98%> (+0.21%) ⬆️

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 61.24% <ø> (+1.77%) ⬆️
sqlspec/extensions/adk/_config_utils.py 85.26% <100.00%> (+2.10%) ⬆️
sqlspec/extensions/adk/artifact/store.py 84.84% <100.00%> (+11.03%) ⬆️
sqlspec/extensions/adk/memory/store.py 85.13% <100.00%> (+7.35%) ⬆️
sqlspec/extensions/adk/artifact/service.py 29.91% <62.50%> (+4.49%) ⬆️
sqlspec/extensions/adk/memory/service.py 37.66% <73.33%> (+8.67%) ⬆️
sqlspec/adapters/sqlite/adk/store.py 77.57% <91.30%> (-1.10%) ⬇️
sqlspec/adapters/mysqlconnector/adk/store.py 64.42% <88.70%> (+1.06%) ⬆️
sqlspec/adapters/cockroach_psycopg/adk/store.py 63.89% <92.45%> (+1.01%) ⬆️
sqlspec/extensions/adk/store.py 71.52% <79.22%> (-2.25%) ⬇️
... and 1 more

... 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 marked this pull request as ready for review July 11, 2026 02:58
@cofin cofin merged commit 9f8d3cb into main Jul 11, 2026
24 checks passed
@cofin cofin deleted the agent/codebase-c11-adk branch July 11, 2026 02:58
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