Changeset 0.17.1 (#76)
This commit is contained in:
@@ -60,7 +60,7 @@ v0.16.0 User Groups v0.17.0 Persona-KB Binding
|
||||
│
|
||||
┌───────┴──────────────┐
|
||||
│ │
|
||||
v0.17.1 SQLite Backend v0.17.2 CodeMirror 6
|
||||
v0.17.1 SQLite Backend ✅ v0.17.2 CodeMirror 6
|
||||
(dual DB) (editor bundle, chat
|
||||
│ input, ext editor)
|
||||
└───────┬──────────────┘
|
||||
@@ -244,46 +244,45 @@ Depends on: knowledge bases (v0.14.0), user groups (v0.16.0).
|
||||
|
||||
---
|
||||
|
||||
## v0.17.1 — SQLite Backend
|
||||
## v0.17.1 — SQLite Backend ✅
|
||||
|
||||
Dual-database support. Adding a second backend now means every subsequent
|
||||
schema change (memory, projects, channels restructure, auth) is developed
|
||||
against both Postgres and SQLite from day one — no retrofit. SQLite enables
|
||||
single-binary deployment for dev, demo, and single-user scenarios.
|
||||
Dual-database support. Every subsequent schema change is developed
|
||||
against both Postgres and SQLite from day one — no retrofit. SQLite
|
||||
enables single-binary deployment for dev, demo, edge, and single-user.
|
||||
|
||||
Depends on: v0.17.0 DB debt cleanup (store layer is sole DB interface,
|
||||
no raw `database.DB` calls remain).
|
||||
|
||||
**Rationale: Why here, not later**
|
||||
- v0.17.0 cleans up the last raw `ExecContext` bypass
|
||||
- v0.18.0 adds another `vector()` column (memory) — better to have the
|
||||
vector abstraction in place first
|
||||
- v0.19.0–v0.24.0 each add schema — every one benefits from dual-backend CI
|
||||
Depends on: v0.17.0 DB debt cleanup (store layer is sole DB interface).
|
||||
|
||||
**Store Layer**
|
||||
- [ ] SQLite implementations for all store interfaces
|
||||
- [ ] `DB_DRIVER` env var: `postgres` (default) | `sqlite`
|
||||
- [ ] Shared migration runner with dialect-aware SQL (or separate migration files per driver)
|
||||
- [ ] Connection pooling / WAL mode for SQLite concurrency
|
||||
- [ ] CI matrix: run integration tests against both Postgres and SQLite
|
||||
- [x] 19 SQLite store implementations covering all domain interfaces
|
||||
- [x] `DB_DRIVER` env var: `postgres` (default) | `sqlite`
|
||||
- [x] Separate migration files per driver (`migrations/sqlite/`)
|
||||
- [x] WAL mode + single-writer connection pooling for SQLite concurrency
|
||||
- [x] CI matrix: full handler integration tests against both Postgres and SQLite
|
||||
|
||||
**Vector Search Abstraction**
|
||||
- [ ] `VectorStore` interface extracted from `KnowledgeBaseStore` + `NoteStore`
|
||||
- [ ] Postgres implementation: pgvector cosine similarity (existing)
|
||||
- [ ] SQLite implementation: sqlite-vec extension, or feature-gated (KB search disabled without it)
|
||||
- [ ] Graceful degradation: if vector search unavailable, `kb_search` tool returns error hint, KBs still store/serve documents
|
||||
**Vector Search**
|
||||
- [x] App-level cosine similarity in Go (pure Go, no CGO/sqlite-vec required)
|
||||
- [x] Embeddings stored as JSON text in `kb_chunks.embedding` column
|
||||
- [x] Full feature parity with pgvector: `SimilaritySearch`, `InsertChunks`
|
||||
- [x] Graceful: adequate performance for SQLite-scale deployments (single-user, not millions of chunks)
|
||||
|
||||
**Schema Compatibility**
|
||||
- [ ] UUID generation: `gen_random_uuid()` → application-side UUID generation (Go `uuid.New()`)
|
||||
- [ ] JSONB columns → JSON text columns with application-side marshaling
|
||||
- [ ] `ARRAY` types (e.g. `granted_groups UUID[]`) → junction tables or JSON arrays
|
||||
- [ ] Timestamp handling: `TIMESTAMPTZ` → SQLite `TEXT` with ISO 8601
|
||||
- [ ] `ON CONFLICT` / upsert syntax alignment
|
||||
- [ ] Trigger syntax differences (PostgreSQL `EXECUTE FUNCTION` vs SQLite `BEGIN...END`)
|
||||
- [x] UUID generation: application-side `store.NewID()` (Go `uuid.New()`)
|
||||
- [x] JSONB → JSON text columns with `ToJSON()`/`ScanJSON()` helpers
|
||||
- [x] `UUID[]` arrays → JSON arrays with `ToJSONArray()`/`ScanJSONArray()`
|
||||
- [x] `TIMESTAMPTZ` → SQLite `TEXT` with `datetime('now')`
|
||||
- [x] `ON CONFLICT excluded.*` pattern (works in both dialects)
|
||||
- [x] `INSERT RETURNING id` → separate query pattern for SQLite
|
||||
|
||||
**Test Infrastructure**
|
||||
- [x] `dialectSQL()` converts `$N` → `?` and strips `::jsonb` at runtime
|
||||
- [x] `database.PH(n)` returns dialect-appropriate placeholder
|
||||
- [x] `database.TruncateAll()` dialect-aware (DELETE + PRAGMA vs TRUNCATE CASCADE)
|
||||
- [x] Generic provider config: `PROVIDER`/`PROVIDER_KEY`/`PROVIDER_URL` (replaces `VENICE_API_KEY`)
|
||||
- [x] Model selection prefers non-reasoning models in live tests
|
||||
|
||||
**What SQLite mode skips** (feature-gated, not broken):
|
||||
- [ ] pgvector-dependent features (KB similarity search, semantic note search) unless sqlite-vec available
|
||||
- [ ] `LISTEN/NOTIFY` (WebSocket event fan-out uses in-process EventBus instead — already works)
|
||||
- [x] `LISTEN/NOTIFY` — WebSocket event fan-out uses in-process EventBus (already works)
|
||||
- [x] Full-text search `tsvector` — conversation_search uses LIKE fallback
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user