magpie icon indicating copy to clipboard operation
magpie copied to clipboard

Listing plugin providers fails with context deadline exceeded: one provider may spend 35s (15s renewal + 20s list), over the 30s refreshDeadline and the 20s GUI budget

Open Beyfish opened this issue 1 month ago • 7 comments

What happens

On a machine with many plugin providers installed, listing their models fails with context deadline exceeded.

Nothing is wrong with the vendors or with the gateway. On the same machine, the passing-through gateway answers GET /v1/models in ~0.8 s (HTTP 200), and every row in plugin-providers.json still has an empty listError, so no plugin ever reported a vendor failure. The only error in play is context.DeadlineExceeded, raised by magpie's own deadline, before the host has used the time its own constants allow.

  • magpie app v0.1.1891
  • gateway 0.12.6
  • Windows 11, 35 plugin providers installed (32 of them signed in)

Why

Four budgets, each reasonable alone, none of which accounts for the one it contains.

1. One provider can legitimately take 35 s — internal/plugin/host.js

info() awaits fresh() before it runs the provider's models hook:

await fresh(id, k)
...
const next = limit > 0 ? await inTime(ask, limit, "the plugin's model list") : await ask()

fresh() waits up to RENEW_WAIT = 15 * 1000 for a due OAuth renewal, and the hook then gets listWait = 20 * 1000 (pluginListWait):

const RENEW_WAIT = 15 * 1000
await Promise.race([r, new Promise((ok) => (t = setTimeout(ok, RENEW_WAIT)))])

15 s + 20 s = 35 s for a single provider.

2. That is over the refresh budget — internal/plugin/providers.go

