smriti/backend/tests/integration
Himanshu Dongre f22056418d Add optional local-first SQLite mode (Phase A core)
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.
2026-05-16 22:26:05 +05:30
..
__init__.py Initial public release 2026-03-22 13:48:50 +05:30
conftest.py Add optional local-first SQLite mode (Phase A core) 2026-05-16 22:26:05 +05:30
test_api_v2_git.py Initial public release 2026-03-22 13:48:50 +05:30
test_api_v4_chat.py Add V3 dirty paths and skill pack v2.1 2026-05-04 13:11:20 +05:30
test_api_v5_lineage.py Harden lineage note indicator semantics 2026-04-13 20:44:07 +05:30
test_branch_disposition.py Add branch disposition for lifecycle closure: integrated, abandoned, active 2026-04-13 13:03:22 +05:30
test_checkpoint_extract.py Add structured tasks with intent hints for autonomous work selection 2026-04-13 22:27:32 +05:30
test_claim_worktree_binding.py Add V2 worktree-bound claims 2026-05-04 12:16:32 +05:30
test_claims.py Add collision detection tests for task-referenced claims 2026-04-14 00:30:07 +05:30
test_current_state.py Add Project Current State endpoint and UI panel 2026-05-16 20:01:16 +05:30
test_delete_endpoints.py Add delete endpoints for spaces, checkpoints, and sessions 2026-04-11 17:25:36 +05:30
test_health.py Add V2 worktree-bound claims 2026-05-04 12:16:32 +05:30
test_local_sqlite_smoke.py Add optional local-first SQLite mode (Phase A core) 2026-05-16 22:26:05 +05:30
test_metrics.py Add space metrics endpoint and sync docs with current product surface 2026-04-14 01:11:56 +05:30
test_multi_branch_state.py Add canonical project root for spaces 2026-05-04 13:43:44 +05:30
test_project_root_migration.py Add canonical project root for spaces 2026-05-04 13:43:44 +05:30
test_repos_project_root.py Add canonical project root for spaces 2026-05-04 13:43:44 +05:30
test_structured_tasks.py Add end-to-end integration tests for structured task round-trip 2026-04-13 22:48:48 +05:30
test_worktrees.py Polish worktree short ids and clean finish (#5) 2026-05-04 15:28:19 +05:30