Files
magpie/internal
yetone ce5d9f9d4e provider, gui: a held vendor read is "not refreshed this time" too, and a card refresh answered under another account still shows (#1630 review)
Review of hhh2210's f1c1be3c (applied as the commit before this one,
unchanged, onto origin/main).

- keepLast marked a reading deferred only when the error equalled one of
  the three "not read yet" sentinels. With allowances read only when asked,
  most vendors' reads are stopped by holdUnasked inside the HTTP client, so
  the error arrives wrapped ("Get \"https://…\": not read yet: …") and the
  card still said "couldn't be read just now". readDeferred now matches the
  sentinels inside the error; TestQuotaDeferredReadIsNotFailure has a
  "held request" case for it.
- quotaRefresh applied only the card whose key matched the refreshed one.
  A card first read without its account (no user) comes back under the
  account's name, and its reply was dropped until the next whole-page read.
  When the requested key isn't in the reply, the reply's list is taken as
  before f1c1be3c. quota-refresh-order.test.cjs covers it.

Broken by hand:
- the patch's exact-equality check back: "held request" fails with
  readDeferred = false, and the report check fails;
- ReadDeferred always false: saved / not asked / manual only / held
  request fail;
- ReadDeferred dropped from quotaReport: "CLI/gateway report lost
  readDeferred";
- fallback removed: "the refreshed card's reply was dropped";
- keepRefreshedQuotas call removed: both "older whole-page reply
  overwrote the refreshed card" cases fail;
- asOfText's deferred wording removed: usage-card-refresh fails "a request
  not made was described as failed" (chromium en/zh).

Run (worktree on origin/main, sandbox HOME, private GOCACHE):
- gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./...,
  GOOS=windows go vet ./... clean; go build, GOOS=linux -tags nogui and
  GOOS=windows builds ok.
- go test -tags nogui ./...: every package ok except internal/provider
  TestCopilotSecretToolUsername ("token """, the 5s secret-tool bound
  under load ~270, open as #1627); it passes alone -count=3. Nothing on
  that path changed here.
- GUI, chromium and webkit: quota-refresh-order, usage-card-refresh (all five
  languages), claude-usage-asked, quota-read-at, quota-reads,
  quota-reading-again, usage-refresh, usage-refresh-flight,
  usage-stale-answer, panel-usage, tray-usages, tray-usage-redraw,
  usage-remote-cards, usage-quota-head, quota-balance-error, quota-holds,
  usage-accounts, i18n-keys, gui-de, gui-ja, gui-zh-tw: all pass in both
  engines. The whole GUI suite was not run.

Not tried: the native app with a real saved Claude account; the response
ordering is injected in tests.
2026-10-14 21:54:12 +08:00
..
…
…