Files
magpie/internal/gui
yetone 482653868b gui: a provider row's read-once test measures the row's own work apart (#6375)
TestProviderInfoReadsTheListOnce was red on main since e6184b368 on
ubuntu and macOS CI (10367939 bytes against a list of 1015856, bound
5 lists). The row still reads the list once. e6184b368 made p.Available()
8x cheaper (8572862 to 1015856 bytes on mote) while each model's own
price, window and protocol look-ups stayed at ~5.4 MB, so a bar of
"5 lists" stopped meaning anything.

The test now measures three things: the list (p.Available()), the
listing a row is built from (p.Listing()), and the row's own work with
the listing handed in (providerInfoWith). A row reading the list once
takes listing + rest; the bound leaves half a list of room, so one more
read of the list is red.

Run on mote at origin/main e9e63c6d7 + this:
- go test -run TestProviderInfoReadsTheListOnce -count=5 ./internal/gui:
  ok, a row 10358027..10447395 bytes against listing + rest
  10400727..10417507.
- Broken by hand: an extra p.Available() in providerInfo makes it red
  (11411529 against a bound of 10947066). The old bound let that pass.
- Bisected at 66f98d9d6 and ac15036ab (green, list 8.57 MB) against
  e6184b368 (red, list 1.02 MB).
- go vet ./internal/gui ok, gofmt -l clean.

Not tried: Linux. The WSL box has no gtk4/webkitgtk-6.0 dev packages,
so internal/gui doesn't build there; ubuntu CI ran the same numbers as
mote before this. Not run: the rest of internal/gui (test-only change
to this one file). TestShimWaitsPastSavedUsage/refreshed, red on macOS
CI in the same run, is a separate test and not touched here.

Fixes #6375
2026-11-13 07:05:00 +08:00
..
…
…