repo mirror list: replace generic sortRows with concrete sorters
main·
Commit

Sorting only ever covers two fixed 3-column sets, so the generic sortRows[T]/sortMirrorsDefault split wasn't earning its complexity and had two ordering bugs:
- desc was read from the raw spec but the column name from the trimmed
spec, and the two call sites passed raw vs trimmed, so
--sort " -repo"behaved differently between the mirror and --show-available lists. - only default/
--sort repogot the (owner/repo, clusterHost) tiebreak; every other column fell back to a single-key sort, leaving duplicate-key rows in arbitrary server order across runs.
Replace with a shared parseSortColumn (trims before reading direction) plus concrete sortMirrors/sortAvailable that always apply the owner/repo(+cluster) tiebreak, so every column is deterministic and whitespace is handled the same on both paths.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 01KX0AYB67E5W5XWBJBK70GV80
Checkpoints
Checkpoint 1