smriti/backend
Bortlesboat 443d611821
Add source turn range tracking to checkpoints
Record which session turns produced each checkpoint under
metadata.source_turn_range at commit time.

The range covers only turns since the session's previous checkpoint,
within the same isolation boundary send_message and the draft endpoint
use: fork-local turns (sequence_number > 0) for forked sessions, and
post-mount turns (sequence_number > history_base_seq) when the commit
request carries mounted_checkpoint_id and history_base_seq.

- SourceTurnRange schema and a defensive parser live in app.schemas
- source_turn_range is exposed on the commit response, the space state
  commit, and lineage checkpoint nodes
- GET /api/v5/lineage/checkpoints/{id}/source-turns returns the turns
- The chat UI passes its mount state when committing

Addresses the open question in DECISIONS.md about tracking which turn
range produced a checkpoint.
2026-10-25 17:41:23 -04:00
..
alembic Add optional local-first SQLite mode (Phase A core) 2026-05-16 22:26:05 +05:30
app Add source turn range tracking to checkpoints 2026-10-25 17:41:23 -04:00
config Initial public release 2026-03-22 13:48:50 +05:30
tests Add source turn range tracking to checkpoints 2026-10-25 17:41:23 -04:00
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