repo mirror list: harden --sort test assertions

main

Commit

gtrrz-victor2mo ago

Two test gaps the review flagged:

  • Ordering checks used require.Less(strings.Index(a), strings.Index(b)), which passes when the earlier substring is absent (Index returns -1, and -1 < anyPresentIndex). Add a requireOrder helper that asserts presence before order, and route every ordering check through it.
  • The --show-available filter+sort test filtered down to one row before --sort ran, so the sort was never observed and a deleted/mis-wired sortAvailable call would still pass. Keep two rows after the filter and assert access orders read before write.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 01KX0BW5ZTM66F20FMJ1Z2NW5D

Checkpoints

Refactor Repo Mirror List Sorting and Filtering

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1