checkpoint: make Write(WriteRequest) the only public persistent write · Entire

checkpoint: make Write(WriteRequest) the only public persistent write

ef0c5a0→main· Soph·3w ago·25 files·+138 added/-137 removed

The committed write operations are now internal dispatch targets of Write(ctx, WriteRequest); callers use the request union exclusively: WriteCommitted -> writeSession (Write WriteSession{...}) UpdateCommitted -> backfillTranscript (Write BackfillTranscript{...}) UpdateSummary -> backfillSummary (Write BackfillSummary{...}) UpdateCheckpointSummary -> backfillAttribution (Write BackfillAttribution{...})

Production already wrote through the union; this migrates the test callers and unexports the dispatch targets, so 'Committed' is gone from the persistent write surface and Write is the single entry point. No behavior change.

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

Sessions

608f3d762503View transcript

Changes

25

424 unmodified lines

### Example Code

```python
# Seed the local branch with a checkpoint representing Alice's session.

alicesCheckpoint = id.MustCheckpointID("abcdef012345")
store = cpkg.NewGitStore(repo, cpkg.DefaultV1Refs())
if writeErr := store.WriteCommitted(context.Background(), cpkg.WriteOptions{
if writeErr := store.Write(context.Background(), cpkg.WriteSession{
CheckpointID: alicesCheckpoint,
SessionID: "alice-original",
Strategy: "manual-commit",

Other Important Functions

// CheckpointInfo contains summary information about a committed checkpoint.
type CheckpointInfo struct {
// CheckpointID is the stable 12-hex-char identifier
CheckpointID id.CheckpointID
}

// PrecomputeTranscriptBlobs holds blob hashes for a transcript that was
// chunked and written to the object store once, for reuse across multiple
// UpdateCommitted calls sharing the same transcript content.
func PrecomputeTranscriptBlobs(ctx context.Context, repo *git.Repository, transcript redact.RedactedBytes, agentType types.AgentType) (*PrecomputedTranscriptBlobs, error) {
raw := transcript.Bytes()

// The error handling demonstrates best practices applying to the checkpoint storage.
if err := store.UpdateCommitted(context.Background(), UpdateOptions{}) {
// Error handling logic
}
// UpdateSummary updates the summary field in the latest session's metadata.

{