mirror of
https://github.com/himanshudongre/smriti.git
synced 2026-09-09 22:31:07 +00:00
Smriti can now run against a file-backed SQLite database with no Docker and no Postgres, removing the operate-a-backend burden for solo builders. Postgres remains the stronger shared/team mode, unchanged. - Portable column types (app/db/types.py): JSON renders as JSONB on PostgreSQL and generic JSON on SQLite; the pgvector embedding column renders as JSON on SQLite. Same models and create_all on both backends. - Mode resolution (config.py): SMRITI_DB_MODE=local|postgres, defaulting to local when unconfigured. An explicitly-set Postgres DATABASE_URL preserves Postgres behavior, so existing setups are unaffected. Local DB defaults to ~/.smriti/smriti.db; SMRITI_LOCAL_DB_PATH overrides. - SQLite engine setup (database.py): check_same_thread plus foreign_keys / WAL / busy_timeout pragmas; a lazy first-run create_all bootstrap on first DB use, which keeps the integration test suite insulated. - Removed the integration-test JSONB/VECTOR DDL substitution hack — the models are genuinely portable now, so conftest needs no type patching. - Alembic resolves its URL through the same logic (Postgres mode only). - New persistent file-backed SQLite smoke test, plus mode-resolution and per-dialect type-rendering tests. Local mode uses create_all, not Alembic. No schema changes. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_api_v2_git.py | ||
| test_api_v4_chat.py | ||
| test_api_v5_lineage.py | ||
| test_branch_disposition.py | ||
| test_checkpoint_extract.py | ||
| test_claim_worktree_binding.py | ||
| test_claims.py | ||
| test_current_state.py | ||
| test_delete_endpoints.py | ||
| test_health.py | ||
| test_local_sqlite_smoke.py | ||
| test_metrics.py | ||
| test_multi_branch_state.py | ||
| test_project_root_migration.py | ||
| test_repos_project_root.py | ||
| test_structured_tasks.py | ||
| test_worktrees.py | ||