ADR-0014 — Thinning keeps the newest N and each run's newest
- Status: Accepted
- Date: 2026-11-12
- Supersedes: none
- Authors: project maintainers
Context
Thinning retention (prune(..., keep_last=N)) keeps a thread's recent history and one checkpoint
per older run. A run is known only from the run_id key in checkpoint metadata, which is present
only when the caller put it in config metadata or configurable; a plain invoke does not store
it (inferred from upstream's metadata merge).
Decision
Thinning will keep the newest N checkpoints per namespace plus the newest checkpoint of each run
that carries a run_id. There is no fallback guess for checkpoints without one, and the
documentation tells callers to put run_id in config metadata.
Alternatives considered
- Guess runs from gaps in
stepor fromsource— rejected: a wrong guess deletes a checkpoint the caller meant to keep.
Consequences
- Callers who want one checkpoint per run kept must pass
run_id; without it thinning keeps only the newest N. DeltaChannelchains are kept as ADR-0013 says.
References
- architecture.md §7,
tests/integration/test_prune.py