Files
magpie/internal/catalog
yetone 224ea7d5be catalog: a reset drops what a request built of the old catalog
5351343e7 keeps what a request built of the catalog for the next
request within heldFor, dropped by every write magpie makes. A reset
of models.dev's catalog (catalog.Reset) wasn't one of them: Sync tells
Touched after it, but a Reset alone left the providers' entries with
the old windows and output limits for up to a second, and Pi's and
Crush's model lists written in that second carried them
(TestPiModelsCarryMaxTokens, TestCrushModelsCarryMaxTokens red in the
full run: "unknown output sent: ...maxTokens:131072"). Reset now tells
Forget (provider.Changed) after it lets go of its lock.

Test: TestHoldKeptUntilAWrite gains "the catalog reset". Broken by
hand (Reset not telling Forget): red, "the catalog reset: built 0
times, want 1", and both agent tests red again; fixed, the agent tests
pass 3 of 3.

Run: go test ./internal/catalog -count 1: ok (3.4s); go test
./internal/provider -run TestHoldKeptUntilAWrite: ok; go test
./internal/agent -run 'TestPiModelsCarryMaxTokens|TestCrushModelsCarryMaxTokens'
-count 3: ok; go vet ./internal/catalog ./internal/provider.
2026-10-19 15:19:31 +08:00
..