checkpoint: unify committed writes behind Store.Write(ctx, WriteRequest)

main

Commit

Soph3mo ago

Replace the four-method committed writer surface (WriteCommitted / UpdateCommitted / UpdateSummary / UpdateCheckpointSummary) with a single Store.Write(ctx, WriteRequest) entry point and a sealed request union:

WriteSession -> create/replace a session (former WriteCommitted) BackfillTranscript -> stop-time transcript finalize (former UpdateCommitted) BackfillSummary -> async summary backfill (former UpdateSummary) BackfillAttribution -> root combined attribution (former UpdateCheckpointSummary)

WriteSession/BackfillTranscript are defined types over the existing option structs, so the migration is zero payload churn (T(opts) round-trips) and call sites stay flat (checkpoint.WriteSession{...}). Each request carries exactly its own fields, so the shared-option-bag footgun (an attribution option silently no-oping on a session write) is impossible by construction.

A single Write is also the natural mirror/fan-out target: a multi-backend store just forwards the request value. The CommittedStore interface now embeds Writer; the concrete per-operation methods remain on GitStore as the implementation Write dispatches to (and as the direct entry point for the git-store unit tests). Unknown request types surface an error rather than being silently ignored.

Production call sites migrated; committed_write_test.go covers every dispatch case plus the unsupported-request and not-found paths.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 957b03f1f773

Checkpoints

Code Review: Keyring Timeout and Store Improvements

Claude Code
View session
Checkpoint 1

can you look at this branch / pr also in the context of https://github.com/entireio/cli/issues/1433 and especially https://github.com/entireio/cli/issues/1433#issuecomment-4722283362

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1