AGENTS.md: the table's subscriptions are retired, not moving; the plugin
does everything, the built-ins' code is gone but for what the movers
read; the "fix the built-in too" step is gone; the parity tests hold
each plugin to what its built-in did.
gateway-routing.md: no bridges to a vendor's own API are left, so the
structured-output, tool-image and billing-line lists lose Cursor, Kiro,
Qoder, Devin and Command Code; Kiro's image ordering is its plugin's.
Run: docs only; the full suite runs at the stack's head.
The first built-in taken out (the owner, 10-16: 陆续把内置Provider下线掉,
一定要下线完毕). @magpie-community/opencode-zed-auth serves Zed for
everyone now; built-in accounts not moved yet are moved by the hourly
loop, or from the Providers list's line (the commit before).
Removed: the built-in's sign-in (zed_signin.go and its loopback paste
branch), usage (zed_usage.go), its login list, switch, forget and
account cases, its own-backend case in asksOwnBackend, the gateway's
serveZed and zed.go, internal/zed, and the tests of only those.
Kept, because the mover and the plugin path use them: zed.go's
credential and login readers (migrate_zed.go's move), zed_body.go
(plugins.go), and Zed in accountIDs, side_logins, cards_kept,
plugin_usage's movedCards, the gateway's estimatedMoved and the CLI's
account names, which name the plugin's accounts too. Zed the editor as
an agent (internal/agent, the library's MCP target) is untouched.
Tests changed: TestMovedBuiltinQuiet is TestRetiredBuiltinQuiet (no Zed
card, its sign-in refused, the move still offered with the account);
TestZedMoveCarriesItsModels compares the models without internal/zed;
TestLoopbackSignInsTakePastedAddress and asksOwnBackend's set lose Zed.
AGENTS.md and gateway-routing.md no longer name Zed's built-in client.
Run on this tree over af08ecb27's parent tree:
- go test -tags nogui ./... -count=1 -timeout 90m: 64 packages ok,
internal/gui red only in TestCoreScriptBudget (the Move line; the
budget is raised in af08ecb27). Rebased onto it:
go test -tags nogui ./internal/gui -count=1: ok.
- Earlier on wt6 before the three fixes: provider red in
TestAsksOwnBackendAgreesWithTheGatewayDispatch and
TestLoopbackSignInsTakePastedAddress (Zed still named), fixed here.
- gofmt -l internal: nothing; GOOS=linux and GOOS=windows
go vet -tags nogui ./...: clean.
- GUI: retired-move, plugin-move, deprecation-notice and
deprecated-subscriptions, both engines, en and zh: 20 pass.
The owner (10-16) wants every deprecated built-in taken out of magpie,
one at a time. This is the ground for that; it retires nothing yet.
- retiredBuiltins / BuiltinRetired(id) in migrate.go name a built-in
whose code is gone. Only an id with a mover can be retired.
- PluginServes(id) is Moved(id) or retired. Every gate that asked
Moved(id) asks it now: sign-in, Factory keys, usage, logins, cards,
forget, accounts, check-ins, plugin sign-in, the CLI's accounts and
providers, the GUI's account label.
- A retired row's move.state is plugin, and its id is in onPlugins
once the plugin is installed.
- /api/providers lists a retired subscription's built-in accounts that
haven't moved in `unmoved` (MoveCandidate, now with the failed move's
error and why). The GUI shows a quiet line over the Providers list
for each, with Move / Try again (unmovedLine), in en, zh, zh-TW, ja
and de.
- AGENTS.md and docs/subsystems/provider-plugins.md say what a retired
built-in is.
Run at 270aa1c9c with this change:
- go test -tags nogui ./... -count=1 -timeout 90m: 66 packages ok.
- gofmt -l internal: nothing. GOOS=linux and GOOS=windows
go vet -tags nogui ./...: clean.
- GUI, both engines, en and zh: retired-move (new, 4/4), plugin-move,
deprecation-notice, deprecated-subscriptions, plugin-move-unserved,
plugin-movable-review, i18n-keys: 39 pass.
- TestRetiredBuiltinIsThePlugins -count=20 (it picks a mover at random).
The Move line is the Providers list's own, not a page that could be a
plugin. It took the core's scripts to 1,427,218 bytes, which the budget
main raised in 81313b912 (1,447,000, issue 2612) already holds;
TestCoreScriptBudget passes.
Broken by hand: retired-move goes red with unmovedLine not appended;
TestRetiredBuiltinIsThePlugins goes red with BuiltinRetired's Movable
check dropped.
The built-ins are being retired (the owner, 10-16: 陆续把内置Provider下线掉),
so the last way back to one is gone. MoveBack, moveBack and releasePlugin
are removed, with the Left flag they set.
- SetPluginOff only turns the plugin off. A moved subscription stays
moved, off with it.
- RemovePlugin records the moved ids as the new state "removed". The
record keeps its accounts, which plugin.Remove leaves in the plugin's
auth store. Nothing moves or installs it by itself: MoveRetiring
skips it and keepMovedCurrent reads only "plugin".
- HandOver turns a removed record whose plugin is installed and current
back into "plugin", record and all. So does Adopt (the editor's Move).
- MoveRetiring moves an old "back" record again, whatever Left said.
- Plugins page, rm/off confirms: "{names} stops working until the plugin
is installed again. Its accounts are kept." / "... while the plugin
is off." The status after removing no longer says it is back on the
built-in.
- Strings: five old strings dropped ("Moving back…" among them), three
new ones in zh, zh-TW, ja and de.
- `magpie plugins rm`/`off` say the same in their output.
- Docs: provider-plugins.md (the states table, the Move-back paragraph)
and AGENTS.md.
Tests:
- TestNoWayBack is new. It covers a "back" record moved again, the
plugin turned off (still moved, accounts kept), removed (removed, not
reinstalled by keepMovedCurrent or MoveRetiring), installed again
(HandOver), and removed again then Adopt.
- TestReleasePlugin and TestMoveBackKeepsLapse asserted the way back
and are deleted.
- TestMove, TestHandOver, TestMoveTidiesItsPlugin and
TestAdoptBeforeSigningIn no longer call MoveBack. TestKeepMovedCurrent
uses the removed state.
- plugin-release.test.cjs checks the new asks and that the status names
no built-in.
Run:
- Broken by hand:
- With HEAD's migrate.go, TestNoWayBack is red at "turning the plugin
off moved it back".
- With HandOver's removed branch disabled, it is red at "installed
again: map[], moved false".
- go test -tags nogui ./internal/provider -run
'TestMove|TestNoWayBack|TestHandOver|TestKeepMovedCurrent|TestAdopt|TestInstallPlugin|TestWorkBuddyCheckin|Plugin|Migrat':
ok.
- GUI (NODE_PATH playwright, --test-concurrency=1): plugin-release,
plugin-move and i18n-keys, chromium and webkit: 17/17.
- gofmt -l clean; GOOS=linux and windows go vet of provider, gui and cli.
- Full suite: go test -tags nogui ./... -count=1 -timeout 90m at this commit rebased on 9b04c4e20 (with the TestFailOpen fix after it): 66 packages ok, none red. Before that fix, at bff7cbd24, 65 ok and internal/middleware TestFailOpen red under load (fixed at its cause in the next commit).
The owner, 10-16: 陆续把内置Provider下线掉…一定要下线完毕. The plugins now do
what the built-ins did (the parity batch up to 53009f81a), so the built-ins
are retired:
- MoveRetiring moves every subscription with a mover (retiring is
MovableIDs, the list was empty) that still has built-in accounts, from
the gateway's hourly loop, six hours after a failed try as before.
- A user who moved back is moved again. Only a move back made by removing
or turning off the plugin (Migration.Left) is left as it is.
- There is no move back from the GUI or the CLI. provider/moveback and
`magpie plugins move-back` answer that the built-ins are retired. A
moved subscription's editor says it stays on its plugin and shows no
button, and the success line no longer offers to go back. New strings
in zh, zh-TW, ja and de; the three unused ones are gone ("Moving back…"
stays, for removing a plugin).
- AGENTS.md and docs/subsystems/provider-plugins.md say so.
Tests:
- TestMoveRetiring's subtests check that a moved-back subscription is
moved again and an off or removed plugin's is not.
- TestMoveBackRefused goes red on the old handler.
- plugin-move.test.cjs checks that a moved Zed has no button and says it
stays.
What was run, at 63be47717 with this change:
- go test -tags nogui ./... -count=1 -timeout 90m: 65 packages ok. The
gateway was red on TestUsageKeepsTimeToFirstToken (#2575, new) and
TestVisionWaitIsntTheDescribersTime (#2444) at load ~260. Neither file
is touched here, and both pass alone with -count=3.
- gofmt -l is clean; GOOS=linux and GOOS=windows go vet of provider, gui
and cli pass.
- GUI, both engines: plugin-move, plugin-move-unserved and i18n-keys pass
23 of 23.
- The other plugin-*.test.cjs files go red under parallel load as they do
on untouched main (#1544, commented with the runs). Serially, then alone,
they pass 28 of 28.
The first review covers 2026-10-05's 220 commits (~170 releases): about 40 fixed something released that day or the day before. The lessons are grouped by kind (misread report, fix one sample of a class, user files, thin verification, red tests and releases, merging and closing), each with its evidence. Three that recurred dozens of times move into docs/code-standards.md: a fix reaches every sibling of the bug, a test red on main is fixed rather than used as a baseline, and a release needs a finished green CI run, not a cancelled one. AGENTS.md points at LESSONS.md and CLAUDE.md loads it. Docs only; no code or test changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/code-standards.md gathers what reviews keep asking for: a change holds on its whole path and does only what its goal needs, a fix comes with a test that fails without it and uses real inputs, tests check behavior and stay out of the real machine, the checks run before a merge, Go's any, appdir.Getenv and agentenv.NotPaths, the GUI's t()/i18n, no native select, no click scroll and no left-border stripes, and the commit message style. Junjie Zhou's six review rules from Discord are its first two tables; the rest is from merged PR reviews (#901, #922, #924, #926, #930) and the GUI tests. AGENTS.md links to it.