Review Branch Changes and Fix Ref Spelling
Pi·GPT-5.6-terra·
Soph·1mo ago·1146hr 59min·2 Checkpoints·15 file changes·+439/-16·316.6K tokens

Finding
- P1
cmd/entire/cli/checkpoint/refs_store.go:480— remote lookup still fetches only the canonical ref name. A checkpoint written on a case-insensitive machine may be pushed under the folded spelling; a fresh case-sensitive clone has neither local spelling, callsFetchCheckpointRef(canonical), receives “not found,” and never tries the folded remote ref. This also makes remote-list discovery show a stub that cannot hydrate. RetryrefFetcherwithFoldedRefName(cid)after canonical remote absence, then resolve locally.
Tests: checkpoint package passed as part of mise run test -- ...; the overall command exceeded the 120s tool timeout.
Re-reviewed current HEAD (3529c0cba). No remaining findings.
The remote fallback now probes both canonical and folded refs, with coverage for successful folded fetches and transport-failure short-circuiting.
Verified with targeted tests:
Reduced the PR description: https://github.com/entireio/cli/pull/2484
I checked the review comments against current HEAD:
- Remote fetch fallback: already fixed by
3529c0cba(resolveRefMaybeFetchnow tries canonical then folded spelling). The Cursor/Copilot comments on that point are outdated. - Migration CAS / enqueue: valid.
migrate.gostill computesrefNamewithRefName(cid), whilerefBasemay resolve a packed folded ref. Migration can then CAS and enqueue the canonical name rather than the existing folded one, causing CAS retries/failure or a stale queue entry. - Existing queued canonical refs: valid. A queue entry created before this fix may name the canonical ref while the actual packed ref is folded.
partitionLocalRefsdoes exact lookup, drops that entry as stale, and leaves the checkpoint unpushed until another write re-enqueues it.
I’d address the latter two together: make migration select the resolved write spelling, and make queued-ref validation recognize the folded spelling rather than pruning it.
Implemented both valid review fixes.
migrate.gonow preserves an existing folded ref spelling for CAS and push-queue entries.- Push-queue processing resolves legacy canonical entries to a packed folded ref, normalizes the queue safely, and pushes the actual ref.
- Added migration and queued-push regressions.
Validated: