migrate: don't clobber a valid ref on a transient refBase read error
Commit

MigrateBranchToRefs collapsed every refBase error to parent=ZeroHash, so a momentary read failure — a concurrent repack, lock contention — made the migration treat a still-valid checkpoint ref as absent, wrap the branch snapshot in a fresh orphan commit, and setRef over the good ref (discarding its history; the follow-up fast-forward-only push then rejects it).
Split the cases: an absent ref stays an orphan, a ref whose commit object is genuinely missing (ErrObjectNotFound: corrupt/pruned) is still re-imported as an orphan, but any other read error now aborts the checkpoint so an idempotent re-run retries rather than rewriting a ref that was only transiently unreadable.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 01KWY6NRP1P3QH7DA54EYCM61W