You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extends the Rust + Datastar webui rewrite (#26–#31). Decision 2026-08-05: use Turso embedded (the in-process Rust SQLite rewrite, turso crate — not libSQL-the-fork, not Turso Cloud) as the local run store.
Why
ProgramDatabase (genesis/database/dbase.py) currently writes runs to ClickHouse via clickhouse_connect — a heavy external dependency for a single-user local research loop (docker-compose, URL env vars, connection health in the webui).
Turso embedded is in-process, SQLite-file-compatible, async, with native vector search — which maps directly onto the genotype/solution embeddings genesis stores for novelty (EmbeddingClient is already wired into dbase.py). Nearest-neighbour novelty checks become a DB query instead of numpy scans.
One file per experiment = trivially portable/archivable runs.
Shape
Writer (Python): ProgramDatabase gains a Turso backend via the official Python bindings (C FFI over the same engine). Schema: programs, generations, islands, lineage edges, embeddings (vector column).
ClickHouse demoted to optional: keep it as an opt-in sink for shared/long-term history, or drop it outright — decide here and record it. The webui's primary read path becomes Turso.
Risks to burn down first (spike before porting the schema)
Multi-process access: evolution loop (Python) writing while the webui (Rust) reads the same file. SQLite solves this with WAL + file locks; verify Turso beta's cross-process story explicitly. Fallbacks if it's not there yet: webui opens read-only snapshots, or the file format's SQLite compatibility means the Rust side can read with rusqlite until Turso matures.
Beta API drift: Turso Database is beta (v0.6.x as of May 2026, API still moving; libSQL is the production-ready sibling). Pin versions on both sides; keep the storage layer behind a trait/interface so a swap to libSQL is a contained change if beta bites.
Vector search parity: confirm the vector type + ANN query path exists in both the Rust crate and Python bindings before committing the novelty path to it.
Sequencing
Slots in alongside #27: land the spike (risks above) first, then #27's read model targets Turso rather than ClickHouse. Resolves #27's open "legacy sqlite keep-or-drop" question — legacy sqlite mode is superseded by this.
Extends the Rust + Datastar webui rewrite (#26–#31). Decision 2026-08-05: use Turso embedded (the in-process Rust SQLite rewrite,
tursocrate — not libSQL-the-fork, not Turso Cloud) as the local run store.Why
ProgramDatabase(genesis/database/dbase.py) currently writes runs to ClickHouse viaclickhouse_connect— a heavy external dependency for a single-user local research loop (docker-compose, URL env vars, connection health in the webui).EmbeddingClientis already wired into dbase.py). Nearest-neighbour novelty checks become a DB query instead of numpy scans.Shape
ProgramDatabasegains a Turso backend via the official Python bindings (C FFI over the same engine). Schema: programs, generations, islands, lineage edges, embeddings (vector column).tursocrate — no server between the webui and the data at all.Risks to burn down first (spike before porting the schema)
rusqliteuntil Turso matures.Sequencing
Slots in alongside #27: land the spike (risks above) first, then #27's read model targets Turso rather than ClickHouse. Resolves #27's open "legacy sqlite keep-or-drop" question — legacy sqlite mode is superseded by this.