checkpoint: reshape facade to Stores.Persistent / Stores.Ephemeral() · Entire

checkpoint: reshape facade to Stores.Persistent / Stores.Ephemeral()

7b1005d→main·

Soph·3w ago·19 files·+49 added/-49 removed

The Open facade now exposes the two stores under lifecycle-named accessors: Stores.Primary -> Stores.Persistent (field) Stores.Temporary() -> Stores.Ephemeral() (method) and the strategy helpers follow: getCheckpointStore -> getPersistentStore getTemporaryStore -> getEphemeralStore

Callers read sto.Persistent.Read(...) / sto.Ephemeral().Write(...), the symmetric surface from the review feedback. No behavior change.

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

Sessions

Changes

19

66 unmodified lines

if err != nil {
    return nil, fmt.Errorf("open checkpoint store: %w", err)
}
return stores.Primary, nil
return stores.Persistent, nil
}

func newAttachCmd() *cobra.Command {

Mcmd/entire/cli/attach.go+1/-1

324 unmodified lines

return &attributionResolver{
    ctx:             ctx,
    repo:            repo,
    store:           stores.Primary,
    store:           stores.Persistent,
    fetchOnMiss:     fetchOnMiss,
    commitCache:     make(map[string]*object.Commit),
    checkpointCache: make(map[string]attributionCheckpointContext),
}

Mcmd/entire/cli/attribution.go+1/-1

1339 unmodified lines

if err != nil {
    return nil, "", fmt.Errorf("open checkpoint store: %w", err)
}
return ReadRawSessionLogForCheckpoint(ctx, stores.Primary, cpID)
return ReadRawSessionLogForCheckpoint(ctx, stores.Persistent, cpID)
// backfillSummary updates the summary field in the latest session's metadata.

Mcmd/entire/cli/checkpoint/committed.go+1/-1

19 unmodified lines