Normalize checkpoint metadata during branch-to-refs migration

main

Commit

pfleidi2mo ago

Migrated checkpoints carried their v1-branch metadata verbatim: the legacy checkpoint_version stamp ("branch-v1") and sessions[] file paths relative to the sharded branch root, both wrong for a per-checkpoint ref whose tree root is the checkpoint itself.

The migration now rewrites the root metadata.json per checkpoint: checkpoint_version is dropped and any session string value under the branch prefix is rebased to the ref's tree root, matching native git-refs writes without hardcoding the SessionFilePaths field names. The JSON object is edited in place so fields this CLI doesn't model survive. Session subtrees carry over byte-identical (the metadata.json swap goes through ApplyTreeChanges, so sibling subtree hashes are untouched structurally), and idempotency compares against the normalized tree.

See https://github.com/entireio/cli/pull/1611#discussion_r3515937518

Entire-Checkpoint: 4e6e24afb3e3

Checkpoints

Fix Merge Conflicts and Checkpoint Migration

Claude CodeFable 5
View session
Checkpoint 1