I now have a complete picture. Here's my review.
Review: PR #1474 (feat/split-store-interface) vs Issue #1433 + comment 4722283362
What the PR is
PR #1474 (trail 614) is Phase 1 of the tracking issue #1433 ("Pluggable checkpoint stores"): split the fat checkpoint.Store so committed (pluggable) and temporary/shadow-branch (git-only) storage no longer share one interface. No new backend, no registry, no sync relocation — those are Phases 2/3.
Alignment with comment 4722283362 — strong
That comment is your own design response to pjbgf/pfleidi, and it deliberately goes further than the issue's original Phase 1 sketch. The PR implements the comment's design, not the older sketch:
| Comment 4722283362 proposed | PR implements | ✓ |
|---|
| Split session storage from checkpoint storage | SessionReader/Writer/Store + Reader/Writer/MetadataStore | ✓ |
| Fold 4 write methods into options | UpdateSession/UpdateCheckpoint + WriteOption | ✓ |
WithSummary/WithTranscript/WithAttribution | all present in committed_domain.go | ✓ |
Exact method mapping (WriteCommitted→WriteSession, UpdateCommitted→UpdateSession(WithTranscript), UpdateSummary→UpdateSession(WithSummary), UpdateCheckpointSummary→UpdateCheckpoint(WithAttribution)) | matches line-for-line | ✓ |
SessionRef opaque-ish {checkpointID, sessionID/index} | LatestSessionRef/SessionIndexRef/SessionIDRef | ✓ |
| Carve temporary out entirely, committed-only pluggable | TemporaryStore separate; CommittedStore = SessionStore + MetadataStore | ✓ |
AuthorReader as optional capability | present, type-asserted in explain | ✓ |
No standalone WriteCheckpoint today (materialized by first session) | correctly deferred — Writer only has UpdateCheckpoint | ✓ |
So the abstraction landed faithfully, including the subtle calls (deferring WriteCheckpoint, keeping SessionRef opaque for a future sessions-own-store world).
Findings status — all flagged items addressed
- pfleidi: "
Store too generic" → renamed to MetadataStore (9efa5de). ✓
- Copilot:
ReadSession always re-resolves index even with SessionIndexRef → fast-pathed in resolveSessionIndex (lines 366–369). ✓
- Copilot: attribution embeds full
CommittedReader → narrowed to committedCheckpointReader = Reader + SessionReader (checkpoint_reader.go). ✓
- Latest Bugbot (commit 887b239) → "no new issues." ✓
One finding I'd push back on as not fully resolved
The "No behavior change intended" claim is inaccurate for the empty-session path — and the Copilot/Cursor finding here is real, not a false positive.
- main (
committed.go:1171-1172): an empty-session checkpoint returns a distinct non-sentinel error "checkpoint has no sessions: %s".
- PR (
committed_reader_resolve.go:41-42, and resolveSessionIndexFromSummary at committed_domain.go:379): now returns ErrCheckpointNotFound.
The commit f39e8db21 "preserve empty summary lookup behavior" did not preserve main's behavior — it normalized to ErrCheckpointNotFound. That's arguably the better choice (Copilot itself preferred it), but it's an observable change, and the risk is concrete: callers that fall back to remote on ErrCheckpointNotFound will now treat an existing-but-empty checkpoint as missing and trigger a remote round-trip they previously wouldn't. I'd recommend one of:
- Add a test asserting the intended empty-session contract, and drop/qualify "no behavior change intended" in the PR body, or
- Confirm empty-session checkpoints are unreachable in practice and note that.
Minor nits (non-blocking)
Reader/Writer are very generic (committed_domain.go:180,186) — the same critique pfleidi made about Store. Package-qualified they're tolerable (checkpoint.Reader), but the comment originally proposed CheckpointReader/CheckpointWriter, which read better at call sites.
type Session = WriteCommittedOptions (line 20) is a transitional alias that leaks the old struct's shape through the new WriteSession API; fine for Phase 1, worth a follow-up to give sessions a purpose-built type.
UpdateSession with both transcript+summary produces two separate commits on the sessions branch (transcript via UpdateCommitted, summary via updateSessionSummary) — not atomic. Matches old behavior (they were separate calls), so no regression, but the single-call API now visually implies atomicity it doesn't have.
Bottom line
Phase 1 is implemented cleanly and matches the design you committed to in the comment, including the non-obvious decisions. The findings raised by reviewers are addressed except for the empty-session edge case, where the PR's "no behavior change intended" is technically wrong — that's the one item I'd resolve (test + PR-description correction) before merge. Everything else is naming/follow-up polish appropriate to defer.
Want me to draft the empty-session test and a PR-description correction?