# update cleanup topology comments

`ce29f83`→[main](/content/gh/entireio/cli/commits/main/index.html)· 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](/content/gh/entireio/cli/session/019e8f5e-17a2-7961-8175-b19fa7a97f39#timeline-acf1b21817c1/index.html)

## Changes

1

- cmd/entire/cli/strategy

- Mcleanup.go+3/-3

```
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
