migrate: pin metadata rebasing to the native git-refs layout
Commit

normalizeMigratedMetadata rebases session paths by string-stripping the "/<shard>/<id>" prefix rather than round-tripping through the metadata model the git-refs writer uses, and nothing tied the two code paths together. The rebasing is correct for today's layout, but if the native layout ever drifts — a renamed session dir, a new path field, a field that isn't simply prefix-relative — the migration would silently ship checkpoints whose paths a native reader can't resolve.
Add a regression test that writes the same checkpoint content two ways — natively via the git-refs store and migrated from the git-branch store — and asserts their root-metadata session paths are identical. Any future divergence between the writer and the migration now fails loudly.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 01KWY7PAG1KG98TP2RHZX9RP6K