update cleanup topology comments · Entire

update cleanup topology comments

ce29f83→main· pfleidi·1mo ago·1 file·+3 added/-3 removed

Describe orphan detection in terms of the configured committed read ref now that cleanup reads through checkpoint topology.

Sessions

acf1b21817c1View transcript

?\ Implement Checkpoints v1.1 Topology CoverageCodex·GPT-5.5·1 step

Changes

1

141 unmodified lines

142
143
144
145
145
146
147
148
19 unmodified lines

168
169
170
171
171
172
173
174
21 unmodified lines

196
197
198
199
199
200
201
202

141 unmodified lines

// ListOrphanedSessionStates returns session state files that are orphaned.
// A session state is orphaned if:
//   - No checkpoints on entire/checkpoints/v1 reference this session ID
//   - No checkpoints on the configured committed read ref reference this session ID
//   - No shadow branch exists for the session's base commit
//
// This is strategy-agnostic as session states are shared by all strategies.
19 unmodified lines

return []CleanupItem{}, nil
    }

// Get all checkpoints to find which sessions have checkpoints
    // Get all committed checkpoints from the configured read ref to find which sessions have checkpoints
    cpStore := checkpoint.NewCommittedReadStore(ctx, repo)

sessionsWithCheckpoints := make(map[string]bool)
21 unmodified lines

continue
    }

// Check if session has checkpoints on entire/checkpoints/v1
        // Check if session has checkpoints in committed checkpoint storage
        hasCheckpoints := sessionsWithCheckpoints[state.SessionID]

// Check if shadow branch exists for this session's base commit and worktree

Mcmd/entire/cli/strategy/cleanup.go+3/-3