checkpoint: extract shared getSessionTree for session-level reads

main

Commit

Soph3mo ago

The four SessionReader methods (ReadSessionMetadata, ReadSessionPrompts, ReadSessionMetadataAndPrompts, ReadSessionContent) each repeated the same prologue: context check, getFetchingTree, navigate to the checkpoint tree, then the session subtree, with identical ErrCheckpointNotFound wrapping.

Extract that navigation into getSessionTree so each reader is just "resolve session tree, read the files it needs." Behavior is unchanged — the helper returns the same ErrCheckpointNotFound (wrapping "session N not found" when the session subtree is missing).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 9cd97a095dda

Checkpoints

Review Checkpoint Commit f16b7101

CodexGPT-5.5
View session
Checkpoint 1

Review GitStore Temporary Store Split

CodexGPT-5.5
View session
Checkpoint 1

Review InitialAttribution Rename Commit

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Committed Types Rename

CodexGPT-5.5
View session
Checkpoint 1

Review Persistent Reads Collapse Commit

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Write API Changes

CodexGPT-5.5
View session
Checkpoint 1

Review Ephemeral Vocabulary Renaming Changes

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Ephemeral Reads/Lists Collapse

CodexGPT-5.5
View session
Checkpoint 1

Review Ephemeral Writes Unification Commit

CodexGPT-5.5
View session
Checkpoint 1

Code Review for Stores Architecture Reshape

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Store Rename Refactoring

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Vocabulary Commit

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint API Extraction Changes

CodexGPT-5.5
View session
Checkpoint 1