migrate: --dry-run no longer writes loose git objects

main

Commit

Soph2mo ago

migratedCheckpointTree ran before the dry-run guard and, for any checkpoint whose metadata needs normalizing, called CreateBlobFromContent

  • ApplyTreeChanges — both persist via SetEncodedObject. So a "preview" that promises to report "without writing" left a dangling blob + tree per checkpoint in the object store (thousands on a large v1 branch, until a future git gc).

Thread the dry-run flag into migratedCheckpointTree: when not persisting, compute the normalized blob and tree hashes in memory (git hashes are content-addressed, so an object encoded but not stored hashes identically to a persisted one) and return without touching the object store. The persisting path is unchanged. A new test asserts the object count is unchanged across a dry-run, and another migrates for real then dry-runs again and asserts the checkpoint is recognized as already-migrated — pinning the in-memory hash to the persisted tree hash.

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

Checkpoints

Fix Git Migration Ref and Metadata Handling

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1

Investigate CLI Enable Backend Ping

Claude Code
View session
Checkpoint 1