feat: checkpointWhen is required on Durable document definitions

Breaking change: defineDoc and defineDocFamily now require an explicit checkpointWhen predicate; no default is supplied. Set policies on built-in documents, examples, tests, and triage state, and document the required API.
This commit is contained in:
Mario Zechner 2026-10-19 18:17:42 +00:00
parent e86b054753
commit 5c1736f82d
39 changed files with 231 additions and 16 deletions

View file

@ -59,6 +59,7 @@ export type IssueState = {
type TriageState = { inboxSince: string; issues: Record<string, IssueState> };
const StateDoc = defineDoc<TriageState>({
checkpointWhen: (_value, _ops, { deltasSinceBase }) => deltasSinceBase >= 64,
kind: "triage.state",
version: 1,
scope: "session",