var refreshDeadline = 30 * time.Second
if err := callWithTimeout(ctx, "providers", map[string]any{"proxies": listingProxies()}, &ps, refreshDeadline); err != nil {

35 s > 30 s, so a background refresh always dies on a provider whose sign-in is due for renewal — and then retries (refreshTries = 3) with the same budget, failing the same way.

3. The editor's budget is shorter still — internal/gui/providers.go, case "models"

ctx, cancel := context.WithTimeout(r.Context(), 20*time.Second)
...
ms, dropped, err := ask.Refetch(ctx)

For a plugin provider the path is Refetch → fetch → plugin.Providers(ctx) (internal/provider/plugins.go) → plugin.Call(ctx, "providers", ...), and Call passes the caller's context straight into host startup and the RPC — callWithTimeout with timeout == 0 adds no budget of its own:

func Call(ctx context.Context, method string, params, out any) error {
	return callWithTimeout(ctx, method, params, out, 0)
}

So the editor's budget is 20 s: less than a single provider's worst-case chain (35 s), and it also has to cover host startup, which the host itself budgets at 2 minutes (context.WithTimeout(ctx, 2*time.Minute) in init).

4. And one provider's models re-list all of them — providers() in host.js

return Promise.all([...auths()].map(row))

auths() is built from every loaded plugin's auth hook, signed in or not, so all 35 are asked — with the provider id used as the account key for the unsigned ones, so their hooks still call their vendor. Inside row(), the first account is awaited before the others are asked in parallel:

const p = await via.run(through(), () => info(id, undefined, false, listWait))
const own = await Promise.all(keys.slice(1).map(...))

so a multi-account provider is two listWaits back to back — 40 s, plus the renewal.

Net effect: pressing Fetch models on one provider asks all 35 for their lists under a 20 s deadline, while one provider is allowed to spend 35 s (or 40 s with two accounts). The request does not fail because a vendor is slow; it fails because the sum of budgets magpie grants exceeds the budget the caller set.

Reproduce

  1. Install a few dozen plugin providers and sign in to most of them. OAuth ones whose expires fall inside the 5-minute RENEW_LEAD make it deterministic.
  2. In the provider editor, press Fetch models on any single provider (or let the provider list refresh).
  3. The editor answers context deadline exceeded at 20 s; the background refresh path records the same at 30 s.

Deterministic in isolation, too: a machine where one installed provider's OAuth renewal takes ~15 s is enough, no matter how fast the vendors are.

Expected

  • A listing a plugin can finish inside the host's own bounds is not killed by a shorter caller budget.
  • One provider whose sign-in is renewing lists late instead of taking the other providers down with it.
  • Asking for one provider's models does not re-list all providers.
  • The error, when it does happen, says which provider ran out of time instead of surfacing a bare context deadline exceeded.

Suggested fixes

  • Make the budgets nest. Count the renewal inside the per-provider budget — give the hook listWait - elapsed, or fold RENEW_WAIT into pluginListWait instead of adding them — so a provider's worst case stays under refreshDeadline by construction.
  • Keep callers above the worst case they can cause. case "models" should allow at least refreshDeadline, or pass no deadline and let the host-side bound apply; 20 s cannot outlive even one 35-second provider.
  • Renew ahead of the listing. fresh() already renews in the background for requests; a listing should not be the thing that pays RENEW_WAIT.
  • Don't re-list for one provider. Name the provider in the providers call, or let Refetch hand back the provider's own row.
  • Ask a provider's accounts in parallel, so a two-account provider costs one listWait, not two.
  • Say which provider stalled — refreshDeadline's error could name the provider (or providers) that had not answered, since plugin-providers.json keeps per-provider state already.

Beyfish avatar Oct 28 '26 13:10 Beyfish

take

ggbdpq avatar Oct 29 '26 22:10 ggbdpq

@Beyfish — thanks, the arithmetic is exactly as you laid it out, and it is fixed on top of current main (68b31ce23).

What was wrong. Each of the four budgets is fine alone; the host let them add up. info() waited up to RENEW_WAIT (15s) for a due renewal outside the models hook's listWait (20s), and providers() listed a provider's second account only after the first had finished, so one provider could cost 35s (40s with two accounts) against the 30s refreshDeadline and the editor's 20s. Every provider is asked side by side, so the sum — not any vendor — was the only thing over.

The fix (3 files, +154/−9):

  • internal/plugin/host.js info(): the renewal wait now spends the models hook's own budget — the hook gets what is left of listWait, so one provider costs one listWait, renewal included.
  • internal/plugin/host.js providers(): a provider's accounts are listed side by side (each hook still given the full listWait), so a two-account provider costs one listWait, not two.
  • internal/gui/providers.go case "models": the editor's budget is 30s — the same bound the host gives one providers RPC — instead of 20s, which could not outlive even one provider under the old arithmetic.

A provider whose sign-in is renewing then lists late on its own (its hook given up on alone, said so in listError, and keepListed still serves the last good list) instead of taking the whole listing down with a bare context deadline exceeded. Your other two suggestions — naming the provider in the providers call so one refetch doesn't re-list all 35, and renewing ahead of the listing — are still open and worth their own change; this patch only makes the budgets hold by construction.

Verification (bun 1.4.2, macOS; base 68b31ce23, head 4e0f4b3b5):

Check Command Result
Red: accounts back to back product files at base, tests kept: go test ./internal/plugin -run 'TestProviderListCoversAccountsSideBySide' FAIL — context deadline exceeded at the caller's 2.5s
Red: renewal wait outside the budget same base: go test ./internal/plugin -run 'TestRenewalWaitSpendsTheListBudget' FAIL — listing past refreshDeadline, nothing kept
Green, both tests with the fix, same commands PASS (1.6s / 30.1s)
Ablation fix reverted to base, tests kept, then restored red again (3.1s / 32.1s), green again
Full package go test -tags nogui -timeout 30m ./internal/plugin/... ok except TestHostToldTheGatewayAddress, which fails the same on a clean base worktree (pre-existing, port-notification race, untouched here)
Format / vet / build gofmt -l; go vet -tags nogui and go build -tags nogui for darwin/arm64, linux/amd64, windows/amd64 clean / OK (pre-existing cgo warnings in untouched darwin files)

Siblings: RENEW_WAIT's only reader is fresh(); its three callers besides info() are the request, usage and check-in paths, which wait so the request itself goes out with the new token and have no listing budget to overspend — left. inTime's other consumers bound a plugin's load and its config hook (loadWait), with no renewal before them — left. refreshDeadline's only production reader is refreshProviders; Providers(ctx)'s other callers (CLI commands, relist, migrate) pass budgets of their own that are not shorter than the host's worst case — left. keepListed/ListError still carry a stuck listing's why, unchanged (asserted by TestRenewalWaitSpendsTheListBudget).

Not verified: 35 providers on a real Windows machine; the editor end to end in the GUI (the 30s budget is read in code and covered by build/vet, not driven in a browser); -race on this package (not in CI's race matrix).


Source: reported in #4065.

Red without the fix (base 68b31ce23): with internal/plugin/host.js and internal/gui/providers.go reverted and the new tests kept, TestProviderListCoversAccountsSideBySide fails with context deadline exceeded and TestRenewalWaitSpendsTheListBudget fails with the listing past refreshDeadline; with the fix both pass, and reverting again turns them red again.

Siblings: rg -n "RENEW_WAIT|fresh\\(|inTime\\(|refreshDeadline|pluginListWait" internal/ → all consumers listed above; changed: host.js info()/providers(), gui/providers.go case "models"; left: request/usage/check-in fresh() callers, loadWait consumers, CLI/relist/migrate Providers callers (reasons inline).

When the read fails: a listing that gives up stays per-provider — fellBack with a non-empty listError — and the last good list keeps being served; a caller's timeout stays a caller error, not an empty list.

Not verified: real 35-provider Windows machine, GUI run, -race on internal/plugin.

Attribution: AI-written; I've read the whole diff and the tests pass. Please keep the author (ggbdpq) or add Co-authored-by: ggbdpq <[email protected]>.

Patch:

patch: provider, gui: a listing's budgets add up, and one provider's fetch models no longer re-lists past them (#4065) — git am applies it as is; SHA-256 first 16: 53021246688cd3a3

From 4e0f4b3b5aeedc74338c06e3e6b1896b15b73fc6 Mon Sep 17 00:00:00 2001
From: ggbdpq <[email protected]>
Date: Fri, 30 Oct 2026 06:29:48 +0800
Subject: [PATCH] provider, gui: a listing's budgets add up, and one provider's
 fetch models no longer re-lists past them (#4065)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

What changed

The budgets a listing of the plugins' providers is made of added up past
the budgets its callers set: the host let one provider spend listWait
(20s) on its models hook plus the wait for a due renewal (RENEW_WAIT,
15s) before it, and a provider with two accounts spent them back to
back. One provider could be allowed 35s (40s with a second account) —
past the 30s refreshDeadline the background refresh asks under and past
the editor's own 20s — so pressing Fetch models, or a refresh, died with
a bare "context deadline exceeded" while no vendor had failed: every
provider is asked side by side, and the sum of the budgets was the only
thing over.

Now the host's own bounds hold by construction:

- host.js info(): the wait for a due renewal (fresh) spends the models
  hook's own budget — the hook is given what is left of listWait, and
  the renewal wait can no longer be added on top of it.
- host.js providers(): a provider's accounts are listed side by side
  (the first no longer waited for before the rest), so one provider
  costs one listWait, not one per account.
- gui/providers.go, case "models": the editor's budget is 30s, the same
  the host bounds one providers RPC with, instead of 20s — shorter than
  even one provider's worst case under the old arithmetic.

A provider whose renewal is slow then lists late (its hook given up on
alone, said so in listError as any other stuck listing) instead of
taking the whole listing past the caller's deadline (#4065).

Run

- TestProviderListCoversAccountsSideBySide, two accounts whose hooks
  each take 1.5s under a 2.5s caller budget: with the product files at
  the base (68b31ce23) and the tests kept, the listing dies with
  "context deadline exceeded"; with the fix it stands and both accounts
  are listed (1.6s).
- TestRenewalWaitSpendsTheListBudget, a renewal that never finishes
  waited 15s before a 5s hook given 6s of its own, under a 17s
  refreshDeadline: with the product files at the base the listing goes
  past refreshDeadline and nothing is kept; with the fix the listing
  stands and the provider fell back, its listError saying so.
- internal/plugin full suite (go test ./internal/plugin -tags nogui):
  ok, and gofmt/vet clean.

Generated-by: GLM-5.3-Flash (ZCode)
---
 internal/gui/providers.go                     |   5 +-
 internal/plugin/host.js                       |  26 ++--
 internal/plugin/providers_list_budget_test.go | 132 ++++++++++++++++++
 3 files changed, 154 insertions(+), 9 deletions(-)
 create mode 100644 internal/plugin/providers_list_budget_test.go

diff --git a/internal/gui/providers.go b/internal/gui/providers.go
index 4260b9532..425581b0a 100644
--- a/internal/gui/providers.go
+++ b/internal/gui/providers.go
@@ -2085,7 +2085,10 @@ func providerRoutes(mux *http.ServeMux, w Windows) {
 				fail(rw, err)
 				return
 			}
-			ctx, cancel := context.WithTimeout(r.Context(), 20*time.Second)
+			// as long as the plugins' host bounds one providers RPC itself
+			// (30s, plugin.refreshDeadline): a plugin's Fetch models is one
+			// listing of every provider, which may spend all of it (#4065)
+			ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second)
 			defer cancel()
 			ask := *p
 			if req.Typed {
diff --git a/internal/plugin/host.js b/internal/plugin/host.js
index 1ed552cbd..f45f58d8b 100644
--- a/internal/plugin/host.js
+++ b/internal/plugin/host.js
@@ -1800,13 +1800,18 @@ async function info(id, key, strict, limit) {
     // would be asked with the serving plugin's account
     if (server && h.spec !== server && signsIn(h.spec).includes(id)) continue
     const k = key ?? accountsOf(readAuth(), id)[0] ?? id
+    // the wait for a due renewal spends the hook's own budget: one
+    // provider then costs one listWait in a listing, not listWait plus
+    // the renewal wait — the sum (15s + 20s) took a single provider past
+    // refreshDeadline, and the whole listing with it (#4065)
+    const began = Date.now()
     await fresh(id, k)
     const all = readAuth()
     try {
       const given = JSON.parse(JSON.stringify(out))
       const l = { tried: false, lastOk: false }
       const ask = () => listing.run(l, () => inScope(id, k, () => ph.models(given, { auth: authCopy(k) })))
-      const next = limit > 0 ? await inTime(ask, limit, "the plugin's model list") : await ask()
+      const next = limit > 0 ? await inTime(ask, Math.max(limit - (Date.now() - began), 0), "the plugin's model list") : await ask()
       // a hook that asked its vendor, got no list and gave back the one it
       // was given fell back: magpie keeps the list it had, as a built-in
       // whose fetch failed keeps the one it fetched last; so does one that
@@ -1983,13 +1988,18 @@ async function providers({ proxies } = {}) {
     const keys = accountsOf(stored, id)
     const through = (k) => proxies?.[id]?.[k ?? keys[0] ?? ""] ?? proxies?.[id]?.[""] ?? ""
     const gen = infoGen
-    const p = await via.run(through(), () => info(id, undefined, false, listWait))
-    keepInfo(keys[0] ?? id, p, gen)
-    // each account's own models, as the built-ins read each account's: a
-    // plan may serve fewer, or others, than the first account's. One that
-    // can't be read is taken to have them all, or the ones it was last
-    // told to have, as a built-in account whose fetch failed keeps its own.
-    const own = await Promise.all(keys.slice(1).map((k) => via.run(through(k), () => info(id, k, true, listWait)).then((q) => (keepInfo(k, q, gen), q)).catch((e) => ({ failed: true, listError: e?.message ?? String(e) }))))
+    // every account is listed side by side, each hook given listWait: a
+    // second account no longer waits behind the first, where two
+    // listWaits back to back took one provider past refreshDeadline twice
+    // over (#4065)
+    const [p, own] = await Promise.all([
+      via.run(through(), () => info(id, undefined, false, listWait)).then((q) => (keepInfo(keys[0] ?? id, q, gen), q)),
+      // each account's own models, as the built-ins read each account's: a
+      // plan may serve fewer, or others, than the first account's. One that
+      // can't be read is taken to have them all, or the ones it was last
+      // told to have, as a built-in account whose fetch failed keeps its own.
+      Promise.all(keys.slice(1).map((k) => via.run(through(k), () => info(id, k, true, listWait)).then((q) => (keepInfo(k, q, gen), q)).catch((e) => ({ failed: true, listError: e?.message ?? String(e) })))),
+    ])
     const models = { ...p.models }
     for (const q of own) for (const [k, m] of Object.entries(q?.models ?? {})) models[k] ??= m
     const ids = (q) => Object.values(q.models).filter((m) => m.status !== "deprecated").map((m) => m.id)
diff --git a/internal/plugin/providers_list_budget_test.go b/internal/plugin/providers_list_budget_test.go
new file mode 100644
index 000000000..6d1a195c3
--- /dev/null
+++ b/internal/plugin/providers_list_budget_test.go
@@ -0,0 +1,132 @@
+package plugin
+
+import (
+	"context"
+	"fmt"
+	"os"
+	"path/filepath"
+	"strings"
+	"testing"
+	"time"
+)
+
+// The budgets a listing is given must add up: each account's models hook
+// gets listWait, so a provider with two accounts listed back to back costs
+// two, and a renewal waited for before the hook spends the hook's budget
+// besides. One provider could then be allowed 35s (RENEW_WAIT 15s +
+// listWait 20s) — over the 30s refreshDeadline and the editor's own
+// budget — and one slow sign-in took every provider's list down with it
+// (#4065).
+
+// A provider whose models hook is slow for each of its two accounts, with
+// no renewal due (no auth.refresh): listing it side by side costs one
+// listWait, back to back costs two.
+func listBudgetPlugin(t *testing.T, hookMillis int) string {
+	t.Helper()
+	spec := filepath.Join(t.TempDir(), "plugin.mjs")
+	js := fmt.Sprintf(`export default async () => ({
+  config(c) { c.provider ??= {}; c.provider.budget = { name: "BudgetCo", models: { "b-1": { name: "B One" } } } },
+  auth: { provider: "budget", methods: [{ type: "api", label: "API key" }] },
+  provider: { id: "budget", models: async p => { await new Promise(r => setTimeout(r, %d)); return p.models } }
+})`, hookMillis)
+	if err := os.WriteFile(spec, []byte(js), 0o600); err != nil {
+		t.Fatal(err)
+	}
+	return spec
+}
+
+// A two-account provider is listed with its accounts side by side: one
+// provider costs one listWait, not one per account, and stays under the
+// caller's budget.
+func TestProviderListCoversAccountsSideBySide(t *testing.T) {
+	sandbox(t)
+	// each hook is given listWait and finishes within it; two of them in a
+	// row do not fit the caller's budget, side by side they do
+	oldList := pluginListWait
+	pluginListWait = 2 * time.Second
+	t.Cleanup(func() { pluginListWait = oldList })
+	ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
+	defer cancel()
+
+	abs, _ := filepath.Abs(listBudgetPlugin(t, 1500))
+	if _, err := Add(ctx, abs); err != nil {
+		t.Fatal(err)
+	}
+	for _, who := range []string{"one", "two"} {
+		if _, err := Import(ctx, "budget", map[string]any{"type": "oauth", "access": "a-" + who, "accountId": who + "@budget"}); err != nil {
+			t.Fatal(err)
+		}
+	}
+	// the editor's own budget: a listing that fits the host's own bounds
+	// is not killed by the caller's
+	call, stop := context.WithTimeout(context.Background(), 2500*time.Millisecond)
+	defer stop()
+	ps, err := Providers(call)
+	if err != nil {
+		t.Fatalf("a two-account provider listed back to back outlived the caller's budget: %v", err)
+	}
+	if len(ps) != 1 || ps[0].ID != "budget" || len(ps[0].Models) == 0 {
+		t.Fatalf("Providers = %+v, want budget's models", ps)
+	}
+	if len(ps[0].Accounts) != 2 {
+		t.Fatalf("Accounts = %+v, want both listed", ps[0].Accounts)
+	}
+}
+
+// A sign-in due for renewal is waited for before the models hook runs, and
+// that wait spends the hook's own budget: one provider then costs one
+// listWait in a listing, not listWait plus the renewal wait, so it stays
+// under refreshDeadline and one renewing sign-in no longer takes the
+// whole listing down with it (#4065).
+func TestRenewalWaitSpendsTheListBudget(t *testing.T) {
+	sandbox(t)
+	// the renewal never finishes (a vendor stuck); the wait for it is
+	// bounded by the host's own RENEW_WAIT (15s). The hook takes 5s and is
+	// given listWait = 6s of its own, so back to back the provider costs
+	// 20s — over the 17s refreshDeadline. With the wait spent out of the
+	// hook's budget the listing ends at ~15s: the provider falls back, the
+	// list stands.
+	spec := filepath.Join(t.TempDir(), "plugin.mjs")
+	js := `export default async () => ({
+  config(c) { c.provider ??= {}; c.provider.renewbudget = { name: "RenewBudget", models: { "rb-1": { name: "RB One" } } } },
+  auth: {
+    provider: "renewbudget",
+    methods: [{ type: "api", label: "API key" }],
+    async refresh(auth) { await new Promise(ok => setTimeout(ok, 60000)); return { access: "a-1", refresh: auth.refresh + "+", expires: Date.now() + 3600e3 } }
+  },
+  provider: { id: "renewbudget", models: async p => { await new Promise(r => setTimeout(r, 5000)); return p.models } }
+})`
+	if err := os.WriteFile(spec, []byte(js), 0o600); err != nil {
+		t.Fatal(err)
+	}
+	oldList, oldDeadline := pluginListWait, refreshDeadline
+	pluginListWait, refreshDeadline = 6*time.Second, 17*time.Second
+	t.Cleanup(func() { pluginListWait, refreshDeadline = oldList, oldDeadline })
+	ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
+	defer cancel()
+
+	abs, _ := filepath.Abs(spec)
+	if _, err := Add(ctx, abs); err != nil {
+		t.Fatal(err)
+	}
+	soon := time.Now().Add(time.Minute).UnixMilli() // inside the 5-minute lead
+	if _, err := Import(ctx, "renewbudget", map[string]any{"type": "oauth", "refresh": "r", "access": "old", "expires": soon, "accountId": "due@renewbudget"}); err != nil {
+		t.Fatal(err)
+	}
+	UseCached(nil)
+
+	Cached()
+	Refreshed()
+	if !refreshCacheGood() {
+		t.Fatal("a renewal waited for before its provider's models hook took the whole listing past refreshDeadline")
+	}
+	ps, ok := Listed()
+	if !ok || len(ps) != 1 || ps[0].ID != "renewbudget" {
+		t.Fatalf("Listed = %+v, %v", ps, ok)
+	}
+	// the hook out of its own time is that provider's fallback, said so,
+	// not a bare deadline for every provider
+	if !ps[0].FellBack || !strings.Contains(ps[0].ListError, "didn't finish") {
+		t.Fatalf("FellBack = %v, ListError = %q, want the hook given up on alone, said so", ps[0].FellBack, ps[0].ListError)
+	}
+}
-- 
2.50.1 (Apple Git-155)

Branch: hunt101-w2a-4065-list-budget (head 4e0f4b3b5).

ggbdpq avatar Oct 29 '26 22:10 ggbdpq

Rebased onto current main (482e88314); head is now 46fc03940. Nothing upstream touched internal/plugin/host.js, internal/gui/providers.go or the test file in the meantime, so the patch is unchanged and git am applies as is.

Re-verified on the new base: TestProviderListCoversAccountsSideBySide and TestRenewalWaitSpendsTheListBudget pass; go build, gofmt and go vet clean.

Branch: hunt101-w2a-4065-list-budget (head 46fc03940).

ggbdpq avatar Oct 30 '26 16:10 ggbdpq

Shipped in v0.1.2258 (7da972969), gua2100's patch, author kept. The review widened the two new tests' timings so a busy machine can't fail them. A provider's accounts are now listed side by side, a slow renewal's wait comes out of that provider's own budget instead of adding to it, and the provider editor waits 30s. Checked on the Mac mini (whole plugin package) and on Windows (the new tests); both tests go red with host.js put back.

Still open, not changed here: /api/sync, the CLI's refresh and the editor's other model fetches still give a plugin provider 8s while it lists every plugin provider. One provider's fetch still lists them all. Not tried: a Windows machine with 35 real providers. Keeping this open: @Beyfish please say whether the model list loads on v0.1.2258.

yetone avatar Oct 30 '26 18:10 yetone

Confirming this fix is in the release line:

  • Adopted upstream as 7da97296 — first shipped in v0.1.2258 (earliest v0.1.* tag containing it, measured with git tag --contains); also present in the current v0.1.2277.
  • Re-ran the two listing-budget tests on the v0.1.2277 tree (go test -tags nogui -count=1):
--- PASS: TestProviderListCoversAccountsSideBySide (3.16s)
--- PASS: TestRenewalWaitSpendsTheListBudget (30.07s)
ok  	github.com/yetone/magpie/internal/plugin	33.422s

As the ship note above says, this covers the listing-budget arithmetic (a provider's accounts listed side by side, a slow renewal's wait taken out of the provider's own budget, the editor waiting 30s); the areas it leaves open — /api/sync, the CLI refresh, the editor's other fetches still at 8s, and one provider's fetch still re-listing every plugin provider — are unchanged by this commit. Not exercised here: a Windows machine with 35 real providers.

From the patch side this is done — happy for this to close once the reporter confirms.

ggbdpq avatar Oct 30 '26 22:10 ggbdpq

Thanks @ggbdpq for tracing the release line and re-running the two budget tests on v0.1.2277 — noted: 7da97296, first shipped in v0.1.2258. Appreciate the thorough follow-through on this one.

Beyfish avatar Nov 10 '26 07:11 Beyfish

跟进:修复 7da97296 已随 v0.1.2258 发布,@ggbdpq 在 v0.1.2277 上重跑过两个 budget 测试;本机当前 v0.1.3853,没有待补的复验材料。

@yetone 建议关闭本 issue;若插件列表再出现 context deadline exceeded,我会带版本与超时日志重开。

Beyfish avatar Nov 12 '26 12:11 Beyfish