smriti/backend
Himanshu Dongre 3b6ef000dc Detect repo drift against the last checkpoint
The repo-state section added by the previous commit shows working-tree
and git-upstream drift. It does not answer the question Smriti's trust
story actually needs: has the repo moved since the last checkpoint?

Record git provenance on checkpoints and compare against it. The CLI
captures the git HEAD and branch when it creates a checkpoint; the V4
commit endpoint stores that under the commit's context_blob and returns
it on read. `smriti state` then compares the working repo against the
latest checkpoint's recorded HEAD/branch and surfaces:
  - repo unchanged since the last checkpoint
  - repo is N commit(s) ahead — recorded state may be stale
  - repo history has diverged from the last checkpoint
  - the last checkpoint was taken on a different branch

All local and read-only: no fetch, no reconciliation. Checkpoints made
before this feature (or by the MCP server) record no git state and are
simply left uncompared.
2026-05-19 23:22:22 +05:30
..
alembic Add optional local-first SQLite mode (Phase A core) 2026-05-16 22:26:05 +05:30
app Detect repo drift against the last checkpoint 2026-05-19 23:22:22 +05:30
config Initial public release 2026-03-22 13:48:50 +05:30
tests Detect repo drift against the last checkpoint 2026-05-19 23:22:22 +05:30
alembic.ini Initial public release 2026-03-22 13:48:50 +05:30
Dockerfile Initial public release 2026-03-22 13:48:50 +05:30
pyproject.toml Load .env via python-dotenv so extractor gets API keys reliably 2026-04-12 13:11:57 +05:30