claude-switch-only set page.setDefaultTimeout(5000) and then called
page.goto with no timeout of its own, so Playwright held the first load
of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a
busy box (a whole-suite run at load 130-160) that load took longer and
goto timed out. The same pattern is in 988 GUI test files (1174 pages):
every one of them now also sets setDefaultNavigationTimeout(60000) on
the same page, right after its default, so goto, reload and waitForURL
wait on the load itself with room, while clicks and waits keep their
short bar. group-from-model-add's own 20s navigation bar is raised to the
same minute. claude-switch-only also gives its first provider row (drawn
from the page's first reads) a minute before clicking it.
nav-timeout.test.cjs (no browser) reads every GUI test file and names
each page given a default under a minute without a navigation timeout of
at least a minute, so a new file can't bring the pattern back.
What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from
other sessions):
- node --check on every file in internal/gui/tests: all parse.
- nav-timeout.test.cjs against origin/main's test files: red (names the
1174 pages); against this tree: its only reds were my own probe copies
of the old files, since removed.
- By hand: claude-switch-only with app.js served 7s late (a busy box's
first load), --test-name-pattern "1100 en": origin/main's file 4 of 4
red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green.
- claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420:
32 of 32. group-from-model-add, usage-access-key-card and i18n-keys:
green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red
on a 5s waitForFunction at line 115 (a wait after load, not the
navigation), at load ~230.
Not tried: the whole GUI suite (about 1000 files; the change is one
mechanical line per page), Windows or mote (mote's browsers, #4125).
Since 10-24 many ZCode Start Plan accounts get 405 {"code":3012,"msg":
"request has been blocked due to unusual activity."} on every request.
On several of them ZCode's own app (3.16.3) gets the same 405, and
ZCode's support bot calls 3012 risk control on the account. magpie said
"though magpie sends it as the ZCode app does; it can be a network block
of this IP", rested the account as an unknown failure, and asked it again
soon after.
- provider.ZCodeRestrictedHint: the words @magpie-community/opencode-
zcode-auth 0.1.27 puts after ZCode's own ("ZCode's risk control blocked
this account for unusual activity (code 3012); it rests, and the
group's other providers are used. If the ZCode app fails on this
account too, only ZCode support can lift the block").
- gateway: restrictedSaid reads those words as failRestricted, as
WorkBuddy's 11140: the account rests restrictedRest (2h), the next
member is asked, and the Routing page's lift button brings it back.
- Routing page: the hint replaces the old one, in zh, zh-TW, ja and de.
- zcode mover min 0.1.27 (npm view --prefer-online: 0.1.27).
Not proven: why ZCode flags these accounts. Diffed against ZCode 3.16.3's
glm/zcode.cjs: the Start Plan goes unsigned there too (client request
signing is off for zhipu-account start-plan), and the headers match the
plugin's. Not tried with a real blocked account.
Run (sandbox HOME, at this tree): go test ./internal/provider ok;
go test -tags nogui ./internal/gui/... ok; go test ./internal/gateway
-run 'ZCode|Restricted|Blocked|EdgeBlocked|Moved' ok, and the new
TestZCodeStartPlanBlockRestsRestricted is red with routing.go reverted;
go vet darwin, linux, windows on provider and gateway ok; gofmt clean.
GUI (Playwright 1.62.0, chromium + webkit): routing-zcode-blocked,
i18n-keys, routing-blocked, routing-wb-restricted, gui-de, gui-ja,
gui-zh-tw: 41 pass, 0 fail. Not run: the full ./... suite (the machine
had a queue of full suites at load ~120).
routing-proxy failed 2 to 3 runs in 8 in Chromium alone, and
routing-zcode-blocked 1 in 2, with "picking the request moved the page".
That rate goes back at least 800 commits, so no single commit turned it
red. Traced: the row's top was read right after the day's last request row
appeared. Those rows grow #rt above the list (294 -> 471 px), and the
day button's click is held in place by scrolling the view (219 px) for 4s
(held.until in app.js), but the ResizeObserver that does it runs before the
next paint, after the test's read. So `was` was taken from a frame no
user sees (the day button read 431 against 389 where it was clicked and
where it is painted), and the request click then measured the correction.
The app keeps its guarantee; the test measured too early.
The same read sat in ten tests: remote-group-served, routing-blocked,
-burst-speed, -kind, -proxy, -served, -shape, -upstream, -wb-refused and
-zcode-blocked. Each now reads the row once its top is the same on two
animation frames in a row. routing-failed-open already waited for that.
Run: routing-proxy and routing-zcode-blocked six times each in Chromium
(0 failures each, against 3/8 and 1/2 before). All ten files in Chromium
and WebKit, en and zh, pass. With the click hold switched off in the
served app.js (keepHeld and heldSizes) and a pick that scrolls the view by
60px, routing-proxy fails 2/2 in both engines.