Skip to content

feat: create the Recall database automatically and lead the Recall docs with the intended workflow - #1222

Merged
kvlonge merged 7 commits into
mainfrom
feat/recall-auto-database
Oct 22, 2026
Merged

kvlonge merged 7 commits into
mainfrom
feat/recall-auto-database

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Why

Setting up a shared ClickHouse Recall store still needed the database created by hand, and the docs and agent skill presented running sqb recall schema --ddl yourself as the setup route. After the version row expired, a store with previous-version views (same columns) could be recorded as current without its views being replaced. Orchestrator context was stored as a Python repr, so it could not be queried.

Changes

  • A writer allowed to run DDL creates a missing Recall database (CREATE DATABASE IF NOT EXISTS) and says so once, even if later setup fails or is retried, followed by a plain success line. Existing databases are untouched. A writer that may not gets the exact statements; sqb recall schema --ddl prints them too.
  • Views whose definitions set join_use_nulls count as the previous version whatever the version row says: writers with DDL replace them, restricted writers warn. Newer stores are never downgraded.
  • invocations.external_context is stored as JSON.
  • Docs and skill: Recall creates and upgrades its own store, with tested writer grants and a note for self-managed clusters; --ddl only for restricted writers. Also store selection, recording, the default format, checking values before filtering, common queries and statements.query_id.

Verification

  • ClickHouse E2E: database created with notice (all rights, documented grants); existing database not re-created; refused writer gets statements and writes after they run; database created but tables refused reports both; documented grants replace older views and add a missing column; older views replaced or warned; JSON job query.
  • Writer test: the creation notice survives refused and retried setup, exactly once.
  • Integration test runs the documented common queries from the Recall page.
  • Existing ClickHouse Recall E2E and Recall integration tests, sqlbuild-recall tests, make check-ci and the hygiene scanner pass.

@kvlonge
kvlonge enabled auto-merge (squash) October 22, 2026 19:46
@kvlonge
kvlonge merged commit 65a5ee0 into main Oct 22, 2026
46 checks passed
@kvlonge
kvlonge deleted the feat/recall-auto-database branch October 22, 2026 20:30
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