fix(checkpoint): leave a ref alone if it appears while a legacy copy runs

main

Commit

Muskan Paliwal2d ago

A copy from v1 asks the remote before importing, but a ref can still appear locally in the meantime, such as a teammate's copy another process fetched. The import then laid v1's tree over it, dropping that ref's sessions from the tip, and the push fast-forwarded the remote. The copy now imports only into an absent ref and otherwise builds on the one that appeared. Migration still advances an existing ref.

The deleted-checkpoint reserved write test now checks the session lands on v1, so a dropped write fails it.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Entire-Checkpoint: 01M6G9VAYKJRWTTWGTZP9RS8RY