magpie's gateway listened ~9 s after start. A goroutine dump 3 s in had
main in provider.Allowances' first-ask wait: the start's migrations
(agent.RenameLegacy) read Pi's effort field, which builds Pi's model list,
which asks provider.Described (does any model see images), which ranks
the vision models by spent accounts, which asks each agent's allowances.
Each agent's first ask waits firstWait (3 s) for its accounts' usage over
the network. Every agent's model list asks Described, so the GUI's first
lists waited the same way.
Described only asks whether a model is there, not which account a request
goes to, so it now runs under provider.Unwaited: Allowances answers from
what is last known (the readings kept on disk) and starts the reading
behind it, as after firstWait. A request routed by the gateway still waits
as before.
Real history in a sandbox HOME (17,140 session files, every account
copied from this Mac's), the network blocked by a dead proxy, `magpie web`
started twice each:
- before (v0.1.2528 tree): gateway up at 9.8 s and 8.8 s.
- this change: 2.8 s and 0.6 s; first /api/sessions answered at 4.5 s and
2.1 s, against 12.2 s and 10.7 s.
Tests, on mote: TestUnwaitedAllowancesDontWait is new. Broken by hand
(Allowances waiting under Unwaited too) it fails: "took 20.0s".
go test ./internal/provider/ ./internal/gateway/ ./internal/agent/ ok
(gateway 740 s). gofmt -l clean; go vet (darwin), GOOS=windows go vet,
GOOS=linux go vet -tags nogui of provider and gateway ok.
Not run: the full suite; a start with the network up (the wait there
was the vendor's answer time, up to 3 s an agent); Windows and Linux.
Picked onto 2be5d206e (origin/main at push); not run again there.