Add Mirror List Command Tests · Entire

Bottom line

Addressed the requested PR review comment (and the adjacent one) on cmd/entire/cli/repo_mirror.go.

What changed:

Heads-up — repo footgun I hit: mise run lint runs golangci-lint --fix, and a stale lint cache made nolintlint think the //nolint:ireturn directives in checkpoint/open.go and strategy/manual_commit.go were unused, auto-stripping them from those two unrelated files. I restored the directives (they now match HEAD) and confirmed it was a cache artifact — golangci-lint cache clean then a full run reports 0 issues. If you mise run lint with a stale cache it may strip them again; clear the cache first.

Tests pass; lint is clean. Not committed — yours to push.

Bottom line

One open high-severity finding on trail #631 — a real data race in my test helper. Fixed and pushed.

The finding: serveMirrorList wrote recordedRequest from the HTTP handler goroutine and read it from the test goroutine with no happens-before edge — -race would fail it. (Same gotcha the existing TestBearerOnlySource_NoCookieOnTheWire documents.)

The fix (8292221f9): Deliver the recorded request over a buffered channel; the test receives from it after the command runs, which is the synchronization edge. Verified with go test -race — all 5 subtests pass clean. Lint/gofmt clean.

To close it out: the finding (019eedf8-…) is still open — run when ready:

entire trail finding resolve 019eedf8-fa11-7624-ad26-c1a6e61fa851 --trail 631