A new agent field's label with no entry in internal/tui's zh map left
TestEveryWordHasZh red on main twice (e9fcc6229 on 11-15 for
"permission mode", 618bfc1a9 on 11-17 for "subagent pool"), each by a
change that ran internal/agent but not internal/tui.
TestEveryFieldLabelHasTUIZh reads tui's i18n.go and keepAsIs (tui
imports agent) and fails in the package such a change runs. LESSONS and
the code standards' criterion 3 name it.
Run: on mote, go test ./internal/agent: ok (250s). The new test on
Linux (wsl-run) and Windows (win-run): ok. gofmt -l: clean.
Broken by hand: with "subagent pool" taken out of i18n.go, red ("kimi's
field \"subagent_pool\" (label \"subagent pool\") has no Chinese").
00b2c11a6 added a docs row and left llms-full.txt and the search
indexes stale, the fifth time since 11-13 (459d668b3, 256910f17,
9dcec6751, dbbb2f26b). The rule moves into the code standards'
criterion 3. Docs only; nothing run.
TestEveryAgentInLibrary (internal/library) went red on main for a new
agent four times: 399010bef and 68cb92e8e (11-10), 7e8214d60 (11-12),
and effdd1beb today after 00b2c11a6 (Open Code Review). A change that
adds an agent runs internal/agent, and the guard is in another package,
so each was found after the push.
TestEveryAgentNamedForTheLibrary reads internal/library's targets.go and
every_agent_test.go (library imports agent, so it reads the files) and
fails when an agent on this machine's list is in neither a targetOf case
nor noLibrary. The library test still checks a target has something in
it. Same shape as internal/gui's TestEveryRouteIsNamedForTheCLI.
LESSONS.md: the route/setting guard lesson now covers agents, seen a
third day. code-standards criterion 3 names both twins.
Run (mote, at effdd1beb + this change):
- go test -count=1 -timeout 45m ./internal/agent ./internal/library: ok
- broken by hand (open-code-review's noLibrary line removed): red,
"open-code-review (Open Code Review) isn't named in internal/library";
restored
- win-run and wsl-run, -run TestEveryAgentNamedForTheLibrary: ok
- gofmt -l: clean
Not run: the full ./... suite (test-only change in one package).
Seen a third day: 64c426158 (11-16) ran the whole GUI suite on mica
beside another session's full suite, was pushed with it still running,
and named its 90 reds by page (accounts, Details, keys, plugins,
providers) with no issue. The rule now has a row in the Tests table,
and LESSONS.md lists it under Moved to the code standards.
Docs only; nothing run.
Seen a third day: on 11-15 TestMoreKinds' "ops" was in the made-up
user name zpxopsat (ubuntu CI at 500f39886, #4345), after 10-10's
placeholder suffix and 11-10's port and route_id. The rule is now a row
in docs/code-standards.md's Tests table, and LESSONS.md lists it under
"Moved to the code standards". Docs only; nothing run.
Seen a third day: 8c7328f3a (11-13, remote quotas) was committed from a
stale tree and wrote 21 files back to their state before 35aaaa4b9,
taking out three commits (put back in 926b1e7df), after 85e6ec540
(11-11) and 76ceff87c (11-12). The rule moves from LESSONS.md into
docs/code-standards.md's Commits section, and LESSONS.md lists it under
Moved to the code standards. Docs only; nothing run.
coreScriptBudget rose four times on 11-12 (d96403141, 05cadcafd,
4519eea71, 09e2eef0d), 1,089 bytes with nothing moved out, the third day
the budget lesson was seen (10-17, 11-10). Per LESSONS' rule it moves into
docs/code-standards.md as a row of "What a change contains". Docs only.
The updater took a file and its SHA-256 from the same feed answer, so
whoever could change /api/latest could swap both; only the Mac app also
checked its signing team. Now release CI (yetone/magpie-releases) signs
"magpie release <version>\n" + SHA256SUMS with an ed25519 key held as that
repo's UPDATE_SIGNING_KEY secret and publishes SHA256SUMS.sig (release
assets: 16 -> 17). The site worker carries the list and signature in the
feed; internal/update/signed.go checks them against the public key built
into the binary, takes each file's hash from the signed list and refuses a
missing or bad signature or a feed hash that differs. Versions from
0.1.3862 require it; older ones and binaries older than the key update as
before. MAGPIE_UPDATE_FEED lifts the requirement for local test servers.
mirror-release waits for 17 assets; docs/reference.md and code-standards
say 17 and describe the transition.
Run: go test internal/update, internal/cli, internal/gui -run Update|WhatsNew
(ok); node --test site/*.test.mjs (116 ok); gofmt; go vet darwin, linux
nogui, windows on internal/update. Broken by hand: signature check skipped
(tamper and other-key tests red), feed-hash comparison skipped (swapped
hash and feed tests red), worker not attaching signed (worker test red).
The embedded key is checked against a sample signed by the real key with
openssl, as CI does. Signing script run against a throwaway key.
Not tried: a real signed release before this tag; install.sh does not
verify the signature.
LESSONS.md's "One commit, one goal" was seen on 10-05 and 10-06. On
10-28 6e080ca04 answered two reports in two layers under one subject:
psikent's /v1/models tools flag (gateway) and windy's routing group
Context hint (GUI, five languages), the subject naming only the first.
A revert of either takes the other with it, and the record can't say
which test guards which.
- docs/code-standards.md, Commits: a paragraph on one goal per commit,
with 653cb8ee, 1e0829b1 and 6e080ca04.
- LESSONS.md: the lesson replaced by a pointer, and listed under Moved
to the code standards with the 10-28 evidence.
Docs only. Checked that no test reads either file's content
(loop_guard_test.go and rtk_detect_once_test.go only name them).
Seen on 10-12 (#1794), 10-17 (#2444) and 10-28 (#3568, JoeyWu-tech's patch waited three days until 11c427eaa), so the lesson moves from LESSONS.md into the Tests table. Docs only; nothing run.
- A plugin version published with no mover min raised was seen on 10-16,
10-18 (zed 0.1.9) and 10-24 (factory 0.1.38, raised four days later
in 490c0a4ad). It moves to the code standards' release rules: the min
is raised the same day the plugin version is published.
- 10-27 is the third day of the #1794 pattern: #3632 (internal/provider
dies on main since 10-25, two complete patches, no owner), #3919 and
#3924 (JoeyWu-tech's patches since 10-27) and #3854.
Checked: every mover's min against `npm view --prefer-online` (factory
was the only one behind; grok 0.1.16 was raised two hours after its
publish, cc8e8e3bd, so it is not evidence). #3632 red 2 of 2 on mote at
4b0a32e0f. TestLoopGuard* (reads both docs) ok on mote at this tree.
Folds the review of 10-17 04:00 to 10-18 04:00 (77 commits, v0.1.1277
to v0.1.1283) into LESSONS.md, and moves two lessons seen a third day
into docs/code-standards.md:
- magpie's default never overrides a value the user set (10-05, 10-10,
10-17: 5a2414acd's Essentials to All, #2749), a row under "What a
change contains";
- a checkout, worktree or log belongs to the session that made it
(10-09, 10-12, 10-17: 7660399a1's worktree checked out by another
session, 17557132c's log deleted), under Commits.
New lessons, each seen once:
- a named sibling left alone gets an issue (d4a1b9baa, plugins#176)
- a fix that only covers new data says what happens to the old
(dccfefdf7)
- keep a suite's log whole (5b12407e8)
- close a two-part issue when both parts are fixed (#2449, #2702)
- a size budget raised on every hit bounds nothing (#2710)
- a publish run red for one package hides new failures (plugins#180)
Seen a second day:
- hot-path cost, widened from a polled field to b14784c03's body scan,
fixed in 7ac20247a
- one suite per machine (load 313 on 10-17)
- the #1794 pattern of "seen again" comments with no owner (#2444,
#2737), with one test filed three times (#2169, #2711, #2737)
Also adds the criteria still missed on 10-17 (a run record at a tree
other than the pushed one, a wrong issue cited) and what was done right
(the retire stack, df3734b95, f550d3699, 48aae83b8 and others).
Docs only. Every sha and issue number was checked against git log, gh
and the commit bodies.
The nightly fold of the review of 10-11 05:20 to 10-14 04:00 (602
commits, tags v0.1.1173 to v0.1.1228, 54 of 56 published).
Moved to docs/code-standards.md, each seen a third day or more:
- a failed read means unknown (7d9382db2, e297a8ab2);
- nothing that can block runs under a lock its reader needs (a2afc1828,
a75de4c21);
- another app's values come from that app (accc8c090 -> e0ecf0161);
- a test named for a guarantee fails without it (9dd5917a4, cc93b566e);
- a test never reaches the network (f230fa23b, bde11c778);
- a tag waits for a green run and is not a release (v0.1.1192/1193 on one
commit, v0.1.1213 and v0.1.1218 unpublished, #1846);
- a large commit's body holds what was run (ea3d480ed, 1cd814004,
3ccbe6bc1's "push notes").
Criterion 3 now names the guard tests that chosen-package runs broke on
10-13 (494609866, 24146c031, c6de0d2a5). LESSONS.md keeps pointers.
LESSONS.md: reading the report and two-sessions-one-checkout seen a
second day (def3a41e3 reverted in 2c30e5cee; 3e88fc09d). New 1x lessons:
WebKitGTK vs Playwright WebKit (f5dd4d604), per-OS paths in tests
(f38f65030), neutral text in vendor-bound prompts (3c4f8f9ae), one owner
per flag bit (8179ce768), a flag is never data to write (76db4c6c2).
contributors.md: ggbdpq's Watched row gains #1919 and #2017.
Run: every shown sha read with git log; anchors #moved-to-the-code-standards
and the code-standards.md links resolve. Docs only, no code.
The nightly review of 10-10 13:51 to 10-11 05:20 (191 commits,
v0.1.1155 to v0.1.1172, every tag on a green run).
- Two lessons hit a third day and move into docs/code-standards.md:
whatever a test starts ends when it does (#1524's three-step fix), and a
timing test leaves room on both sides (TestMaxRPM was a real gap).
- "A failed read means unknown" seen again: stash.json had readLogins'
bug (fixed in 270b5257), and StepCode copied a strict reader instead.
- "A test never loads a real page" gains f04792f9: a test's broken state
must not reach the network either.
- New: a test reading a dependency's source (884dbdb2), a "gone"
substring check matching generated text (6c099edd).
- Flaky tests: four reds shipped past unfiled; "same on main" against a
stale main (db965824); two sessions on one flake again.
Ran: every cited sha checked with git cat-file; docs only, no code.
192 commits and 18 releases on 10-08 (through 3c629133). The two lessons
seen a third day keep their concrete steps in acceptance criteria 4 and 5
(git grep a reworded string, a gateway guard through the real server
stack). bbf99143's syscall.Getsid shows a cross-OS build doesn't compile
_test.go, so vet joins the checks. #1318's test that passes with the waiter
held is filed as #1358.
Ran: read both files after the edit; docs only, no code changed.
Settings → Language offers 繁體中文 beside 简体中文. On System, a
browser or OS locale of zh-TW, zh-HK, zh-MO or zh-Hant (zh_TW.UTF-8 too)
shows zh-TW; zh-CN, zh-SG and zh-Hans-HK keep Simplified. The tray menu
and quota alerts follow the same choice. Release notes fall back to
Simplified.
The zh-TW strings are generated from the zh strings with opencc
(cn→twp), then corrected to Taiwan wording: 設定, 檔案, 帳號, 伺服器,
預設, 閘道, 連接埠, 參數, 選單, 透過, 取得, 用戶端, 存取, 終端機, 「」
quotes. A quota window is 時段 and a context window stays 上下文視窗.
Number units use 萬/億, and #unitsRow is shown for zh-TW.
Verified:
- New gui-zh-tw.test.cjs, in Chromium and WebKit:
- key parity, placeholders and tags against zh;
- no Simplified characters;
- the Taiwan words;
- locale detection for each system tag;
- <html lang>, nav labels, fmtN units, the picker;
- Settings Language at 1000px and 440px.
With the sysLocale zh-TW line removed, it fails. On the base assets,
all 3 fail.
- gui-ja, gui-de and i18n-keys pass.
- go vet, and go test -tags nogui for ./internal/gui and
./internal/settings, pass. That includes the new zh-TW cases in
TestTrayLang / TestTrayLabels / quota_alert_test, which fail without
the zh-TW branches.
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>
code-standards.md: a failing test before the change (a real FAIL, not a compile error), tests under a temp HOME with GOPATH/GOMODCACHE/GOCACHE pinned and never a live agent config, vet/build (linux nogui, windows)/test with pipefail, GUI tests in Chromium and WebKit with gui-ja/gui-de, real-account checks in a sandbox, the UI rules; a PR merges only after it is run merged onto main and with --match-head-commit; a release counts only with the tag on main, 16 assets and Latest. The review section is distilled from recent PR reviews (#706–#931).
New references, each following the README's format and linking real source: gateway-routing.md (plan/planGroup, rests, sink, affinity, attempt/translate), agent-wiring.md (Agent fields, ConnectHow, applied.json drift, stash, DisconnectPreview, Reseat/Rewire, WSL twins and ListsFor), providers-accounts.md (providers.json, keys, Accounts, token refresh, logins, groups, Quotas), library.md (change/sync, instructions, MCP formats, skills link/copy, backups, RTK), gui-shell.md (Run, startBackend, Handler/held/revalidated, magpie web, gateway mode, nogui). Every link and backticked identifier was checked against the tree at origin/main. Docs only.
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.