Every start parsed the whole of usage.jsonl with json.Unmarshal a line at
a time. On the owner's real history (109 MB) that was 622 MB of the first
18s's 1765 MB allocated, and most of the GC work of a cold start.
The full blocks the log index freezes are now kept in log-v1.bin beside
the sessions cache, with where they end in the log (offset, line count),
the SHA-256 of the log up to there and the hasher's state, first/firstOwn,
the provider keys and hosts seen, and the probe rows before that offset.
A start reads them and parses only the lines after. They stand only
while the log's bytes up to the offset hash the same and the code that
reads them is the same (requestDiskBinary); otherwise the whole log is
parsed as before. The file is written through a temp file and a rename,
at most every 10 minutes and only when it gains blocks.
Run on mote at this tree, rebased on origin/main:
- go test ./internal/usage ./internal/usageapi: ok
- GOOS=linux|windows|darwin go vet -tags nogui ./internal/usage: ok
- TestStartReadsKeptLogBlocks: a second start loads the kept blocks, and
rows, probes, keys, hosts and hash equal a whole parse; a log edited
before the offset is parsed whole.
- Broken by hand: accepting the kept blocks without resumeLogHash turns
TestStartReadsKeptLogBlocks red (hash differs); restored, green.
- Bench on a copy of the real history (~/r2278, 109 MB log), cold start
polled 120s, second start of each binary (caches hit):
v0.1.2184: peaklive 217MB fp_peak 307MB, 156 GCs
this: peaklive 210MB fp_peak 315MB, 98 GCs
readLogSnapshot alloc_space 622MB -> 8.6MB; total 1765MB -> 1095MB.
The first start writes log-v1.bin (7.4 MB).
Not tried: the GUI suite (no GUI file changed); Windows and Linux runs of
the package (vet only).
cyoking1 on X (tweet 2116084357731701020): every Claude model through
the GitHub Copilot plugin answered 404. pluginFetch took the loader's
baseURL first, and Copilot's loader says https://api.githubcopilot.com
for every model, while its Claude models are @ai-sdk/anthropic rows
whose own api.url is https://api.githubcopilot.com/v1 (models.dev).
magpie's /v1 is taken off the path, so the request went to
https://api.githubcopilot.com/messages.
pluginRequestBase now sends an Anthropic model whose own URL ends in
/v1 under the loader's base + /v1 when that base doesn't end in it,
as OpenCode's own Copilot provider does (packages/core/src/plugin/
provider/github-copilot.ts: `${loaded.baseURL}/v1` for messages
models). That covers every plugin, and Copilot Enterprise's
copilot-api.<host>. Unchanged: a base already ending in /v1 (zcode,
minimax, commandcode, zed), a model whose own URL has no /v1 (Kiro's
BASE), and every non-Anthropic model (Copilot's GPT on its bare base).
Every @ai-sdk/anthropic api.url in models.dev ends in /v1.
Run:
- Real account (owner's Copilot sign-in, token from the OAuth refresh):
POST api.githubcopilot.com/messages claude-sonnet-5 -> 404
"404 page not found"; /v1/messages -> 200 with a reply.
- TestPluginAnthropicBaseKeepsV1 (new): green; broken by hand (the
/v1 append commented out) it is red on the copilot, trailing-slash
and enterprise cases.
- mote: go test -count=1 ./internal/provider ./internal/plugin ok;
go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows
go vet ./... clean; go build, GOOS=linux -tags nogui and GOOS=windows
builds ok; gofmt -l empty.
- Full suite (-timeout 45m) started on mote at this head; pushed
before it ends per the ship-at-once rule; reds get their own issues.
Not tried: a whole magpie gateway with the Copilot plugin signed in
end to end; the fix was checked at the base it computes and the real
endpoint by hand.
Every query of All priced and unpacked every gateway block of the history
before it looked at what it needed. With the page's cells, the heatmap's
days and Codex's effort kept from earlier days (page-v1, heat-v1,
effort-v1), a cache hit reads only the last days' rows. Pricing the rest
was still 53 MB of the 219 MB heap at 18s on the real history
(blockPricer.priceBlock: 38 MB of pooled rows, 14 MB of unpacking).
readRequestBlocks now leaves a packed, named block whose newest call is
before settledBefore(now) (the splits' edge) as a stub: its serial, count
and latest time, the raw block and the pricer. priceStubs prices stubs in
place, and every pairing calls it first (pairRowsIn, pairRowsMemo,
heatBefore). So a miss, a page of older rows, or a period the splits don't
cover prices them as before. rowsIn counts a stub by its raw block.
heatSettledKey names a gateway block by its raw rows, which requestState's
meta prices, so a priced block and a stub get one key. That changes the
keys once; this binary's own keys already change.
Run at 0414bbedd plus this change (origin/main fetched, no newer commits), on mote:
- go test -count=1 ./internal/usage ./internal/usageapi: ok
- go test ./internal/gui: the AppKit tests time out at 30s, the same set
as #4125 (TestDockJoinLeadsCommandTab, TestPanelCloseHidesIt,
TestMainWindowCorners and 7 more); nothing else red
- GOOS=linux/windows/darwin go vet -tags nogui on the three packages: ok
- Broken by hand: with the stub turned off,
TestKeptPageLeavesSettledBlocksUnpriced fails with "started again, 2
blocks priced"
Real history on mote (~/r2278, a copy of the real ~/.codex, ~/.claude and
gateway log), 120s with the GUI's polls:
- v0.1.2183 at a cache hit: fp_peak 368 MB (356-374 before), peaklive
262 MB
- this change at a hit: fp_peak 301 and 308 MB, peaklive 226 and 219 MB
- the first start of a new binary misses as before: 510-512 MB
- the five pages (all, 7d, all at offset 0 limit 100, all for codex, 30d)
are the same as v0.1.2183's apart from float rounding in the sums
(largest relative difference 5e-14)
Not tried: Windows and Linux runs. The change is in the usage package,
which has no OS-specific code.
page-v1.json held four pages, newest written first, and a page read
from it was never moved. The warm-up's All, the Usage page's period,
the tray's periods and a few filters a reader picks are more than four,
so the warm-up's was dropped and every start after paired the whole
history again (the 587 MB start). Seen on the real history: after five
pg.sh pages the next start missed. It holds eight now, and a page read
from the second half is written again first.
Real history on mote (~/r2278), with the previous commit: a start
after the five pages hit (fp_peak 356 MB, peaklive 266 MB).
Test: TestPageReadAgainStaysOnDisk (the warm-up's page last of eight,
read, then one more page written: the next start still reads it).
Broken by hand (no move): red, "read again, then another page written".
Run at this head, on mote:
go test -count=1 ./internal/usage ./internal/usageapi: ok, ok
GOOS=linux/windows/darwin go vet -tags nogui ./internal/usage: ok
Not run: the full suite. internal/gui's AppKit tests time out on mote
(#4125); this change is internal/usage only.
Rebased on 6d154ef1e (with the commit before this); go test
./internal/usage ./internal/usageapi and the three vets ran again at this
head: ok.
The warm-up and the tray ask QueryPage with Filter{} (no zone); the
Usage page asks with Zone: time.Local (usageapi.FilterIn, usage.Zone("")
is time.Local). Both read their days in time.Local, but the pages cache,
the parts cache, pageOld and the page-v1.json/heat-v1.json keys took
them as two filters. So the warm-up's pairing of the whole history
warmed nothing the page read: the page built its own beside it, and
page-v1.json held two All pages. Found by logging the page key of every
start on the real history: the warm-up's key had zone "" and the page's
"Local", with everything else the same. queryPageOf now treats Zone ==
time.Local as no zone, before any key is made.
Real history on mote (~/r2278), 120s each, the build with this and the
next commit:
new-binary miss fp_peak 518 MB, peaklive 378 MB (v0.1.2180: 587/408)
hit fp_peak 374 MB / 356 MB, peaklive 271/266 MB
The hit after the five pg.sh pages (all, 7d, 30d, all with offset,
codex) started with the page cached on disk.
Test: TestLocalZoneIsTheWarmUpsPage (the page in time.Local after the
warm-up's pairs nothing more and is equal). Broken by hand (the
normalisation off): red, "the page in time.Local paired [6 6]".
TestPageSettledFromDisk's setup moved into pageHistory, which the new
test shares.
Run at this head, on mote:
go test -count=1 ./internal/usage ./internal/usageapi: ok, ok
GOOS=linux/windows/darwin go vet -tags nogui ./internal/usage: ok
go test ./internal/gui: 8 AppKit window tests time out at 30s
(TestDockJoinLeadsCommandTab, TestPanelCloseHidesIt, TestMainWindowCorners
and others): mote's AppKit hang, #4125. This change is internal/usage only.
Not run: the full suite.
A request whose User-Agent names only an HTTP library or an SDK (curl,
Bun, node-fetch, undici, python-httpx, requests, aiohttp, Go-http-client,
okhttp, the OpenAI/Anthropic SDKs, …) or nothing at all got a Context
scorecard of its own, as if it were an agent (theforeveriris on X: "Bun",
"curl", "python-httpx" cards). usage.IsLibrary names those clients;
contextOfRecs folds them and "other" into one "Scripts" card at read
time, so older history reads the same way, and the card's meta line and
tooltip list the libraries by count. The cached day records are not
changed. No setting: it works as is. The Usage page's Agents list still
shows each library by name, with its Hide and Count-as-agent controls.
i18n for zh, zh-TW, ja, de. Existing context.js comments were condensed
so TestCoreScriptBudget holds without a raise (core scripts -28 bytes).
Run, at this head (rebased on 40af66027):
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows
(mote) for usage and gui; earlier the whole tree on all three, exit 0.
- mote: go test -count=1 -tags nogui -timeout 45m ./internal/usage
./internal/gui: ok, ok.
- Windows box: context-scripts + i18n-keys 26/26 (chromium, webkit,
5 languages, 360 and 1100px). Before the rebase, every reachable file
(context-*, compact-one-value, group-context, routing-context-fold,
routing-ctx-fold, routing-ctx-still, i18n-keys, gui-de/ja/zh-tw,
header-relang): 333/349; the 16 reds are routing-ctx-still, red the
same on origin/main 40af66027 on that box, listed in #4124.
Broken by hand: IsLibrary false and no fold -> TestIsLibrary and
TestContextScriptsAreOneCard red (cards python-httpx, claude, Bun, ...);
the JS label/clients removed -> context-scripts.test.cjs 0/22.
Not tried: a real app run with real curl/Bun traffic; Linux WebKitGTK;
GUI files on mote (its browsers were busy with another suite).
origin/main 101775657 is over both of its own budgets (core 1,536,777
of 1,536,586, app.js 1,315,507 of 1,315,316), and Coffemon's batch on
it came to core 1,536,973. Calls that spelled out the same error line
now share a helper, with no change in what they do:
- statusErr (already there): the tray panel's Manage opening the
window (46fb0c1b9), signAsk's failed load of signsheets.js (no
caller reads its return value) and the sync row's Show.
- statusTErr(e), status(t(e.message), "err"): 14 calls in app.js and
the Plugins page's mirror switch in plugins.js, plus 3
.catch((e) => status(t(e.message), "err")).
- settingsErr(e), statusTErr then renderSettings: the 8
.catch((e) => { status(t(e.message), "err"); renderSettings(); }).
Main's own red was fixed in e94bf7a08 (restBack) while this was
run; on that main the batch is core 1,536,265 of 1,536,586 with
this commit, still over it without. No local t or renderSettings shadows the globals at any of them. Core
1,536,454 of 1,536,586, app.js 1,313,140 of 1,315,316; no budget
raised. TestCoreScriptBudget is red without this commit (1,536,973).
What was run, go1.26.8: TestCoreScriptBudget, TestMainURL and
TestMainView on mote (ok). In Linux (wsl-run), both engines:
copilot-ghe, claude-setup-token, panel-switch-accounts,
claude-switch-only, status-long, webdav-settings-refresh,
sync-not-backup, sync-other-kind, claude-auth-status,
revoked-signin-account, plugin-signed-out-account and i18n-keys
before the statusTErr part (229 pass, 1 fail: copilot-ghe zh in
WebKit, the route-after-close flake red on main 244d80e23 too,
#1949); then agent-prefs,
cli-update(-admin), disabled-models, gateway-mode, github-token(-refused),
mask-actions, masking-records, name-suffix-saved, privacy-model,
redact-rule-edit, settings-general, settings-proxy-auth,
tray-usage-redraw, uninstall-settings, update-mirror, warm-at-own,
i18n-keys, plugin-installed-unnamed and plugin-signin-scrolls: 499
pass, 5 fail, redact-rule-edit at 420px in WebKit, red the same on
origin/main 101775657 (#3407, #4120).
Broken by hand: a first cut whose statusTErr called itself sent
github-token, redact-rule-edit and update-mirror red (30 fail), so
these files reach the error paths.
Not tried: the whole GUI suite (#4125); the real app's window.
A search left out npm's card of any package a tagged repository's
package.json names, as if npm's package were that repository's. It is
only when npm has the package from that repository, and then the
repository's card is installed by npm's name (ghListing's spec).
Otherwise npm's package of that name, if npm has one, is another plugin,
which a search never showed.
Now a search leaves out npm's card only of a listing's package, or of a
tagged repository's that npm has from that repository, whose card
installs by npm's name. npm's package of a name another repository's
package.json gives stays, and its Install asks before it takes an
installed repository's place (the first commit).
Not changed: the GitHub section drops a tagged repository whose
package.json names a listing's package (`listed`), the same rule the
other way. Showing those would put repositories named like community
plugins beside them, and that's the owner's call (#3929). Both sets are
built from every listing and tagged repository, not from what the query
left, as before. An npm card installs by the bare name, which resolve
takes for a community plugin's where one is called by it (#3928).
plugins.js grows 153 bytes, the core's scripts to 1,530,343 of
1,530,449: 2,028 bytes for the three commits, in the 2,134 the room
makes.
What was run (tree a5364df0, on origin/main 174250b2, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- plugin-namesake, with Node 22.22.1 and Playwright 1.62.1, in Chromium
and WebKit: green, the ten new cases and the commits before's thirty,
in each engine. The new test, in en, zh, zh-TW, ja and de at 980 and
440px, has mu-zi-lee's repository installed, fakes npm with a package
of the name both repositories' package.json give, and searches
"free-model": npm's section shows that package, whose card reads
Install, and not npm's card of a package npm has from a repository on
the page.
- the commit before's plugins.js under it, in Chromium, which is main's
`known`, the one line of code this commit changes: red in all ten,
npm's section offering no card to install.
- npm's and git's answers held 150, 300 and 450ms (the page draws each
card again as they come), each delay written into a copy of the test,
in Chromium and WebKit: green at each delay, all forty cases in each
engine.
- i18n-keys, which reads the strings with no browser: 4 of 4 pass.
- TestCoreScriptBudget: pass.
- old-webkit, which parses every script for syntax and built-ins newer
than Safari 15.0 and draws each page in WebKit without those
built-ins: 6 of 6 pass.
- gofmt -l clean. go vet -tags nogui for linux, windows and darwin, go
vet for windows, go build -tags nogui for linux and darwin and go
build for windows: exit 0 each. go vet and go build without the tag on
linux: exit 1 (no libsoup-3.0 or gio-unix-2.0 here).
- 70 GUI files, each alone in Chromium and in WebKit (DISPLAY unset):
the 53 plugin*.test.cjs, the 12 whose code names app.js, plugins.js or
context.js (4 of them plugin ones), 8 more that open the Plugins page
(builtins, deprecated-subscriptions, list-sort, modal-centred-late,
settings-lines-wrap, settings-tabs-stick, skeleton-bird and
title-bar-tools), and i18n-keys. 64 green in both. Red here and, run
alone again, at 174250b2: plugin-card-update in WebKit, en and zh
(#3079); plugin-github in WebKit, de at 440 (#3218);
plugin-github-wait in Chromium, de at 440 (#4099); settings-lines-wrap
in both, de at 440px (#4026); title-bar-tools in both, de in Chromium,
and in WebKit ja, de and en here and zh, zh-TW, ja and de there
(#2740); modal-centred-late in WebKit at 560px (#4116).
- go test -tags nogui -count=1 -timeout 45m ./... (Bun 1.4.2; 9m02s,
load 24 at its start): 71 packages ok, and 15 tests red in 6 packages,
each filed: agent TestInstalledVersion, TestHowInstalled,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI and
TestOmpDetectedWithPiDir (#3141), TestCodexDriftReached (#3398),
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout (#3641); davsync
TestSyncTeraCloudStillSeesOtherWrites (#3420); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram (#3640, at
umask 077); gateway TestPluginToldWhereTheAgentWorks (#3675, an empty
.git above TMPDIR); gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649).
Not tried: the real app, and a search of the real npm and GitHub; the
API is faked.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
entryOf took a tagged repository's card for an installed git plugin of
the package the repository's package.json names, so a second repository
naming that package read Installed too. EchoChan314 (#3685) had
github:mu-zi-lee/magpie-our-free-model installed, and Gyarados4157's
repository of the same package showed a second Installed card, though
nothing of it was on disk.
Now a repository's card reads Installed only when the plugin installed
is that repository, by whichever spec names it: GitHub's shorthand, its
page, a git URL over https, ssh with a user, scp's colon or a port,
ssh.github.com and git://, owner/repo, in any case and with a ref.
ghRepo read only the shorthand, its page and owner/repo before. The
other repository's card reads Install, and its Install asks first (the
commit before), naming the spec installed.
One case turns from Installed to Install: a repository renamed or moved
on GitHub, installed by its old name. The page can't tell that from
another repository of the same package without asking GitHub, and the
latter is #3685, so it asks before a reinstall. And a card found by
another spec than its own (its page, a git URL) shows no Sign in, as the
page's URL didn't before: actionFor reads the sign-ins by the card's
spec (#3930).
plugins.js grows 41 bytes, the core's scripts to 1,530,190 of 1,530,449.
What was run (tree c3898368, on origin/main 174250b2, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- plugin-namesake, with Node 22.22.1 and Playwright 1.62.1, in Chromium
and WebKit: green, the twenty new cases and the first commit's ten, in
each engine. The new test installs mu-zi-lee's repository by each of
ten specs, in en and zh: its card reads Installed, Gyarados4157's
reads Install, one card is installed, and Gyarados4157's Install asks
to replace that spec, and Cancel installs nothing.
- the commit before's plugins.js under it, in Chromium: red for all ten
specs in en and zh, Gyarados4157's card offering no Install.
- Broken by hand, in Chromium, each red, then put back:
- ghRepo as on main, reading GitHub's shorthand, its page and
owner/repo only: red for the six git URLs, in en and zh, mu-zi-lee's
card not reading Installed
- ghRepo without the port and ssh.github.com: red for the two specs
with a port, in en and zh, the same way
- entryOf as on main, taking a git install of the package a tagged
repository's package.json names for that repository: red for all ten
specs, in en and zh, as with the commit before's
- i18n-keys, which reads the strings with no browser: 4 of 4 pass.
- TestCoreScriptBudget: pass.
- The Plugins page's other GUI files, old-webkit, vet and the full suite
ran at the last commit's tree, which holds this one.
Not tried: the real app, and a real install from GitHub; the API is
faked.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
plugins/ holds one package of a name, so plugin.Add installs another
source of an installed plugin's package in its place: the old one is
removed, its options and Off carry over, and the sign-ins saved for the
providers it served stay with those providers (plugin-auth.json keeps
them by provider id) for whichever code serves them next. The Plugins
page did that with no word: a listing's card over a git install of its
package, a tagged repository's card over npm's package of the name its
package.json gives, and the field's Install ("Have one in mind?") over
either. EchoChan314 (#3685) had github:mu-zi-lee/magpie-our-free-model
installed, and worried that a click on the card of Gyarados4157's
repository, of the same package, would switch the source quietly. Once
that card reads Install, as it should, its Install would do just that,
sign-ins included.
Now Install asks first when it would take another source's place, and
names both by their source, a git spec or npm:<name> (resolve's word for
npm's own package). For #3685's two repositories it asks "Replace
github:mu-zi-lee/magpie-our-free-model with
github:Gyarados4157/magpie-our-free-model?" (in the field; the card asks
the same once the next commit has it read Install), and says only one of
them can be installed, that the old one is removed and its options and
sign-ins pass to the new one, and, when the old one is off, that the new
one is installed off too. Cancel installs nothing. The same repository
by another spec, npm's package at another version, and a package nothing
installed has, install at once as before.
The field asks the same for a repository the page has read, npm:<name>
and a scoped name. A bare name, which resolve may take for a community
plugin's, and a repository the page hasn't read are known only once
installed, so they install at once as before; #3927 has them, with
`magpie plugin add` and a backup's or a sync's plugins, which replace
the same way.
Not covered: npm's cards still send the bare name, so where it is also a
name a community plugin goes by, the dialog names npm:<name> while the
community package is what gets installed (#3928).
The strings are in zh, zh-TW, ja and de. plugins.js grows 1,834 bytes,
the core's scripts to 1,530,149 of 1,530,449, in the room the commit
before makes.
What was run (tree 7ca08da4, on origin/main 174250b2, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- plugin-namesake, new, with Node 22.22.1 and Playwright 1.62.1, in
Chromium and WebKit, en, zh, zh-TW, ja and de, at 980 and 440px:
green, all ten cases in each engine. In each: with npm's package
installed, the repository's card asks, Cancel installs nothing,
Replace installs it, and the card of a package nothing has installs at
once; with a repository installed and off, npm's card asks and says
the new one is installed off, and after Replace its card offers Switch
on; the field asks for the other repository, installs the installed
one by its page's URL at once, and asks for npm:<name>. The dialog
fits at 440px, a click scrolls nothing, and no page error.
- the commit before's plugins.js under it (174250b2's but for the room's
statusErr and NO_SCROLL), in Chromium: red in all ten, at the first
case: Install on Gyarados4157's card, with npm's package installed,
opens no dialog.
- Broken by hand, in Chromium, each red, then put back:
- npm's installs left out of namesakeOf's search: red in all ten, as
with the commit before's
- what a tagged repository's package.json names left unread: red in
all ten, the same way
- the field's Install not asking: red in all ten, at the field, no
dialog for the other repository typed in
- npm's package named by its bare name, not npm:<name>: red in all
ten, the dialog's title reading "Replace magpie-our-free-model with
github:Gyarados4157/magpie-our-free-model?" in en
- namesakeOf not reading the old one's Off: red in all ten, at the
second case, the dialog not saying the new one is installed off
- the same repository by another spec taken for another plugin: red in
all ten, "the same repository installs at once"
- i18n-keys, which reads the strings with no browser: 4 of 4 pass.
- TestCoreScriptBudget: pass.
- The Plugins page's other GUI files, old-webkit, vet and the full suite
ran at the last commit's tree, which holds this one.
Not tried: the real app (WebKitGTK, Wails), and a real install from
GitHub; the API is faked.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
Room for #3685, which did not fit the core script budget. The budget
is not raised; two repeated forms move into one name each.
- NO_SCROLL: `{ preventScroll: true }` was written out at 90 focus
calls (89 in app.js, 1 in plugins.js). It is one const at the top of
app.js now.
- statusErr(e): `status(e.message, "err")` was written out for 68
failed calls (app.js 61, plugins.js 3, context.js 4), 15 of them as
a `e => status(e.message, "err")` callback that now passes statusErr.
renderSync is left alone: `status` is a local string there (#4066).
Saves 2,016 bytes: core 1,536,751 of 1,537,034 and app.js 1,312,975 of
1,315,316 with #3685 on top. quota-refresh-order.test.cjs evals parts
of app.js in a vm and gets both names as stubs.
The idea is Coffemon's (JoeyWu-tech) e7af88774, which no longer
applied to main; it was redone on the current tree.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
davisjiahao (#1985): Claude Code pointed by hand at a proxy in front of
magpie, magpie's key kept (a company's nginx, or a compliance proxy on
this machine every request must go through), is kept there once magpie
has answered at the proxy (surelyMagpie). That answer comes from a probe
a read starts in the background and never waits for, and every write to
Claude Code reads routed() first: in a magpie just started, the CLI's,
the first write found no answer yet and took the proxy for a relay of
the user's own. surelyMagpie's comment says a write waits for the
answer; none did. Codex's account failover does (codexProxyOK).
From the CLI, with the proxy (relay.py, answering GET / as magpie's
gateway does) taking 0.3s or 1.5s to answer, as one across a VPN can;
the same on 40b5c2da and on d970371e (#3480):
magpie claude fakeco/fake-3: ANTHROPIC_BASE_URL went from the proxy
(http://127.0.0.1:<port>/corp-relay) to magpie's own
127.0.0.1:<port>, and the haiku tier the user gave fakeco/fake-2
went to fake-3
magpie provider add …, whose sync rewrites Claude Code's lists: the
CLAUDE_CODE_AUTO_MODE_SERVER=0 magpie wrote went
magpie claude haiku fakeco/fake-3: "pick a model through magpie for
Claude Code first; haiku can then have its own"
magpie claude default (Disconnect): said "disconnected from magpie,
back to what it had before" and left the proxy, magpie's key and
magpie's tiers (fake-1 on all four) in, so its "opus" still named
fakeco/fake-1 through magpie; the endpoint and key the user had
before magpie (https://own.example/api, sk-own-user) were gone from
the stash
With the proxy answering at once, the probe a read started came back
first, and all of these held. magpie web's start held in my runs too
(0s and 1.5s first starts, a 1.5s restart): its sync runs after the
catalog's fetch and the vendors' lists (FetchNew).
Now every write to Claude Code (each field's Set, Sync, Unwire) asks
first (claudeAsk): where claudeProxied would ask the address (proxyBase,
not the gateway's own address, claudeKeyed) and magpie hasn't answered
there yet, magpieAsked asks it now and waits (probedNow, the probe's 3s
timeout). An answer had before, at any age, is what the write goes by,
as the reads do. Follow is left as it is: it writes nothing until
routed, and runs again as the Agents page is drawn. Reads still never
wait (TestReverseProxyTriedFirst).
Before and after, for a write while ANTHROPIC_BASE_URL is such an
address and magpie hasn't answered there in this process:
before: taken as a relay, as above
after: the address is asked (GET /) and the write waits for the
answer, then goes as it does with the answer in: a proxy to magpie
kept, a relay pointed away from
Not changed: an address sent a key of the user's own is never asked
(#3480); the reads; a write once the answer is in.
Cost: the first write of a process waits for one GET / at such an
address. The read before it has usually asked already, in the
background; this doesn't wait for that probe but asks again, as
codexProxyOK does (the proxy got 2 GET / where it got 1). A proxy that
doesn't answer holds that write up to the probe's 3s.
Left as it is: what Apply and Disconnect read before the write (was,
before) still sees the address unasked. After the CLI's Disconnect
behind the proxy at 1.5s, the record for reconnecting
(claude.reconnect) kept the model alone, without the haiku tier the
user gave fakeco/fake-2 in magpie, which the same Disconnect on
magpie's own address keeps.
TestClaudeFirstWriteAsksTheProxy: an nginx and a local proxy, magpie
just started, nothing asked yet (coldMagpie): a pick, a Sync, a tier,
Disconnect. With claudeAsk asking nothing, all 8 are red, each on what
it is there for (the pick wrote http://127.0.0.1:3425 over the proxy
and haiku went to fake/m3; the sync took out the review; "pick a model
through magpie for Claude Code first"; Disconnect left the proxy with
"magpie" and magpie's haiku tier). With Unwire's ask alone taken out,
the two Disconnects are red.
Verified at 57ae956b: the runs above, after, at 0.3s and 1.5s: every
case held, and Disconnect put back https://own.example/api and
sk-own-user with nothing of magpie's left. Both hand breaks as above.
go test -race -count=3 of the proxy, Codex proxy, review and sign-in
tests: ok. The agent package with magpieProbe made to panic: no test
reached it. gofmt clean; go vet ./internal/agent/ for linux, darwin and
windows: exit 0. go test ./...: 63 packages ok, 7 red with this box's
own reds alone: the proc.Look tick tests (#3141:
TestInstalledVersion, TestCursorFolderFromTheEditorIsNotTheCLI,
TestOmpDetectedWithPiDir, TestZedAppPath), the Reasonix fixture builds
(a /tmp/.git that isn't magpie's), graftcp's
(TestCallbackGoesPastTheAgentsProxy,
TestClaudeToolCallbackOnANonLoopbackAddress,
TestGatewayHeldByAContainer, TestGatewayFixQuitsOnlyAMagpie), umask
077's (TestWriteAtomicReadOnlyHardLink, TestProgram/first) and Bun
1.3.11's (TestBunProxyLoginWithReservedCharacters, #3397).
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
zhangt2333 (#3480): magpie sent GET / (Go-http-client/1.1) about every
30s to the ANTHROPIC_BASE_URL in ~/.claude/settings.json of a Claude
Code it never connected, with nothing shown and nothing to turn it off.
Every read of Claude Code the Agents page makes (/api/state, /api/drift
each 15s) goes through routed(), which asked a base URL that can be
another way to magpie (proxyBase: an address on another machine, or one
on loopback with a path of its own) whether it answers as magpie, for
#1985's reverse proxy, whatever key Claude Code sends there. One read
pass asked it about 65 times; the probe cache sends that as one GET once
its answer is older than 20s (reachAge), every 30s on the page's poll.
The address is now asked only while what Claude Code sends is for magpie
(claudeProxied, claudeKeyed): a key the gateway takes (keyHolds, as
Check already asks of ANTHROPIC_AUTH_TOKEN), or none where it keeps its
claude.ai sign-in through magpie (claude.login, on a Claude Code magpie
wired, wired_at, which Disconnect forgets, where the gateway takes any
key). With a key of the user's own, the base URL is their endpoint, and
nothing asks it: the reads (routed), a pick (gwAt), Check (its managed
settings' and settings.json's URL), and a request's stand-ins
(claudeStandInAt, now given the place, and claudeClassifierIn), a WSL
distro's Claude Code's too. Check says such a Claude Code's address as
it is, unasked (whatsOff: wiringOff's words, without its probe; an
administrator's in managed settings too): with a model named as one of
magpie's there, as a relay can name its own, "Claude Code's
ANTHROPIC_BASE_URL (settings.json) is <its endpoint>, not magpie's
gateway at <the gateway>", or "is gone" with none, which main said of
it too once the address had answered as not magpie. #1985's proxy keeps
magpie's key, so it is asked and kept as before.
The key, not a record of what magpie wrote: wired_at is from 10-08
(#1218), so a Claude Code connected before it and not picked since has
none, and a Claude Code magpie wired and then moved to a relay of the
user's own (CC Switch, its own key) would still have that relay asked.
The claude.ai sign-in can lean on it: it came with it (#1218), and its
setting, on a routed Claude Code only, stamps it.
Before and after, for a read, a pick or a request's stand-in while
ANTHROPIC_BASE_URL is not the gateway's and proxyBase takes it:
before: GET <base>/ in the background, at most every 20s
after: the same while Claude Code sends a key the gateway takes or
keeps its claude.ai sign-in through magpie; otherwise never, and the
address is not magpie's
Changed with it: a Claude Code pointed by hand at a proxy to magpie with
a key of its own, drift on main too (its key "was changed"; now its
address), is no longer taken as routed there, so a pick writes magpie's
address and key, keeping its own for Disconnect, where it kept the
proxy.
Not changed: the other agents ask an address only from magpie's own
entry in their config, or once on one of magpie's models (T3 Code's
wired, Gemini CLI's isMagpie(model), Hermes's onMagpie and
providers.magpie, dsh's usesMagpie), so none asks one of the user's own.
A Claude Code magpie wired keeping its claude.ai sign-in, then moved by
hand to an endpoint of the user's own with an ANTHROPIC_API_KEY alone
and not disconnected, is still asked, as before: magpie reads no
ANTHROPIC_API_KEY of Claude Code's.
Cost: a never-connected Claude Code with its own key at such an address,
the case this reaches: a read pass took 5.5 to 6.0ms on origin/main and
9.4 to 9.8ms with this (three runs each, taking turns, 200 passes, at
load 46 to 50; the key's read and access.Authenticate at ~65 calls a
pass), on the 15s drift poll. A connected Claude Code (the gateway's
address) and one on Anthropic's own endpoint (no base URL) never get
there.
docs/subsystems/agent-wiring.md (Drift) says it.
What was run (tree c7f75f7a, on origin/main 74dcf40a, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, umask 077:
magpie web --no-open, built -tags nogui from origin/main and from
this, each in a sandbox HOME of its own (env -i), with a settings.json
on a local relay that logs what it gets
(http://127.0.0.1:<port>/corp-relay, a key of its own) and listens
before magpie starts, /api/drift read every 5s:
model opus, 120s: main, GET /corp-relay/ (Go-http-client/1.1) every
20s from the first read, 6 in all; this, none. Neither touched
settings.json.
model fakeco/fake-1 (a provider magpie has), 60s: main, 3 GETs;
this, none. Both said "Claude Code's ANTHROPIC_BASE_URL
(settings.json) is http://127.0.0.1:<port>/corp-relay, not magpie's
gateway at http://127.0.0.1:<port>" from the first read.
Run once more with magpie up before the relay listened: main 5 GETs
and 2, its first ask made before then, this none, the rest the
same.
magpie claude fakeco/fake-1, then its ANTHROPIC_BASE_URL moved by hand
to the relay answering GET / as magpie, magpie's key kept, 60s: both
asked it every 20s, 3 GETs, no drift. Both wrote settings.json again
at start with every key and value the same (a label's "·", which the
hand edit had escaped, now as is). Run once more with magpie up
before the relay listened: both drifted "… is <the relay>, not
magpie's gateway …" on the first read and took
CLAUDE_CODE_AUTO_MODE_SERVER out of settings.json, then asked it
every 20s with no drift, the address kept; main does it the same, not
this change.
TestClaudeOwnEndpointNeverAsked (nginx: its own key in
ANTHROPIC_AUTH_TOKEN; local: in ANTHROPIC_API_KEY) and
TestWSLClaudeOwnEndpointNeverAsked: pass. Broken by hand, each red:
claudeProxied without claudeKeyed: "never connected: asked
[https://relay.example/anthropichttps://relay.example/anthropic …]"
(and the WSL test)
Check's addresses asked whatever the key (keyed true): "a model of
magpie's name: asked [https://relay.example/anthropic]"
Check's address unsaid without magpie's key: "its own key, a model
of magpie's name: … ANTHROPIC_AUTH_TOKEN (settings.json) was
changed, so magpie's gateway won't take its requests" (nginx), "… is
gone, so Claude Code sends magpie its claude.ai sign-in …" (local)
the administrator's address asked whatever the key: "its own key, an
administrator's proxy: … ANTHROPIC_BASE_URL (settings.json) is
https://relay.example/anthropic, not magpie's gateway …"
claudeStandInAt, then claudeClassifierIn, on surelyMagpie alone:
"never connected: asked [https://relay.example/anthropic]" (and the
WSL test)
claudeKeyed with no claude.ai branch: "the claude.ai sign-in at the
proxy: drift … ANTHROPIC_BASE_URL (settings.json) is <the proxy>,
not magpie's gateway …" (and the WSL test)
its claude.ai branch without wired_at: local only, "asked after
Disconnect: [https://relay.example/anthropic …]"
its claude.ai branch on this machine's stash keys: the WSL test
alone, the same as with no claude.ai branch
agent-wiring.md's reverse proxy checks (TestReverseProxy…,
TestClaudeBehindLocalProxyKeepsIt, …), Drift, the sign-in's and
TestKeptAddress: ok, but for TestWSLColdPlaceOpensNothing (e54a7d50,
#3896: a stopped distro's rows read none of its files), red at
origin/main and with this change alike (#3924): the same eight looks
under .hermes/profiles, none under .claude
gofmt -l of every .go file: nothing. GOOS=linux, windows and darwin
go vet -tags nogui ./..., GOOS=windows go vet ./...: exit 0.
GOOS=linux and darwin go build -tags nogui ./..., GOOS=windows go
build ./...: exit 0. Untagged linux vet and build stop at pkg-config
(no libsoup-3.0 or gio-unix-2.0 here)
full suite, go test -tags nogui -count=1 -timeout 45m ./... (8m19s,
load 42 at its start, Bun 1.4.2 on PATH): 68 packages ok, reds in 8:
internal/agent TestInstalledVersion,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI and
TestOmpDetectedWithPiDir (#3141); the two Reasonix tests (#3641);
TestCodexDriftReached (#3398); TestWSLColdPlaceOpensNothing (#3924,
above)
internal/edit TestWriteAtomicReadOnlyHardLink and internal/testenv
TestProgram, umask 077 (#3640)
internal/gateway TestPluginToldWhereTheAgentWorks (#3675)
internal/gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649)
internal/proc TestEnvOfChild (#3906)
internal/provider: "fatal error: close of synctest channel from
outside bubble" in TestUnreadLoginsWriteErrorsKeepCredentials
(#3632), which ends the package's run
internal/tui TestTUIFetchesSubscriptionModels/agent (#3919)
On origin/main 1a804859, where #3924's fix is in, with this commit
cherry-picked (a scratch worktree, not this tree): go test
./internal/agent has the reds 1a804859 has alone, #3141's, #3398's
and #3641's, and TestWSLColdPlaceOpensNothing passes.
TestCopilotFolderFromAnIDEPluginIsNotTheCLI, TestInstalledVersion and
TestZedAppPath come and go here: -count=5, 12 of 15 red with this
and 11 of 15 at 1a804859.
Not tried: macOS, Windows, a real WSL distro (its Claude Code's stash
keys are only tested), Claude Code itself sending through the relay, a
company's real proxy.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
TestPluginToldWhereTheAgentWorks was red on any machine with an empty
.git above its temp folder. GitOnDisk took the first .git it met going
up as a repository, and on this box /tmp/.git is an empty folder (owned
by nobody), so every folder under /tmp read "yes". git passes such a
folder over and goes on up: git rev-parse under it says "not a git
repository".
GitOnDisk now reads each .git on the way as git's own search does
(repo_discovery_find_dir in git 2.56's setup.c), through GitAt:
- A folder counts when git takes it for a repository (is_git_directory):
a HEAD git takes (a link into refs/, "ref: refs/...", or a commit's
id), and objects and refs folders, in the folder its commondir names
for a linked worktree. Any other folder, an empty one say, is passed
over and the walk goes on up.
- A file counts when it is "gitdir: <folder>" naming such a folder,
relative to the .git's own folder (a linked worktree's, a
submodule's). Any other file, one over git's 1 MB, or one that is
neither file nor folder is "no": git stops there with "not a git
repository" (a worktree whose repository has gone) or "invalid
gitfile format". (git 2.34 passed a .git that is neither file nor
folder over; 2.55 and 2.56, CI's, stop at it.)
- A .git it can't read is unknown, and the header is left off. git
passes such a folder over and stops at such a file, but either way
it can't tell an empty .git from a repository it isn't let into
(another user's, through a shared magpie), and a failed read is
unknown here.
A bare repository kept as a folder's .git (git init --bare .git) is
still "yes": git finds one there, though no work tree. Not mirrored:
the filesystem boundary, GIT_CEILING_DIRECTORIES and safe.directory's
ownership check. Cost: the same one stat per folder on the way up; at
a .git, a read of HEAD (255 bytes at most) and stats of commondir,
objects and refs.
What a user sees: a request to a plugin provider from an agent that
doesn't say whether its folder is a repository (Codex, Pi) was told
"yes" for a project under a stray empty .git, under a worktree whose
repository was deleted, or under a .git file that names nothing. The
community ZCode plugin then tells the model "- <git label>: yes" and
Command Code's sends isGitRepo: true, so the model may run git commands
that fail with "not a git repository". They are now told "no", and
with a .git on the way magpie can't read, nothing (ZCode's plugin
leaves the line out, Command Code's sends false). Claude Code's and
OpenCode's requests say it themselves and are passed on as they say it,
so nothing changes for them; Claude Code 2.1.310's own check takes any
.git, an empty one too.
The only caller of GitOnDisk is tellWorkPlace (workdir.go), which needs
no change. The library's skill groups had the same first-.git walk:
gitRepoOf took the first .git within four folders of a linked skill for
its checkout, so an empty one between a skill and its clone left the
skill in no group, and gave one imported from there no From. gitRepoOf
now asks provider.GitAt, passes such a .git over to the clone's, and
reads the origin from the folder GitAt names (a linked worktree's
common one), which replaces gitdirConfig. gitdirConfig also took
"gitdir:" with no space after it, or with spaces around the line,
which git doesn't take; such a .git now traces to nothing, as git finds
nothing there. Checkouts git made are traced as before; the test's
fake ones had only a config and now have a HEAD, objects and refs.
Every other .git folder in the Go code is one a walk skips when it
copies, hashes or checks a skill (carry.go, skillcheck.go, skills.go,
skill_edits.go), or the one magpie removes from its own fetch of a
skill (skillgit.go), not a decision about a repository. The Claude
bridge's claudeWorkDir takes the temp folder for one in no repository;
Claude Code decides that for itself, and its git status is off for
every run (CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS), so it stays.
TestPluginToldWhereTheAgentWorks gets a real repository for "in a
repository" (HEAD, objects, refs; an empty .git was all it had) and a
case under an empty .git in its own temp folder, so it fails without
this on any machine. Its "not in one" cases, and the new provider
tests' "no" ones, still need no repository above the temp folder, as
the test did before. TestGitOnDiskIsWhatGitFinds lays out each kind of
.git by hand; TestGitOnDiskAgreesWithGit asks git rev-parse
--git-common-dir in each of those folders and in ones git made (init,
worktree add, a worktree whose record was removed, --separate-git-dir,
init --bare .git), for yes or no and where;
TestGitOnDiskUnreadIsUnknown locks a .git folder and a worktree's .git
file. provider-plugins.md and library.md say the same.
What was run (tree 9a4504d9, on origin/main 56602426, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, umask 077, git 2.34.1, with
the box's empty /tmp/.git above the tests' temp folders:
- TestPluginToldWhereTheAgentWorks -count=5, Bun 1.4.2: 5 of 5 ok.
TestGitOnDisk* and TestSkillRepo*, -count=3: 15 of 15 ok. The same
and TestPluginToldWhereTheAgentWorks, -race -count=2: 12 of 12, no
race. internal/library and internal/provider whole: ok.
- 56602426's workplace.go and skill_from.go put back under the new
tests: TestPluginToldWhereTheAgentWorks red 5 of 5, at
plugin_workdir_test.go:125 both "not in one" and "not in one, under
an empty .git": the plugin was told git "yes", want "no";
TestSkillRepoTraced red, "write-a-prd: repo "", want
"mattpocock/skills"".
- gofmt -l clean. go vet -tags nogui for linux, windows and darwin, go
vet for windows, go build -tags nogui for linux and darwin and go
build for windows: exit 0 each. go vet and go build without the tag
on linux: exit 1 (no libsoup-3.0 or gio-unix-2.0 here).
- go test -tags nogui -count=1 -timeout 45m ./... (Bun 1.4.2, log
kept; 8m37s, load 32 at its start): 73 packages ok, and 14 tests red
in 4 packages, none of them this commit's tests or what they cover.
internal/gateway ran to its end (504s), so
TestPluginToldWhereTheAgentWorks passed in it; internal/library and
internal/provider ok. The reds: agent TestCodexDriftReached and
TestCodexBehindReverseProxy (#3398); TestInstalledVersion,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath (#3141);
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout (#3641: go build's own VCS
stamping meets the same /tmp/.git, which this doesn't change); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram (umask
077, #3640); gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649).
This commit is 595b361c rebased: the same internal/ patch-id, and
the same row in docs/subsystems/library.md, put in by git's 3-way
merge, as main's 33ccc618 (#2794) rewrote the Skills row, a line of its
context three rows above. The rest is what was run for 595b361c, at
tree d56bed31 on origin/main 098ac969, the same code (not this tree):
- main's GitOnDisk and gitRepoOf under the new tests (098ac969's
workplace.go and skill_from.go put back):
TestPluginToldWhereTheAgentWorks -count=5, Bun 1.4.2: red 5 of 5,
"not in one" and "not in one, under an empty .git" told git "yes".
With TMPDIR=/var/tmp/3675-clean, no .git above it: red 5 of 5 on the
new case alone. TestSkillRepoTraced: red, write-a-prd: repo "", want
"mattpocock/skills".
- Broken by hand, one at a time in workplace.go, each red in the
GitOnDisk tests on what it breaks, and green again restored:
any .git folder taken, main's rule for folders: "yes" under an
empty .git, a zeroed HEAD and a HEAD alone, and for a locked .git
a gitfile naming no repository, or not a gitfile, walked past:
"yes" from the repository above it
HEAD's content not read: "yes" for the zeroed HEAD; objects and
refs not looked for: "yes" for a HEAD alone
a HEAD at a commit not taken, or commondir not read: "no" for both
linked worktrees; a worktree's own folder named, not its common
one: the repository at .../worktrees/wt where git finds .../.git
a HEAD linked into refs/ refused: "no"; a relative gitdir read
from magpie's folder: "no" for the submodule; no 1 MB cap: "yes"
ENOTDIR taken for a failed read: unknown for a gitfile naming a
file; a .git it can't read walked past: "no" for both locked ones
Not tried: CI's git 2.55.0 (ubuntu) and 2.56.0 (macOS, Windows) under
TestGitOnDiskAgreesWithGit, which met git 2.34.1 alone; macOS and
Windows at all (Windows CI only compiles the tests); a real ZCode or
Command Code plugin end to end; a shared magpie told another user's
folder; the Library page itself.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
GuoJinguang's relay (#3820) has a Chat URL beside its Gemini one, and
their generateContent asking imageSize 4K went to its chat completions,
which drew 1024x1024. A Gemini client's request asked for one body is
translated (attempt: a Gemini API is always asked streamed), and with
relay off and no ownAPI it goes to the first API usable gives, Chat
where the provider has one. That default is meant (uaSetup in
user_agent_test.go), and the previous commit leaves it: there the
request reaches the Gemini URL only with the model's API set to Gemini.
Now one that asks an image's size or shape, a generationConfig holding
an imageConfig object, sets ownAPI on that rule, as a web search does
and as DashScope's request asked for one body does: it is translated
on the provider's Gemini API, the only one that takes the field, and
the previous commit carries the field there. Every other request
routes as before, so one without imageConfig still goes to Chat at a
provider with both. gateway-routing.md's One try says so.
What moves: a request asked for one body that carries imageConfig, at a
provider with both URLs and the model's API left on Auto, is asked on
its Gemini URL instead of its Chat URL. If that Gemini API turns the
model away in words magpie reads as the wrong API (wrongEndpoint), the
request is asked on Chat and the refusal remembered, as for any
translated request; any other refusal, such as a bare 404 for a model it
doesn't have, goes to the client, as it does today for the same client's
streamed requests, which are relayed there. What a translation drops
(safetySettings, topK and the rest parseGemini doesn't read) is dropped
on Gemini as it was on Chat.
Left as on main, as the previous commit says: a provider with no
Gemini URL has nowhere to send it (#3935), the images API sends
its size to Gemini as an aspect ratio (#3936), and a translated
Gemini request drops the rest of what parseGemini doesn't read
(#3937).
What was run (tree d7ae85a2, on origin/main 0c17aac2, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, umask 077:
- TestGeminiImageConfigGoesToTheGeminiAPIBesideChat, new: the previous
commit's five generationConfigs, generateContent, at a provider with
both URLs on one fake relay. The three with imageConfig are asked at
/v1beta/models/gemini-3-pro-image-preview:streamGenerateContent with
it, the two without at /v1/chat/completions. With
TestGeminiImageConfigReachesTheGeminiAPI and ReachesCodeAssist,
-count=5: 15 of 15 pass; -race -count=5: 15 of 15, no race.
- the new test on the previous commit's tree (2b421ece): red, the
three with imageConfig "the relay was asked at /v1/chat/completions,
want /v1beta/models/gemini-3-pro-image-preview:streamGenerateContent".
- broken by hand, each alone:
- the rule never setting ownAPI: the same 3 lines red;
- the rule setting ownAPI for every request: the two without
imageConfig red, "the relay was asked at
/v1beta/models/gemini-3-pro-image-preview:streamGenerateContent,
want /v1/chat/completions".
- gofmt -l clean. go vet -tags nogui for linux, windows and darwin, go
vet for windows, go build -tags nogui for linux and darwin and go
build for windows: exit 0 each. go vet and go build without the tag
on linux: exit 1 (no libsoup-3.0 or gio-unix-2.0 here).
- go test -tags nogui -count=1 -timeout 45m ./... (Bun 1.4.2, log
kept; 8m37s, load 34 at its start): 72 packages ok, and 14 tests red
in 5 packages, none of them this commit's tests or what they cover.
internal/gateway ran to its end (506s), so the three passed in it.
The reds: agent
TestCodexDriftReached (#3398); TestInstalledVersion,
TestHowInstalled, TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI and
TestOmpDetectedWithPiDir (#3141);
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout (#3641); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram (umask 077,
#3640); gateway TestPluginToldWhereTheAgentWorks (#3675); gui
TestGatewayHeldByAContainer and TestGatewayFixQuitsOnlyAMagpie
(#3649).
This commit is 44a63bd5 rebased: the same internal/ patch-id, and the
One try row of docs/subsystems/gateway-routing.md merged by hand, its
sentence unchanged. The rest is what was run for 44a63bd5, at tree
82a169ba on origin/main f8cd964a, the same code (not this tree):
- a probe at that tree, not kept, one server asked twice with
imageConfig: the Gemini API answering 400 "Model does not support
this protocol" (a wrongEndpoint wording): asked on Gemini, then on
Chat, 200 from Chat, and the second ask on Chat alone; answering a
bare 404 "models/... is not found for API version v1beta": the 404
to the client both times, Chat not asked, as for a streamed request
there, with or without imageConfig (relayed, also probed)
Not tried: the reporter's relay, or any real Gemini API; the relay
here is a fake. Not known: whether some relay's Gemini API lacks a
model its Chat API serves, the case where this commit turns a picture
at the default size into that 404.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
GuoJinguang (#3820): a Gemini client's generateContent asking a
gemini-*-image-preview model for generationConfig.imageConfig
{"imageSize":"4K"} drew 1024x1024 through magpie, where the same
request straight to their relay drew 4096x4096. The picture came, at
the model's default size, and nothing said the size had been dropped.
parseGemini didn't read imageConfig, so wherever magpie builds a Gemini
client's request again it was gone: a request asked for one body to a
Gemini API that isn't Vertex AI (always translated, since attempt asks
a Gemini API streamGenerateContent and reads the stream back into one
body), and every request to Code Assist or Antigravity, which go in
their envelope. A streamed request to a Gemini API, and a Gemini
client's request to Vertex AI, streamed or not, is relayed as it came
(passthrough) and kept it.
The reporter's request went to the relay's chat completions instead.
Their provider has a Chat URL beside its Gemini one, and attempt turns
relay off for a Gemini request asked for one body without ownAPI, so
it goes to the first API usable gives: Chat, as Speaks puts a custom
provider's Gemini last. That default is meant (uaSetup in
user_agent_test.go: "Gemini's own wire, which a provider on Chat too
isn't asked on"), and Chat has no field for imageConfig.
Now parseGemini keeps generationConfig.imageConfig as the client sent
it (Request.ImageConfig, raw as Metadata and ClientMetadata are, so
Vertex AI's own fields beside imageSize and aspectRatio go on too), and
buildCodeAssistSent, which every translation to a Gemini API goes
through, writes it into generationConfig: the Gemini API (buildGemini),
Vertex AI (buildVertex), and Code Assist and Antigravity in their
envelope. A request that asked for none is sent none. Chat, Responses
and Messages are left as they were: I found no vendor documenting a
field for it there, so none is made up. gateway-routing.md says where
imageConfig goes.
At a provider with both URLs, a request asked for one body reaches the
Gemini URL, and its imageConfig with it, when the user picks Gemini as
the API the model is asked on in the provider editor (SetModelAPI,
tested below). The next commit sends one that carries imageConfig
there by default.
Left as on main, each in its own issue:
- a Gemini client's image request to a provider with no Gemini URL
(the Google Gemini preset's OpenAI-compatible endpoint, OpenRouter,
another magpie, a relay saved with a Chat URL alone) carries no
imageConfig, asks no modalities, and reads no image back from chat
(#3935);
- /v1/images/generations and /v1/images/edits send a size to a Gemini
image model as an aspect ratio only (drawGemini, drawChat), and to
Code Assist only in words (drawCodeAssist), so nothing above 1K can
be asked there; a Gemini client's request never takes that path
(#3936);
- the rest of what a translated Gemini request drops: safetySettings,
topK, seed, responseModalities, and the newer responseFormat
(Google's next spelling of the same ask), among the fields
parseGemini doesn't read (#3937).
This commit's tree (2b421ece, on origin/main 0c17aac2) wasn't run on
its own. It is 85b532c6 rebased, with the same internal/ patch-id and
the same gateway-routing.md line, which applied as is. Its two tests
ran at the next commit's tree, -count=5 and -race -count=5, and in the
full suite there. What was run for 85b532c6, at tree de27856c on
origin/main f8cd964a, the same code (not this tree), with go1.26.8,
linux/amd64, Linux 5.15, outside graftcp, umask 077:
- TestGeminiImageConfigReachesTheGeminiAPI, new: a fake relay records
each request. Five generationConfigs (imageSize 4K, the reporter's;
aspectRatio 16:9 and imageSize 2K beside a thinkingConfig; the
snake_case image_config; none; temperature alone), at a provider
with the Gemini URL alone (generateContent and streamed), with a Chat
URL too (streamed), and with a Chat URL too and the model's API set
to Gemini (generateContent): 4 of 4 subtests ok
- TestGeminiImageConfigReachesCodeAssist, new: the same five to an
Antigravity sign-in's gemini-3.1-flash-image, generateContent and
streamed, read in request.generationConfig: ok
- both on f8cd964a, the test file alone: red. The Gemini URL alone and
the set-to-Gemini subtests, 3 asks each: "asked {...}:
/v1beta/models/gemini-3-pro-image-preview:streamGenerateContent was
sent "": ...", no imageConfig; Code Assist, both methods, 3 asks
each: "sent "": ..."; the two streamed subtests pass, the relay
having kept it
- broken by hand in a scratch worktree at that tree, each alone:
- parseGemini not reading it: the same 12 lines red
- buildCodeAssistSent not writing it: the same 12 lines red
- buildCodeAssistSent writing it when none was asked: 8 lines red,
"asked for none: ... was sent null" and "sent null"
- both, -race -count=5: ok
- go test -tags nogui -count=1 -timeout 45m -v ./internal/gateway,
Bun 1.4.2: 5402 passed with their subtests, 3 skipped, 1 red,
TestPluginToldWhereTheAgentWorks (#3675)
- tools/vetset.sh: gofmt -l clean; vet for linux, windows and darwin
with -tags nogui, windows vet, and the three builds exit 0; untagged
linux vet and build exit 1 at pkg-config (no GTK headers here)
- the full suite ran once, at 44a63bd5's tree; de27856c is covered by
the gateway package and the vet set above
Not tried: the reporter's relay, or any real Gemini API, Vertex AI or
Antigravity image model; the upstreams are fakes that record the body.
Whether a relay's Gemini API passes imageConfig on to Google is the
relay's.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
yetone (#3579): in the tray panel, the add sheet's More in Plugins, and
its search's "look for a plugin", asked the window for Plugins with no
more than the view's name (window/main?view=plugins). The window opened
on the tab of Plugins kept from before, Installed or Built-in, with
nothing looked for. 894ec960 made both open Discover in the window
itself; this is the panel's half.
The panel now asks for view=plugins&q=, with what its add sheet looked
for, empty when nothing was. More in Plugins sends the sheet's search,
lowercased, when it shows beside one (a search naming a subscription a
plugin serves, kiro say), and look for a plugin sends the search that
found nothing. mainView passes q on for Plugins whenever it is there,
empty too, since its being there is what says Discover; a q with a
control character (a newline, a tab) or over 100 code points goes on
empty. The window
opened on that address does what its own More in Plugins does
(pluginQuery): Discover, looking for q. start.js does it when the
window's first show() is done, so after show() has sent a window with a
plugin's update waiting to Installed, as the window's own More in
Plugins calls pluginQuery after show() too. It does it once: syncURL,
which show() calls, now takes q out of the address, so a reload, or the
window opened on Plugins again without a q, shows the tab kept, as
before. In the same window Plugins stays on Discover until another tab
is picked, as after the window's own More in Plugins. The GUI tests'
README describes the new half.
The deprecation note's Review in Plugins (several deprecated
subscriptions signed in) goes through openPlugins too, so from the
panel it now opens Discover as well, as it has in the window since
894ec960. openPlugins is the only sender of window/main?view=plugins.
plugins.js is not changed. app.js grows 94 bytes and start.js 182; with
the previous commit the core's scripts are 3 bytes under main's,
1,527,969 of 1,528,076, and app.js is 1,309,997 of 1,310,460.
Not changed: the window's own More in Plugins, and every other page the
panel opens the window on. mainView takes the view's own value
unchecked, so a q inside it skips mainFind (#3846); q goes no further
than Plugins' search field and its npm search, as typed there.
What was run (tree 7dce6444, on origin/main 56602426, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- plugins-more-discover (Node 22.22.1, Playwright 1.58.2), its panel and
window halves new, in English and Chinese, 5 times in Chromium and 5
in WebKit: 3 of 3 pass each time. The panel, on a first use (where it
shows the add sheet), asks for ?view=plugins&q= from More in Plugins
and ?view=plugins&q=fake%20co%26x from "look for a plugin" after a
search for "fake co&x" found nothing. The window, at what mainView
makes of those (?view=plugins&q=fake+co%26x, and &q=) with Installed
the tab kept, shows Discover with the search in its field, and its
address keeps no q, so a reload shows Installed. With a plugin's
update waiting (the test holds start.js until the update's answer is
sent; WebKit has it by the first show(), Chromium not always, see the
breaks), Plugins opened without a q shows Installed, and the window
the panel opened shows Discover.
- TestMainView's new cases: Plugins with no q, an empty q, a word,
"fake co&x", Chinese with &view=settings in it, a newline, a tab, 100
and 101 characters, 100 and 101 Chinese characters, and Settings with
a q. TestMainURL's: "智谱 glm" reads back from the window's address as
it was sent. With TestCoreScriptBudget, -count=50: 150 of 150 pass.
- Broken by hand, each red in plugins-more-discover:
- the panel asking for view=plugins alone, as on main: 0 of 3 in
each engine, at the panel's asks (?view=plugins for
?view=plugins&q= and for ?view=plugins&q=fake%20co%26x);
- start.js not looking for q, as on main: 0 of 3 in each engine, the
window the panel opened on Installed (已安装 in Chinese) for
Discover;
- Discover asked as start.js loads, before show(): WebKit 0 of 3 in
each of 5 runs, en and zh at "the window the panel opened, an
update waiting", Installed for Discover; Chromium red there in 2
of the 5 (en in both, zh in one). 25e1d038's record, its window
half in plugins.js, had Chromium red in 4 runs of 4 (en every run,
zh in 2);
- q left in the address (syncURL's q.delete taken out): 0 of 3 in
each engine, the address after the window opened still
?view=plugins&q=fake+co%26x for ?view=plugins.
- Every GUI file that reaches Plugins, the panel's add sheet or the
window the panel opens (the same 53 as 25e1d038's record, by a grep
for view=plugins, window/main, more-plugins, pluginQuery, pluginTab,
lookFor, look for a plugin, show("plugins") and #view-plugins), and
i18n-keys, each alone in both engines: 94 of 108 runs green. The
other 14 are red at 56602426 too, alone, and none is in what this
changes. Playwright here is 1.58.2, older than the 1.62.1 the GUI
tests' README names, so some of these may be red with this
Chromium or WebKit only; those with no issue named have none yet:
- builtins, WebKit: Plugins › Built-in, the Observability switch's
click times out; the stuck Plugins head intercepts the pointer.
- i18n-keys, run twice (it needs no browser): "a plugin's words are
its own", for plugins/routing/i18n.js's "masking…" (#4053).
- mobile-web, both engines: its "desktop matches origin/main" cases
compare with BASE_REF, origin/main by default, as git has it at
the run, which had moved on from 56602426 (the Gateway page's
screenshots differ). A copy with BASE_REF set to 56602426 passes
15 of 15 in each engine.
- modal-centred-late, WebKit: 820px and 560px, the dialog reaches its
README's height with fewer than 3 frames between
([407,575,676,674,672] and [407,466,519,520,520,520]).
- plugin-card-update, WebKit: en and zh, the wait for the Update
button times out, in 4 runs of 4; at 56602426 the same in 3 runs
of 4, and zh alone in the other (#3079 has en).
- plugin-github, WebKit: de 440, a click moves #view-plugins from 73
to 135 (#3218 has the same check red in Chromium, by 1px).
- plugin-github-wait, Chromium: de 440, a press on Try again
moves #view-plugins by 2.
- plugin-release, WebKit: en and zh read the line with a trailing
newline ("Serves Zed\n").
- settings-lines-wrap, both engines: de 440px, a row's line is cut
short, Usage's in Chromium and General's in WebKit.
- title-bar-tools: in Chromium, de, the wait for the Plugins head
times out; in WebKit, all five languages, here and at 56602426:
zh, zh-TW, ja and en for page errors from the fetches a reload cut
off (/api/agents/cli, /api/agents/install, /api/update and
/api/whatsnew; #2740 has /api/providers'), and de for that same
wait.
- gofmt -l clean. go vet -tags nogui for linux, windows and darwin, go
vet for windows, go build -tags nogui for linux and darwin and go
build for windows: exit 0 each. go vet and go build without the tag
on linux: exit 1 (no libsoup-3.0 or gio-unix-2.0 here).
- go test -tags nogui -count=1 -timeout 45m ./... (Bun 1.4.2, log
kept; 8m41s, load 40 at its start): 72 packages ok, and 12 tests red
in 5 packages, none of them this commit's tests or what they cover
(internal/gui's are its gateway tests): agent TestInstalledVersion,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath (#3141);
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout (#3641); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram
(umask 077, #3640); gateway TestPluginToldWhereTheAgentWorks
(the /tmp/.git of #3675); gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649).
The rest is what was run for 25e1d038, at tree ffc1adb1 on origin/main
02cbdf5b, the same Go code, tests and README (its window half was in
plugins.js, where this one's is in start.js; not this tree):
- Broken by hand in the Go, each red in the Go tests named:
- mainView passing no q: TestMainURL, and TestMainView's every
Plugins case with a q;
- mainView passing any q: TestMainView's newline, tab, 101
characters and 101 Chinese characters;
- mainFind as ^.{0,100}$: TestMainView's tab;
- mainFind counting bytes too: TestMainView's 100 Chinese characters.
Not tried: the real app's tray panel and window, on macOS, Windows or
Linux.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
MengXiangxi (#3821): a GitHub repository tagged magpie-plugin whose
package.json has magpie.hooks and no main, exports or index.js, a gateway
request hook alone that installs and runs, never showed in the Plugins
page's "Unofficial, on GitHub". readTagged read the magpie block's
middleware, agent and page but not hooks, so such a package was taken for
a provider: the file #1327's check looks for in the repository was its
entry as Bun resolves it, index.js, which it hasn't, and the 404 left it
out without a word. An inert index.js, as the reporter tried, lists it,
as a provider.
readTagged reads magpie.hooks. A package with hooks, no main or exports,
and none of middleware, agent or page is of kind "hooks", and the
file #1327's check looks for is its hooks file, so one whose hooks file
isn't committed (a dist built only to publish) is still left out, as a
middleware's is. The Plugins page picks "hooks" out with middleware, as
both run in the gateway (kindOf), and its chip says Request hook, as an
installed one's row does, through the word kindChip takes since the
previous commit. docs/subsystems/gateway-request-hooks.md says so. Not
changed: a raw 404 that GitHub's cache answers just after a push is
still kept for that push in this process (the reporter's second
point, #4067).
plugins.js grows 51 bytes for it. With the previous commit the core's
scripts are 24 bytes under main's, 1,527,948 of 1,528,076.
What was run (tree 79884772, on origin/main 56602426, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- TestTaggedHooksAlone, new. IvanXxxxyyuffff/magpie-system-prompt-file's
package.json as it is (a repository the report names) is kept, of kind
hooks, with its spec, package and version 0.3.0, and its hooks file is
the file asked for, never an index.js. someone/hooks-gone, whose hooks
file is only in a dist it doesn't commit, is left out. With
TestTaggedRepos*, -count=50: 350 of 350 pass; -race -count=20: 140 of
140, no race.
- plugin-github-hooks.test.cjs, new. Seven repositories of
/api/plugins/github's real answer of 2026-10-27 (two providers, three
middleware, two of hooks alone): each of hooks alone has the gateway's
chip saying Request hook and is picked out under Middleware, in
English, Chinese, Traditional Chinese, Japanese and German at 980px and
420px. Chromium and WebKit, 3 runs: 22 of 22 each run.
- Broken by hand, each red:
- no kind made of magpie.hooks, as on main: TestTaggedHooksAlone,
hooks alone not kept.
- the kind made but the file looked for still the entry, index.js:
the same.
- the hooks file not looked for: TestTaggedHooksAlone, the hooks file
not among the files asked for.
- kindOf without hooks, so a Provider: plugin-github-hooks 0 of 22.
- the card's chip not given its word: 0 of 22.
- TestCoreScriptBudget: ok.
- gofmt -l clean. go vet -tags nogui for linux, windows and darwin, go
vet for windows, go build -tags nogui for linux and darwin and go
build for windows: exit 0 each. go vet and go build without the tag
on linux: exit 1 (no libsoup-3.0 or gio-unix-2.0 here).
- The Plugins page's GUI files near the change, 24 with the new one and
i18n-keys, each run by itself in Chromium and in WebKit: 42 of 48 runs
green. The other 6 are red the same at 56602426, each file run the
same way, and none is in what this changes:
- i18n-keys, both engines: "a plugin's words are its own", for
plugins/routing/i18n.js "masking…", which internal/masking/masking.go
says too (#4053).
- builtins, WebKit: Plugins › Built-in, the Observability switch's
click times out, the stuck Plugins header (.lib-head.pm-head.stuck)
over it taking the pointer.
- plugin-github, WebKit: de 440, a click scrolls #view-plugins, 74 to
139 (65 to 119 at 56602426; #3218 has the same check red in
Chromium).
- plugin-github-wait, Chromium: de 440, Try again moves #view-plugins
by 2.
- plugin-release, WebKit: en and zh read "Serves Zed\n" for "Serves
Zed".
- go test -tags nogui -count=1 -timeout 45m ./... (Bun 1.4.2, log
kept; 8m48s, load 32 at its start): 71 packages ok, internal/plugin
among them, and 16 tests red in 6 packages, none of them this
commit's tests or what they cover (internal/gui's are its gateway
tests): agent TestCodexDriftReached (#3398); TestInstalledVersion,
TestHowInstalled, TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath (#3141); TestReasonixCLIRequiresSupportedNativeVersion
and TestReasonixCLIRecoversAfterProbeTimeout (#3641); davsync
TestSyncTeraCloudStillSeesOtherWrites (#3420); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram (umask
077, #3640); gateway TestPluginToldWhereTheAgentWorks (the
/tmp/.git of #3675); gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649).
The rest is what was run for 31a99237, at tree 2dd21699 on origin/main
508911e4, the same Go change (github.go has since taken e4ccf67b's
search timeout, in askTagged, not readTagged; 31a99237's plugins.js
named the card's chip by hand, not through kindChip, and had three
lines of comment this leaves out; not this tree):
- Real use: magpie web built at 508911e4 and at that change's code
(529f07e5, the same but for the new GUI file), each in a sandbox HOME,
asked real GitHub for /api/plugins/github. 508911e4 listed 163 and left
IvanXxxxyyuffff/magpie-system-prompt-file out. That change listed 164,
it and MengXiangxi/magpie-openviking (which now has the inert index.js)
of kind hooks. cyberElar/magpie-x-search (#1327's, a command only) was
left out by both.
Not tried: macOS and Windows; the real app's window (no display here, the
page in Playwright's browsers only).
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
The Installed tab's row of a gateway request hook made its chip as
middleware's and then wrote "Request hook" over the chip's word, in
five lines. kindChip now takes a word to say in place of its kind's,
and the row asks for its chip in one line. Behaviour is unchanged: the
same chip, class, glyph and tooltip, its word translated as before.
This makes room under TestCoreScriptBudget for the next commit without
raising the budget: the core's scripts go from 1,527,972 to 1,527,897
of 1,528,076.
plugin-gateway.test.cjs, which opens such a row, now checks its chip
says Request hook in each of its five languages; nothing checked it.
What was run (tree 0b0ba0c9, on origin/main 56602426, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- plugin-gateway.test.cjs, Chromium and WebKit: 12 of 12 pass. With
56602426's plugins.js under it: 12 of 12, so the chip said the same
before this change.
- kindChip ignoring the word given (t(word) for t(name || word)): 0 of
12, the chip saying Middleware, translated, in every language.
- TestCoreScriptBudget: ok.
- The GUI files near the change, vet and the full suite ran at the next
commit's tree, which holds this one.
Not tried: the real app's window (no display here, the page in
Playwright's browsers only).
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
CandyACE (#3893, a screenshot of Settings › About): Automatic updates
said "Checks for a newer magpie and downloads it" (zh "自动检查 magpie
新版本并下载"), and Download updates automatically, a few rows below,
says "Downloads a newer version as soon as it is found", so the two
read as one setting shown twice.
They are two: Automatic updates (noAutoUpdate) is whether magpie asks
for a newer version by itself, and how often (#472); Download updates
automatically (noAutoDownload, #2296) is whether a version found, by
those checks or the version row's Check, downloads at once. With
downloads off, Automatic updates' line was also wrong. It now says
"Checks for a newer magpie by itself", in en, zh, zh-TW, ja and de,
and the comment above it no longer says it downloads. The rows, their
names and what they save are as they were. app.js is 26 bytes smaller
(1,309,417), so the core budgets keep their room.
What was run (tree 93eeed7e, on origin/main f8cd964a, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, umask 077:
- update-auto.test.cjs (Node 22.22.1, Playwright 1.58.2), Chromium and
WebKit: 3 runs, 2 of 2 each, the line read in en and zh
- the same test with f8cd964a's app.js and i18n.js: red in both
engines, en and zh, "the switch says it checks, not that it
downloads"
- the other 14 update-*.test.cjs, both engines, at load 29: Chromium
20 of 20, WebKit 13 of 20. The 7 WebKit reds are main's:
update-download-percent, update-hide, update-notes-ask (3) and
update-wait on WebKit's "ResizeObserver loop completed with
undelivered notifications." counted as a page error (#3942), and
update-download on "the click scrolled the page". The five files in
WebKit, here and on f8cd964a in turn, 3 runs each at load 28 to 56:
here 6, 6 and 5 of 10 red, on main 7, 6 and 6, the same cases
- i18n-keys, gui-zh-tw, gui-ja and gui-de, both engines: 12 of 13, the
red i18n-keys' "a plugin's words are its own" on plugins/library's
"Runs as" (#3897, as on main)
- go test -tags nogui -count=1 -timeout 45m ./internal/gui (log kept):
ok but TestGatewayHeldByAContainer and TestGatewayFixQuitsOnlyAMagpie
(#3649)
- go test -tags nogui -count=1 -timeout 45m ./... (tools/suite.sh, Bun
1.4.2): 69 packages ok and 7 red, none in what this changes: agent
TestCodexDriftReached (#3398), TestInstalledVersion, TestHowInstalled,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath (#3141), the two Reasonix tests (#3641) and
TestWSLColdPlaceOpensNothing (#3924); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram (umask 077,
#3640); gateway TestPluginToldWhereTheAgentWorks (#3675); gui
TestGatewayHeldByAContainer and TestGatewayFixQuitsOnlyAMagpie
(#3649); provider TestCodexAppServersOnHome (#3906), then "close of
synctest channel from outside bubble" (#3632); tui
TestTUIFetchesSubscriptionModels/agent (#3919)
Not run: gofmt, vet and the builds; no Go file changes.
Not tried: zh-TW, ja and de read by a native speaker; the new lines
are shortened from the old ones, which were theirs.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
The test reads the heap once the upstream has written each request's
first chunk: got is sent from its handler right after the Flush. The
gateway lets the body it sent go when forwardOnce returns (#3383),
after the transport has read that reply off the connection and p.Do
has returned it, so the heap can be read while a request still holds
what it sent, and only the two GCs before the read give it time. A
scratch copy of the test, on 23cec6c4, counted the requests whose
first text had reached their agent when the wait ended: -count=30 at
-cpu 1, 2, 4 and 8, it was 8 of 8 in none of the 120 runs (7 in 85,
down to 1), and the held ratio ran from 1.74 to 2.87 against the bar
of 3. In my full suite at 6b556f5a (go test ./..., internal/gateway
441 s beside the other packages) it went over:
streaming_heap_test.go:96: 8 streaming requests of 4 MB hold 121 MB,
3.1 times the body each
The test now waits for each request's first text at the agent's end
of its pipe (firstText): the gateway streams it from the reply
forwardOnce returned, so that request's LetGo has run. What the heap
is read for, and the bar, are unchanged.
What was run (this commit on 23cec6c4; go1.26.8, -tags nogui):
the same count with this wait, -count=30 at -cpu 1, 2, 4 and 8: 8 of
8 in 120 of 120, the ratio 2.09 to 2.19
the answers made to reach forwardOnce late, a 300 ms pause after
p.Do (scratch, not in this commit):
all 8, -count=10: the old test red 10 of 10, "3.7 times" to "4.0
times the body each"; this one ok
the first 3, six runs: the old test red in one, "8 streaming
requests of 4 MB hold 122 MB, 3.1 times the body each"; this one
ok in six. The first 1 or 2: both ok six times, the old test's
ratio up to 2.73
LetGo taken out of forwardOnce, -count=10: red 10 of 10, "8 streaming
requests of 4 MB hold 152 MB, 3.9 times the body each"
-race -count=20: ok; -cpu 1,2,4 -count=20: ok
gofmt -l internal/gateway: nothing; GOOS=linux, darwin, windows go
vet -tags nogui ./internal/gateway: exit 0
full suite, go test -tags nogui -count=1 -timeout 45m ./... at this
commit: 63 packages ok; internal/gateway ran 445 s, this test ok in
it. 7 packages red, each of this machine and named before (#3480's
d970371e): #3141's lookup tick (TestInstalledVersion,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir,
TestZedAppPath); Reasonix's two (a /tmp/.git that isn't this user's);
every connection proxied, even to this machine's own non-loopback
addresses (TestCallbackGoesPastTheAgentsProxy,
TestClaudeToolCallbackOnANonLoopbackAddress,
TestGatewayFixQuitsOnlyAMagpie, TestGatewayHeldByAContainer); umask
077 (TestWriteAtomicReadOnlyHardLink, testenv's TestProgram); Bun
1.3.11 (TestBunProxyLoginWithReservedCharacters, #3397)
Not tried: macOS, Windows, CI's runners.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
When both sides changed a part, the newer stays: this computer's
change wins when changed(p), the part's file time here, is After
remote.Created, the other computer's push, taken with time.Now(). A
file's time comes from the kernel's clock, which moves in ticks (4 ms
at HZ=250 on this Linux box) and is behind time.Now() by up to a tick
or two: of 20,000 files written right after a time.Now(), 19,954 to
20,000 had a modification time before it, by up to 8 ms.
TestSync ("…and the newer one stays") and
TestSyncTeraCloudStillSeesOtherWrites save this computer's change a
few ms after the other's push and expect it to be the newer. A save
inside the push's tick reads as the older, and the other's copy
replaces it:
davsync_test.go:309: newer here: &{... Here:[settings] There:[] ...}
teracloud_test.go:303: a wrote over b's providers without seeing
them: &{... Here:[providers] There:[] ...}
TestSync was red so in 3 of my full suites (10-19, 10-20, 10-23).
Alone on b437e4ad, -count=100: TestSync red 13 times,
TestSyncTeraCloudStillSeesOtherWrites 21. With the gap from the push's
Created to the saved file's time logged, every red run had a gap of
0 or less (down to -1.9 ms and -3.2 ms), and no green one did.
Each test now dates its change to time.Now(), the clock the push's
Created comes from, right after the save (os.Chtimes, as TestSync
already dates its older change an hour back). The rule itself is
unchanged: a change inside a tick of another computer's push is as
good as at the same moment, and two computers' clocks differ by more.
What was run (tree 77adaa75, on b437e4ad):
the tick injected, on b437e4ad: the save dated 1 ms before the
push's Created. -count=20 of both tests: red 20 of 20 each, at
davsync_test.go's newer-here check and teracloud_test.go's
wrote-over check
with this change, -count=200 of both: ok
broken by hand, with this change:
davsync.go's both-changed case never taking this computer's:
davsync_test.go:316: newer here: ... Here:[settings] There:[]
teracloud_test.go:310: a wrote over b's providers without
seeing them: ... Here:[providers] There:[]
always taking it:
davsync_test.go:294: older here: ... Here:[] There:[settings]
gofmt -l internal/davsync: nothing
GOOS=linux, darwin, windows go vet -tags nogui ./internal/davsync:
exit 0
full suite, go test -tags nogui -count=1 -timeout 45m ./...
(go1.26.8, 467 s): 62 packages ok, internal/davsync among them. 16
reds in 7 packages, none in a file this change touches:
internal/agent TestInstalledVersion, TestHowInstalled,
TestOmpDetectedWithPiDir, TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI and TestZedAppPath:
proc.Look keeps "not found" for a tool written in the tick of its
folder's last change (#3141).
internal/agent TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout: their fixture build under
/tmp meets a /tmp/.git that isn't a repository of this user's
("error obtaining VCS status: exit status 128").
internal/claudebridge TestCallbackGoesPastTheAgentsProxy,
internal/gateway TestClaudeToolCallbackOnANonLoopbackAddress,
internal/gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie: the processes this run started had
their outgoing connections sent through a proxy (graftcp).
internal/edit TestWriteAtomicReadOnlyHardLink and internal/testenv
TestProgram: umask 077 here; the fixtures' own modes go through it
(0444 is written as 0400).
internal/netproxy TestBunProxyLoginWithReservedCharacters: Bun
1.3.11 on PATH names port 80 in the request line (#3397).
Not tried: macOS, Windows.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
TestFourKImageByURLIsSaved, TestStalledDownloadSaysWhereTheImageIs and
TestSlowTransferIsNotCutShort shorten a download watchdog to 1 s or
300 ms. Each watchdog is put back when bytes come, and the time it
counts includes this process storing them: FetchImage's buf.Write, and
the GET's io.ReadAll, which in Go 1.26 fills fresh chunks half the size
of what has come. At the real 60 s that is nothing. At 1 s and 300 ms
these went red here, beside a full suite on a Linux box, with the line
never stopped:
big_image_test.go:153: after 4.096s: image 1 was drawn but couldn't
be downloaded (nothing came for 1s, after 4.2 MB)
big_image_test.go:207: image 1 ... (nothing came for 300ms, after
8.2 MB), the 4K image that comes in full
big_image_test.go:207: image 1 ... (nothing came for 300ms, after
0.0 MB), the same
stall_test.go:180: slow download: the server sent and took nothing
for 1s (GET): the line or the server stopped (twice)
A probe beside a full suite wrote 256 KB pieces into a bytes.Buffer up
to 10 MB, as FetchImage does. Of 262,440 writes, 20 were held over
300 ms: 19 grew the buffer from 8 to 16 MB (up to 1.3 s), and one was a
fresh buffer's first write (2.7 s). A goroutine sleeping 10 ms beside
them woke at most 57 ms late, so the time went into the memory, not
into waiting to run. A second probe touched fresh memory: 16 MB was
held up to 454 ms, 4 MB up to 278 ms, 1 MB and 256 KB at most 1 ms.
Now:
- TestFourKImageByURLIsSaved: the stall is 5 s (was 1 s), and the 4K
image comes in 256 KB pieces 200 ms apart (was 100 ms), about 8 s,
so the download still outlasts the stall that plays #1576's 2-minute
cap. The check that it was the slow one is now "longer than the
stall" (was 3 s).
- TestStalledDownloadSaysWhereTheImageIs: the stall is 1 s (was
300 ms), the stuck server sends 1 MB before it stops (was 3 MB), and
the image that comes in full is the small png the other tests serve
(was the 9.8 MB 4K one, whose buffer the 8.2 MB red was growing).
- TestSlowTransferIsNotCutShort: the backup is 2 MB at 512 KB/s, 64 KB
every 125 ms (was 24 MB at 6.4 MB/s), still about 4 s each way under
the same 1 s watchdog; the largest fresh chunk the read back fills is
then under 1 MB.
What was run (tree 8e4ecb44, on b437e4ad):
-count=10 of the three tests: ok (TestFourKImageByURLIsSaved 8.2 s on
average, TestStalledDownloadSaysWhereTheImageIs 2.0 s,
TestSlowTransferIsNotCutShort 9.9 s)
broken by hand, with this change:
FetchImage's stall not put back when bytes come (a 5 s cap on the
whole download):
big_image_test.go:157: after 5.003s: image 1 was drawn but
couldn't be downloaded (nothing came for 5s, after 6.2 MB)
FetchImage's stall never ending a download (the stopped one is
kept until its server gives up, and saved):
big_image_test.go:209: <nil>: Generated with ..., saved to: ...
davsync's watchdog not put back when bytes move:
stall_test.go:177: slow upload: ... the server sent and took
nothing for 1s (PUT)
no room once the PUT's body is all handed over (allSent):
stall_test.go:177: the same
gofmt -l internal/imagemcp internal/davsync: nothing
GOOS=linux, darwin, windows go vet -tags nogui ./internal/imagemcp
./internal/davsync: exit 0
full suite, go test -tags nogui -count=1 -timeout 45m ./...
(go1.26.8, 469 s): 62 packages ok, internal/imagemcp and
internal/davsync among them. 13 reds in 7 packages, none in a file
this change touches:
internal/agent TestInstalledVersion, TestOmpDetectedWithPiDir,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI and
TestQoderSettingsFromAnIDEPluginIsNotTheCLI: proc.Look keeps "not
found" for a tool written in the tick of its folder's last change
(#3141).
internal/agent TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout: their fixture build under
/tmp meets a /tmp/.git that isn't a repository of this user's
("error obtaining VCS status: exit status 128").
internal/claudebridge TestCallbackGoesPastTheAgentsProxy,
internal/gateway TestClaudeToolCallbackOnANonLoopbackAddress,
internal/gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie: the processes this run started had
their outgoing connections sent through a proxy (graftcp).
internal/edit TestWriteAtomicReadOnlyHardLink and internal/testenv
TestProgram: umask 077 here; the fixtures' own modes go through it
(0444 is written as 0400).
internal/netproxy TestBunProxyLoginWithReservedCharacters: Bun
1.3.11 on PATH names port 80 in the request line (#3397).
Not changed:
- The watchdogs. At their real 60 s a buffer's growth is far inside
them; only a test's shortened one meets it.
- pii's TestFetchStall (200 ms): its watchdog times a fresh 256 KB
buffer and one read of 1000 bytes, at most 1 ms in the probe. Not
seen red here.
- davsync's TestStalledTransferFailsPromptly and
TestMetadataRequestHasALimit (300 ms): a stall that comes early
still passes them, since they check that a stall is told, and soon.
- A pause like the 2.7 s one would still trip the 1 s watchdogs of
TestStalledDownloadSaysWhereTheImageIs and
TestSlowTransferIsNotCutShort. It came once in the probe's 7.5
minutes.
Not tried: macOS, Windows.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
codexReached keeps its read of Codex's log while the database and its
-wal keep their size and modification time (84210ae7, #1665), for up to
reachedFor (15s). Both tests insert a request into logs_2.sqlite and ask
Drift at once, three or four times over. Two inserts inside one tick of
the file system's clock leave that stamp as it was, so Drift answers
from the read taken before the second insert. On this Linux box (ext4
under /tmp), 317 of 400 back-to-back inserts left a rollback-journal
database's size and time unchanged; in WAL mode 156 of 400 did, once
the -wal had wrapped and was written over in place. Codex's own
logs_2.sqlite here is WAL, with a -wal that stays at 4.4 MB.
On b437e4ad, -count=60 of the two tests:
TestCodexDriftReached red 11 times
applied_test.go:280: elsewhere: &{Kind:bypassed ... Detail:Codex couldn't reach magpie at 09:46 — magpie wasn't running then, ...} (5)
applied_test.go:284: reached magpie: &{Kind:bypassed ... Detail:Codex's last request (09:46) went to chatgpt.com, not magpie — ...} (6)
TestCodexBehindReverseProxy red 2 times
proxy_kept_test.go:293: to chatgpt.com: <nil>
Both tests are older than the memo; before it, each ask opened the log.
These tests are about what Drift says of each kind of request. When the
log is read again is TestCodexReachedReadsLogOnlyWhenItChanged's to
test. So each request they log now drops the kept read
(forgetReached), and the next ask reads the log.
What was run (tree d5c248e9, on b437e4ad):
the tick injected: after each insert, the database's time set back
to what it was before the insert (os.Chtimes), so every insert keeps
the stamp. -count=20 of both tests:
without this change: both red 20 of 20, at the elsewhere check
(applied_test.go:280) and the to chatgpt.com one
(proxy_kept_test.go:293)
with it: ok
-count=200 of TestCodexDriftReached, TestCodexBehindReverseProxy and
TestCodexReachedReadsLogOnlyWhenItChanged: ok
broken by hand, with this change:
codexReachedRead never records a refusal:
applied_test.go:277: refused: <nil>
applied.go's went-elsewhere case off:
applied_test.go:281: elsewhere: <nil>
proxy_kept_test.go:294: to chatgpt.com: <nil>
gofmt -l internal/agent: nothing
GOOS=linux, darwin, windows go vet -tags nogui ./internal/agent: exit 0
full suite, go test -tags nogui -count=1 -timeout 45m ./... (481s):
62 packages ok, the two tests above with them. 14 reds in 7
packages, none in a file this change touches, each red on b437e4ad
without it:
internal/agent TestInstalledVersion, TestHowInstalled,
TestOmpDetectedWithPiDir, TestCopilotFolderFromAnIDEPluginIsNotTheCLI
and TestZedAppPath: proc.Look keeps "not found" for a tool written
in the tick of its folder's last change (#3141). Alone on b437e4ad,
-count=10: TestHowInstalled red 3 times, TestZedAppPath 7.
internal/agent TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout: their fixture build under
/tmp meets a /tmp/.git that isn't a repository of this user's
("error obtaining VCS status: exit status 128").
internal/claudebridge TestCallbackGoesPastTheAgentsProxy,
internal/gateway TestClaudeToolCallbackOnANonLoopbackAddress,
internal/gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie: the processes this run started had
their outgoing connections sent through a proxy (graftcp).
internal/edit TestWriteAtomicReadOnlyHardLink and internal/testenv
TestProgram: umask 077 here; the fixtures' own modes go through it
(0444 is written as 0400).
internal/netproxy TestBunProxyLoginWithReservedCharacters: Bun
1.3.11 on PATH names port 80 in the request line (#3397).
Not changed:
- The memo. In the app, a request Codex logs inside the tick of
magpie's last read (a connect and its refusal one after the other)
can reach Drift up to reachedFor late, which the memo allows for
already. A settle window like filememo's or codex_list_tag's would
see it at once, at the cost of a read per ask just after each of
Codex's writes, the reads #1665 took out.
- The fixtures' journal mode. A WAL fixture would pass these tests
only while its -wal grows, which stops once it wraps.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout build a fake reasonix with go
build inside t.TempDir(). go build stamps VCS info by default: it looks
for a folder named .git above the fixture's module and runs git there,
and when that .git is no repository git will open (empty, as here, or
unreadable), git exits 128 and the build fails ("error obtaining VCS
status: exit status 128"). On this box /tmp/.git is an empty folder
owned by nobody, and git there says "not a git repository", so both
were red in every full run here that got that far.
Both builds now pass -buildvcs=false. reasonixCLI reads only the build
info's package path (info.Path, reasonix/cmd/reasonix), which the flag
doesn't touch. With no .git above, as on CI, the fixture is byte for
byte the same with and without the flag. No other test builds a package
with go: goose_test.go builds a single file, which go doesn't stamp,
and gui's `go mod download` builds nothing. The same /tmp/.git turns
gateway's TestPluginToldWhereTheAgentWorks red another way, through
provider.GitOnDisk (#3675), which this doesn't change.
What was run (tree 9ef1c9ee, on origin/main 01468003, go1.26.8):
- TMPDIR under an empty .git (mode 0700, mine), under a .git with mode
000, and TMPDIR=/tmp (the box's /tmp/.git), -count=3 each: on
01468003 both red at their build every time ("error obtaining VCS
status: exit status 128"); with the change ok, 3 of 3 each. With no
.git above, ok on both.
- TestGooseDetectSkipsGoGoose under the empty .git: ok, 3 of 3, its
build run, not skipped.
- The fixture built in a folder with no .git above, with and without
the flag: `go version -m` prints the same (path reasonix/cmd/reasonix,
no vcs lines), and cmp finds the two binaries identical.
- gofmt -l . clean; GOOS=linux, windows and darwin go vet -tags nogui
./... and GOOS=windows go vet ./... without the tag: exit 0 each. go
build not run: the change is in a _test.go file.
- Full suite outside graftcp (systemd-run, umask 077, Bun 1.4.2 first
on PATH as on CI, -timeout 45m, log kept): 65 ok, 6 red, the Reasonix
pair not among them:
- provider: #3632's fatal error, which 01468003 has.
- agent TestInstalledVersion, TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath: #3141.
- edit TestWriteAtomicReadOnlyHardLink and testenv TestProgram: this
box's umask 077, #3640.
- gateway TestPluginToldWhereTheAgentWorks: the same /tmp/.git,
through provider.GitOnDisk, which takes any .git for a repository:
#3675.
- gui TestGatewayHeldByAContainer and TestGatewayFixQuitsOnlyAMagpie:
#3649.
Not tried: Windows and macOS, where the flag does the same; and a .git
that is another user's repository (git's "dubious ownership"), which
needs a second user here.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
TestWriteAtomicReadOnlyHardLink and testenv's TestProgram were red on a
box whose umask is 077 and green at CI's 022. Each wants a mode the
umask had already cut from its own file:
- TestWriteAtomicReadOnlyHardLink makes its fixture with
os.WriteFile(other, ..., 0o444), which is 0400 under 077. WriteAtomic
keeps the file's mode, as it should, so the test read 0400 ("mode
-r--------") where it wants 0444. The fixture is now chmodded to 0444
after it is written, as TestWriteAtomicKeepsGroupAndMode in the same
package already does with its 0664.
- testenv.WriteProgram wrote a fake with os.WriteFile(path, b, 0o755)
on every system but macOS: 0700 under 077, and a file written over
kept the mode it had. macOS's path chmods it to 0755 after writing,
so there neither the umask nor the old file decides it. The other
systems now chmod it to 0755 the same way, and TestProgram's 0755
holds there too. TestProgram now also writes its second program over
the first left at 0644, so the chmod is needed at CI's umask too.
What was run (tree 7b414828, on origin/main 01468003, go1.26.8):
- On main at umask 077: TestWriteAtomicReadOnlyHardLink "mode
-r--------", TestProgram/first "mode: &{fake 19 448 ...}" (0o700);
at 022 both ok. With the change: both ok at 077 and at 022.
- Each half taken out alone: without the fixture's chmod,
TestWriteAtomicReadOnlyHardLink red at 077 as on main (ok at 022)
and TestProgram ok; without WriteProgram's, TestProgram red at 077
and at 022 ("ran again: "" fork/exec .../fake: permission denied",
the 0644 file it wrote over) and the edit test ok.
- Siblings: a grep of the tests' mode checks finds two more that need
group or other bits, TestWriteAtomicKeepsGroupAndMode and
TestAsideKeepsModelsPermissions; both chmod their fixture already.
- gofmt -l clean; GOOS=linux, windows and darwin go vet -tags nogui
./... and GOOS=windows go vet ./... without the tag: exit 0 each.
go build not run: testenv is imported only by tests, so neither file
is in a build.
- Full suite outside graftcp (systemd-run, umask 077, Bun 1.4.2 first
on PATH as on CI, -timeout 45m, log kept): 67 ok, 4 red, edit and
testenv ok:
- provider: #3632's fatal error, which 01468003 has.
- agent TestInstalledVersion, TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI and
TestOmpDetectedWithPiDir: #3141; TestCodexDriftReached and
TestCodexBehindReverseProxy: #3398;
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout: #3641.
- gateway TestPluginToldWhereTheAgentWorks: this box's /tmp/.git,
#3675.
- gui TestGatewayHeldByAContainer and TestGatewayFixQuitsOnlyAMagpie:
#3649.
Not tried: Windows, where a chmod to 0755 only clears the read-only
attribute, which a file WriteFile just wrote doesn't have, so nothing
changes there; and macOS, whose path is unchanged and where
TestProgram's new step hasn't been run.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
A start's first page of All (the warm-up's, and the Usage page's own)
paired the whole history for the page's cells, every gateway call with
its session row: ~85 MB of a ~316 MB heap at 18s after the heatmap's days
and Codex's effort were kept (v0.1.2172). The cells of the rows before
cut (local midnight two days back) are now kept as heatSplit keeps its
days, in memory and in page-v1.json beside the sessions cache, under a
key from heatSettledKey plus the page's until, names and hours. A start
pairs only the chunks since the edge. A page whose rows are older than
cut (an offset past the recent rows) falls back to the full pairing.
Real history on mote (~/r2278, a copy of the owner's), 120s each,
three starts in a row:
v0.1.2165 fp_peak 451-471 MB, peaklive 326-364 MB
this, miss fp_peak 587 MB, peaklive 408 MB (a new binary's first start)
this, hit fp_peak 361/366 MB, peaklive 265 MB, gcs 150 (was ~150)
page-v1.json is ~240 KB.
The output is the same: /api/usage/requests for period all, 7d, 30d,
all with offset/limit and all filtered to codex, from a start that hit
page-v1.json and from a cold one (file moved away): 0 differences, each
float within 1e-6, on two hit runs.
Test: TestPageSettledFromDisk (first page pairs once and writes the file;
after a restart fewer chunks are paired and the page is equal; an older
offset falls back and equals the cold page; a changed settled file pairs
everything, then hits again). Broken by hand (pageSplit always false):
it goes red at "first page: pairings []".
Run at this head (rebased on ace8ee1e1), on mote:
go test -count=1 ./internal/usage ./internal/usageapi: ok, ok
GOOS=linux/windows/darwin go vet -tags nogui ./internal/usage ./internal/usageapi: ok
Not run: the full suite. TestCoveredWindowStaysUp (internal/gui) is red
on mote even alone, "signal: killed", the AppKit hang under #4125; this
change touches internal/usage only.
registry.json's `icon` can be an https URL: Kilo Code
(https://github.com/Kilo-Org.png), Search1API (https://s1.dev/icon.png),
PowerContext (a raw.githubusercontent SVG) and GoAnyAPI
(https://goanyapi.com/logo.png). It reached the page as it was, and app.js
icon() took any name for a bundled file (icons/<url>.svg), so the Discover
card, the plugin's page and Kilo's agent row showed the generic cube.
A market picture now goes through the path a plugin's own picture already
takes (pluginOwnIcon / RepoIcons). Only a public https host is fetched,
the size is capped, and the file is kept as file:<hash> and served from
/api/icons. The page never loads a remote URL. Until the picture is in,
the icon is "", which the page draws as the cube.
- provider.MarketIcon / MarketPicture. PluginIcon (installed plugins)
uses them.
- agent pluggedIcon (an agent plugin's row, which is Kilo's case) uses
them too.
- gui listingIcons: /api/plugins/listings and /api/plugins/market keep
the market's picture icons and the npm icons in one RepoIcons call
(the market waits up to 3s, the listings don't wait). The market's own
slice is not changed.
- app.js icon(): a name with ':' or '/' that isn't file:/data: is drawn
as the cube, never asked for as icons/<url>.svg. A kept picture that
fails to load already falls back to the cube through the img's onerror.
app.js stays under its budget: two comments were shortened, with no
raise.
Tests:
- TestMarketIconURLKept (provider): an https icon becomes file: and is
fetched once, a bundled name is unchanged, and http:// is refused.
- TestRegistryIconPictureKept (gui): listings give file: for a data:
icon, keep a bundled name, and give "" for javascript:. The market's
listing is not mutated.
- plugin-registry-icon.test.cjs: Chromium and WebKit, en/zh/zh-TW/ja/de
at 980 and 420. A kept picture is drawn on the card and on its page. A
URL shows the cube. A 404 picture shows the cube, not a blank. A bundled
icon stays bundled. Nothing is asked of another host.
What was run:
- Before the rebase (mote):
- focused Go tests: ok.
- plugin-registry-icon: 22/22.
- real use, sandbox HOME, the four real registry URLs: each fetched
and kept as file: (Kilo png 1455 B, s1 png 4426 B, PowerContext svg
40309 B, goanyapi png 21878 B).
- At the rebased fix (on dca3e2d71), on mote:
- go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: ok.
- Linux and Windows builds: ok. gofmt clean.
- go test -tags nogui -count=1 -timeout 45m: internal/gui, provider,
agent and plugin all ok.
- GUI on mote: the 58 Plugins-page files were run twice. Both runs were
red by browsers crashing or failing to launch (#4125: pboard crashes,
SEGV, newContext "browser has been closed"). origin/main's
agent-plugin-agents fails the same way there.
- GUI on the Linux box (wsl-run), at this head:
- plugin-registry-icon, icon-tile, i18n-keys and plugin-card-update:
ok, except plugin-card-update in WebKit, which is red the same at
origin/main 46fb0c1b9 (#3079, commented).
- plugin-registry-icon was first red there in WebKit: the Discover
list is drawn again as the market comes in, so a card could detach
mid-scroll. The test's scroll now looks again; it passes 20/20 in
both engines.
- The Chromium reds plugin-github (80 -> 79) and plugin-move-unserved
(Model 1) are red the same at origin/main 46fb0c1b9 (#3218,
#4410/#4392).
Broken by hand:
- MarketIcon returning its input made both Go tests red. The listing
gave the raw data URI and javascript:alert(1), and PluginIcon gave the
https URL.
- Without the app.js guard, plugin-registry-icon was 0/22: it asked
for http://magpie.test/icons/https://s1.dev/icon.png.svg.
Not run yet: the whole GUI suite, the full go test ./..., Windows test
runs and the real GUI app. They run after the push, and each red gets
its own issue.
101775657 (a key's rest that ends on another day says its date) put
app.js at 1,315,507 bytes, 191 over its budget of 1,315,316, and
TestCoreScriptBudget red on main; its body said the budget test passed,
from a run before the rebase that brought app.js up to the line. restBack
is now one line with no comment (the reason is in key-rest-date.test.cjs
and 101775657), and app.js is 1,315,290, with no raise.
Run (mote-run, at this change on origin/main 88e6fb9cf): go test -run
Budget ./internal/gui ok; node --test key-rest-date.test.cjs, Chromium:
10 of 10 (en/zh/zh-TW/ja/de at 1100 and 420px). WebKit not run: a bare
webkit.launch() times out on mote now (#4125).
The full go test ./... that found it ran on the pushed changes: red
otherwise only on #4362's gateway tests and the real-window AppKit tests
(#2645, #4125), plus TestClientPathCoversHandler and
TestRequestDiskNamesItsSource, both of which pass alone at this head (the
suite's copy was taken while this worktree was mid-rebase).
SenseTime Raccoon answers an account whose token throughput is used up
with 429 {"error":{"code":"user_model_rate_limited","message":"您的模型请
求频率超限,请稍后重试","type":"rate_limit_error"}} and no Retry-After.
Its words read as a short rate limit, so the lone account was asked again
by the same-one retries (passing: 1, 2, 4s) and then by the plain
provider's patience (busy/replan: 2, 4, 8, 16s): eight asks in ~38s,
each one resending the whole ~88k-token request into the bucket it was
waiting on (cycocyco's numbers in plugins#512).
A 429 whose error.code is in wallCodes (only user_model_rate_limited) is
now neither passing nor busy. It still reads as failRate and rests as one
(a minute, doubled each time it comes back, up to 30 min, rateRest), so a
group's next member or the provider's next account is asked, and a lone
one hands the agent the vendor's error after one ask. The code is matched
at error.code only, not as words anywhere in the body. Other rate limits,
the same Chinese words under another code included, are retried as
before. The plugin passes the vendor's body through unchanged, so this is
the place for it.
Run (mote, at this change on origin/main 244d80e23):
- go test ./internal/gateway -run 'TestTokenWall|TestRateLimitIsWaitedOut|TestShortReset|TestLastOneLeft|TestGroup': ok
- gofmt -l internal cmd: clean; GOOS=linux go vet -tags nogui ./... and
GOOS=windows go vet ./...: ok
- go test -timeout 45m -count=1 ./...: every package ok except
internal/gui, whose ten real-window AppKit tests (dock, panel, tray,
titlebar, plugin page) were killed at their deadlines, mote's known
state (#4125, #2645); this change touches no GUI code.
Rebased on origin/main 88e6fb9cf: go test -timeout 45m ./internal/gateway
./internal/usage: ok. Rebased again on 88e6fb9cf (routing.go's credit
rests changed, not the rate path): go test ./internal/gateway -run
'TestTokenWall|TestRateLimitIsWaitedOut|TestShortReset|TestLastOneLeft|
TestGroup|Rest|Credit': ok; the whole package not rerun there.
Broken by hand: with both !walled(body) guards taken out,
TestTokenWallIsNotRetriedInPlace is red (passes, busy) and
TestTokenWallFailsFast is red with "429 after 16 tries".
Not tried: the real Raccoon API (no account here), nor the reporter's
Hermes on Windows.
士奇 on Discord (Simplified Chinese GUI, the third report of this): with
routing groups off, Hermes Agent's and WorkBuddy's model lists had the
ChatGPT subscription's GPT models. With routing groups on, they were gone.
Cause: the user's group names those models and lists itself alone
(Group.Unlists, the routing plugin's option for that, #1783). While the
group is on, catalogKeeping drops what it names from Catalog(), and every
agent's list starts from Catalog(). With groups gated off the group's
Unlists goes away, so the models came back. a3ee00c05 kept them for the
Codex agent only; its body said other agents still didn't see them.
Fix, at the one point every agent's list starts from: catalogOf(agent)
keeps a signed-in subscription's own models (SubscriptionKept: no group
entry, Provider.Account set, the provider not kept for routing groups)
for every agent, so a group is added on top of what agents had. A client
that is no agent ("" on /v1/models) still gets the group alone, as #1783
asked. Provider.Unlisted ("Only through routing groups") still hides the
provider's models from agents other than Codex. Unlisted() no longer names
a kept subscription model, so the picker's note doesn't call it kept for
groups.
Siblings: every agent writer reaches catalogOf through CatalogFor and
ListedFor. Two gateway lookups read Catalog() directly and now use the
agent's catalog (CatalogOf): /v1/models/{id} and Claude Desktop/Science's
alias lookup. agent.go and codex.go read Catalog() only for error text or
a fallback and are left alone. The routing plugin's hint for that option
says, in every language, that a signed-in subscription's models stay in
agents' lists.
Test: TestSubscriptionModelsStayInEveryAgentsListWithGroupOn signs in a
ChatGPT account in a sandbox and switches on a group naming its 5 models
that lists itself alone. For every agent that lists the group (68,
including hermes, workbuddy, claude and codex), the agent's list and
CatalogFor have the models, and a picker offering the group offers them.
Catalog() and CatalogFor("") still don't. With the provider set to
Unlisted, Hermes doesn't list them. TestCodexOwnModelsListedOnlyThroughGroups
now expects Claude Code to keep the models under a group alone.
Run (on mote):
- Broken by hand: catalogOf reverted to a3ee00c05's Codex-only version.
The new test went red with 340 errors across 68 agents, e.g.
"codex/gpt-5.5 not in hermes's list map[group/mygpt:true]", and the
same for workbuddy, claude and claude-desktop. Green with the fix back.
- gofmt -l; go vet on darwin, linux (nogui) and windows; builds: clean.
- go test -timeout 45m ./... at 035d87b80 (this change on 4a4a90c23,
before a test comment was reworded): every package ok except
- internal/gui TestMainWindowCorners/macOS_26_SDK: #3949, red on
origin/main accb951ab on mote too (macOS 27);
- internal/provider TestClaudeAccountServesModelsListedSinceItsFetch:
#3174 (red in a full run, green alone). 5 of 5 green alone and
green in a whole internal/provider run at that head.
- At this commit on b26fa0903: gofmt -l on the
changed Go files, go vet of provider, gateway and gui on darwin, linux
(nogui) and windows: clean. internal/provider whole: ok.
internal/gui and internal/gateway with -run
"Codex|Group|Subscription|Unlist|Catalog|AgentModel": gui ok; gateway
red on TestAntigravityTurnsCodexsGPT5ThreadAwayOnce and
TestCodexSpentGrokFailingIsTold, both red the same way on origin/main
b26fa0903 (3 of 3) and filed as #4362.
- GUI files the change reaches, on b26fa0903: agent-model*, group-unlists and
i18n-keys: every Chromium case and i18n-keys pass (46); every WebKit
case timed out launching the browser (180s, #4125: WebKit doesn't start
on mote right now). The same files at 035d87b80 passed in both engines
but i18n-keys, whose one red (the new test quoted a routing-plugin
word) is fixed here.
- Rebased on 101775657 (main had moved models.go and gateway.go): gofmt,
go build for darwin, linux (nogui) and windows, go vet of provider,
gateway and gui on all three: clean. go test -run
"Codex|Group|Subscription|Unlist|Catalog|AgentModel" ./internal/gui
./internal/provider and -run "Model|Desktop|Alias|Catalog"
./internal/gateway: ok.
- The whole GUI suite (1004 files) at fd50ed116 was still running when
this was pushed (mote shared with other sessions' suites). Reds it
shows get their own issue unless already red on main.
Not tried: no live ChatGPT account and no real GUI app run (the test signs
in a sandbox account). No separate gateway test for /v1/models/{id} or the
Desktop alias lookup. Provider.Unlisted stays honoured, on purpose.
With a key out of credit now resting up to a week, "back at 04:10 PM"
would read as today. A key's rest note that ends on another day says its
date in the GUI's language ("back at Nov 1 12:00 PM"); one that ends today
says the time alone, as before (restBack in app.js).
Run (mote-run): node --test internal/gui/tests/key-rest-date.test.cjs,
Chromium and WebKit, en/zh/zh-TW/ja/de, 1100px and 420px: 20 of 20 pass,
no sideways scroll, no page errors. go test ./internal/gui (TestCoreScript
Budget among them): internal/gateway red only on TestAntigravityTurnsCodexsGPT5ThreadAwayOnce,
TestAntigravityTurnedAwayIsForeseen, ...LastIsNoQuota, ...InsideTheReplyLast
and TestCodexSpentGrokFailingIsTold, each red the same on origin/main
d31710c71 (#4362), and TestBurstTellsNoSpeed under load (#2719);
internal/gui red only on the real-window AppKit tests killed at their
20-40s deadline under mote's load (TestDockJoinLeadsCommandTab,
TestPanelCloseHidesIt, TestMainWindowCorners, TestCoveredWindowStaysUp,
TestTrayCellClickReleasedPanel and others: #2645, #4125, #1936, #3178);
the same five red at origin/main d31710c71 alone; TestBurstTellsNoSpeed
passed alone on both; TestCoreScriptBudget passed.
Broken by hand: restBack reverted to hhmm: red, "Resting · 402 out of
credit · back at 12:00 PM" doesn't say Nov 1 (zh too).
At the rebase on 764a032f6: Chromium 10 of 10 and i18n-keys 4 of 4
pass; every WebKit case timed out, and so does a bare webkit.launch()
on mote right now (pboard gone, #4125), so WebKit wasn't seen at the
pushed head.
Not tried: the whole GUI suite; it is still to come with the full Go
suite, and any red it shows gets an issue. Not looked at in the real app.
PaulT on Discord #feedback: an OpenAI API-key provider answering 402 out
of credit showed "Resting · 402 out of credit · back at 04:10 PM" and was
asked again every 30 minutes, refused the same each time. 1534474c8 gave
ChatGPT accounts a rest until their credits are back; keys still had the
flat 30-minute creditRest.
An API key (Account == nil) whose vendor says it is out of money now
climbs creditLadder: 30m, 2h, 8h, 24h, 3d, then 7d each time after.
Refused again while it still rests (the lone key, asked all the same)
keeps its rung; a rest that ended and is refused again goes a rung up.
"Try now" (Unrest) and an answer (servedCandidate) start it over at 30m.
It covers what failure() already calls failCredit: a bare 402, OpenAI's
insufficient_quota (its billing errors are 429s with type
insufficient_quota and codes credit_balance_exhausted,
organization_/project_spend_limit_exceeded,
organization_usage_limit_exceeded, per
developers.openai.com/api/docs/guides/error-codes), DeepSeek's
"Insufficient Balance" 402, Anthropic's "credit balance is too low" 400,
Zhipu's 余额不足 and WorkBuddy's exhausted 429.
What stays as before: a refusal that names when it is back (resets_at,
a reset header) rests till then, capped at longestMonthly. A 402 that can
pass soon or for a smaller request rests creditRest flat and never climbs:
one with Retry-After (OpenRouter's openrouter_in_flight_budget, per
openrouter.ai/docs/api-reference/errors), OpenRouter's "can only afford" /
"fewer max_tokens", and "try again in N" / "N 分钟后" (creditSoon).
Subscription accounts other than ChatGPT's keep 30m flat, and another
computer's magpie rests the model only, flat (TestCreditLadderIsKeysOnly).
Run (mote-run; first at this change on origin/main d31710c71):
- go test -count=1 -timeout 45m ./internal/gateway ./internal/gui: internal/gateway red only on TestAntigravityTurnsCodexsGPT5ThreadAwayOnce,
TestAntigravityTurnedAwayIsForeseen, ...LastIsNoQuota, ...InsideTheReplyLast
and TestCodexSpentGrokFailingIsTold, each red the same on origin/main
d31710c71 (#4362), and TestBurstTellsNoSpeed under load (#2719);
internal/gui red only on the real-window AppKit tests killed at their
20-40s deadline under mote's load (TestDockJoinLeadsCommandTab,
TestPanelCloseHidesIt, TestMainWindowCorners, TestCoveredWindowStaysUp,
TestTrayCellClickReleasedPanel and others: #2645, #4125, #1936, #3178);
the same five red at origin/main d31710c71 alone; TestBurstTellsNoSpeed
passed alone on both; TestCoreScriptBudget passed
- earlier, -run 'Credit|Rest|Quota|...' ./internal/gateway: red only on
TestAntigravityTurnedAwayLastIsNoQuota, red the same on origin/main
d31710c71, filed as #4362.
- rebased on 764a032f6 (c37b8b659's remote-magpie quota change among
it; the routing doc line conflicted and was merged by hand): go vet
./internal/gateway native, GOOS=linux, GOOS=windows ok; -run
'Credit|Rest|Quota|Remote|Magpie|Unrest|Codex|Spent|Broke|Balance|Afford'
./internal/gateway red only on #4362's tests. Then rebased again on
the 20 commits after it (46fb0c1b9) with no conflict; there go vet
./internal/gateway and the three new tests pass.
- gofmt -l clean; go vet ./internal/gateway native, GOOS=linux and
GOOS=windows.
- The full go test ./... is still to come: mote was running other
sessions' full suites. Any red it shows gets an issue.
Broken by hand, each red:
- the credit branch in restAfterMarked off: "refusal 2: rests 30m0s ...
want 2h0m0s".
- the rung climb after an ended rest (else if had) off: red.
- creditSoon off: OpenRouter's "can only afford" climbs ("failures 1 ...
want flat").
Not tried: PaulT's own 402 body (not known; the test holds OpenAI's
documented bodies and the vendors' bodies magpie's tests already had).
No real out-of-credit key was asked. A key's balance reading doesn't
lift its rest early; "Try now" does. The ladder is in memory, so a
restart of magpie starts it over at 30 minutes.
shuizhuyu asked for a global shortcut to switch accounts. v0.1.2143's
Quick panel shortcut opens the tray panel, but the panel had no account
switch: switchable() returned null there, because the panel reads no
provider list (a fresh /api/providers reads every sign-in, seconds after
a start, #1519).
Now a Claude Code or Codex not connected has an "account" line in its
opened panel row (switchEntry, the window's Switch accounts only menu).
The line is drawn from the list kept from the last read
(GET /api/providers?last=1, no keychain read; panelAccounts in app.js),
read fresh only when nothing is kept. Opening the menu does one fresh
read and opens on what it says. Manage accounts… and a lapsed pick open
the window's Providers (window/main?view=providers). The provider and
login actions now keep their answer as the last list (keepProviders), so
a switch made in the window or the panel is in the next kept read.
app.js stays under its budget with no raise: my own comments and two
older ones (the usage accounts note, the sidebar note) were cut down.
Run:
- GUI, Windows box (xiaomi-gpu, win-run), Chromium + WebKit: 31 files
(panel-*, panel-switch-accounts, agent-switch-accounts, switch-only,
claude-switch-only, keep-login, agent-failover, agent-row-disclose,
getting-started, click-scroll, i18n-keys, gui-zh-tw, gui-ja, gui-de):
503 of 503 pass. Not the whole GUI suite.
- mote: no browser could launch there (pboard down, #4125; every WebKit
and later Chromium launch timed out at 180s), so the GUI runs there
were cut short. agent-panel-name-width, red there in both engines, is
red on origin/main too (#4304, #4203), and this change doesn't draw
the closed rows it measures.
- mote: go vet ./internal/gui; go test -run 'TestKeptProvidersFollowActions|
TestLastKnownProviders|Budget|TestProvider' ./internal/gui ok (includes
TestCoreScriptBudget). gofmt -l clean. GOOS=windows go vet ./... ok.
GOOS=linux go vet ./... fails only in wails/v3 pkg/application (cgo
off when cross-compiling), the same on origin/main 32f5c3369 (#4406).
At the pushed head (rebased on origin/main 32f5c3369, whose switchEntry
now leaves setup-token logins out of the menu; kept): the Go run above
again ok, TestCoreScriptBudget at the new 1,536,586 included, app.js
1,314,856 of 1,315,316; on the Windows box, panel-switch-accounts,
agent-switch-accounts, switch-only, claude-switch-only, keep-login,
agent-failover, i18n-keys, panel-fold and panel-effort: 178 of 178.
Broken by hand:
- panel-switch-accounts on origin/main's assets: 12 of 12 red in
Chromium (no account line).
- Panel always reading fresh (laziness removed): 11 of 12 red.
- keepProviders removed from the provider action:
TestKeptProvidersFollowActions red.
Not tried: real Claude Code or Codex accounts; the real Wails panel
opened by the shortcut; the login/{action} keep has no test of its own.
treeMan on Discord: DeepSeek bills off-peak at half the peak rate, and the
Usage page didn't follow it. The catalog's list prices for these models
are already the off-peak ones: models.dev's DeepSeek, Command Code and
OpenCode Go entries give the off-peak rate as the price and a factor-2
multiplier for peak hours, and api.json leaves the multiplier out
(deepseek-flash: $0.15/$0.60/$0.003, DeepSeek's page says $0.30/$1.20/
$0.006 at peak). So every peak call was counted at half its cost. Now a
call made from 01:00 to 04:00 or 06:00 to 10:00 UTC, Monday to Friday,
costs twice the list price. The call's own timestamp decides.
Which providers (provider.PeakOf, by base URL, or by preset/id only for a
provider with no URL, such as a plugin's or a removed one):
- DeepSeek's API (api.deepseek.com), every model, except on Chinese
public holidays (catalog.PeakDeepSeek);
- Command Code (api.commandcode.ai, the commandcode preset and the
commandcode-plan plugin): deepseek-v4.1-flash, -v4.1-flash-fast,
-v4-flash, -v4-flash-vision-exp and -v4-pro, every weekday, since its
docs name no holiday. deepseek-v4-flash-fast is one price at every hour;
- OpenCode Go (opencode.ai/zen/go): deepseek-v4.1-flash and
deepseek-v4-pro, every weekday.
Unchanged: OpenCode Zen (a flat $0.30/$1.20), ZenMux, Cline Pass,
OrcaRouter and every other relay, a price the user set (ModelPrices
returns before a Peak is set), a "same as" price and every other model.
The provider's price rate still applies.
Holidays: catalog.cnHolidays has 2026 from the State Council's notice
(2025-11-04). TestCNHolidaysCoverThisYear fails on 2027-01-01 unless that
year's notice, due in November, is added. A year missing from the table
counts no holidays.
Where the hour is applied (catalog.Price.In): Record.CostAt (Usage's
totals and groups), the packed gateway blocks (priceBlock), OTLP's
exported cost and budget's estimate (now). The Sessions page sums per
model without per-call times and stays at the list price. The model
editor's price box says when a list price counts double (four languages;
app.js kept under its budget by shortening, not by a raise).
Run at the tree pushed (parent 32f5c3369), on mote:
- gofmt -l clean
- go vet on the six packages
- go test of catalog, usage and otlp whole, and provider and gui -run
Peak|PriceIn|CNHolidays|Price|TestCoreScriptBudget, with TZ=UTC and
with TZ=Asia/Shanghai: all ok
At 76b18f68d (the same change before the last two rebases), on mote:
- go vet ./internal/..., GOOS=linux -tags nogui and GOOS=windows vet of
./..., and the darwin, linux nogui and windows builds: ok
- catalog, provider, usage and otlp whole, in both zones: ok
- internal/gui: TestCoreScriptBudget was red (app.js 108 bytes over),
fixed by shortening the hint. Ten AppKit window tests were killed at
their 30s bar at load ~130 (TestDockJoinLeadsCommandTab,
TestMainWindowCorners and others); this change doesn't touch them.
GUI:
- model-price-edit (now checks both peak hints and none on a plain list
price), model-price-tiers, provider-price-rate and i18n-keys: Chromium
ok on mote.
- WebKit on mote couldn't launch at all (browserType.launch timed out at
180s, 69 WebKit processes from other runs), so the three price files ran
in WebKit on Linux (wsl-run): 8 of 8 ok.
- The whole GUI suite (both engines) at ff23724f3 was still running at
load 110 to 150 when this was pushed, 119 red of ~7200. Every file
checked so far is a timeout under load or in #4304 / #3476.
model-chip-steady is red the same way on origin/main 0911a65e7.
Broken by hand, each red:
- CostAt without .In(r.Time): TestCostAtTheCallsHour (0.753 at peak,
want 1.506)
- priceBlock without .In(p.Time): its block half
- Peak.At ignoring holidays: TestPeakHours on 2026-10-05
- priceOf never setting Peak: TestPriceOfPeak
- OpenCode Go's model list dropped: TestPeakOf (kimi-k3 "weekdays")
Not tried: a real call to DeepSeek, Command Code or OpenCode Go at peak
and off-peak to compare against their bills; a full go test ./...; the
holiday rule's handling of the swapped working weekends (DeepSeek says
Monday to Friday, so a worked Saturday stays off-peak here); ZenMux,
whose own docs give no schedule.
diskEntry wrote a chunk's Latest as c.Latest.UnixNano(). For a chunk
without calls Latest is the zero time, whose UnixNano is out of int64's
range and is written as another time; readDiskEntry read it back as a
call on 1969-12-31. heatSplit and effortSplit count a chunk with a zero
Latest as recent, but one read back so as settled, so the settled set
after a build (14426 chunks on the real history) differed from the one
after a read (15677). The key heat-v1.json and effort-v1.json were
written under on a new version's first start missed on its second, and
the whole history was paired again: two cold peaks, not one.
A zero Latest is now written as 0 and read back as the zero time.
Old data: requests-v1.bin is rewritten under the new binary (its key
holds requestDiskBinary()), so nothing old is read by the new reader.
Run:
- TestDiskEntryKeepsNoLatest round-trips a zero Latest and
time.Unix(1790000100,5). Red on the old reader ("Latest 0001-01-01
... read back as 1969-12-31 16:00:00 -0800 PST"), green with the fix.
- Real history on mote (sandbox HOME, copy of the owner's sessions and
requests): the first start wrote heat-v1.json and effort-v1.json, the
second and third didn't rewrite them (both hit), and the heatmap's
JSON had the same md5 on all three starts.
- Rebased onto 244d80e23; at the pushed tree on mote:
go test -count=1 ./internal/usage ok (53.3s), gofmt clean,
go vet -tags nogui ./internal/usage for windows ok (linux, darwin ok
before the rebase, which touched no file of this commit).
Not tried: a full ./... suite.
signin-close was red on Windows in every engine and language: its last
check, "nothing else was changed", counted the POST to
/api/window/titlebar that a Windows window makes to tint its title bar
to the page (6927bedfc). That changes nothing the test is about, so the
check now leaves it out, as it leaves /api/open.
Run at this tree on origin/main d80d75f30:
- xiaomi-gpu (win-run), signin-close, Chromium and WebKit: 2/2 each;
before this, 0/2 each with + 'POST /api/window/titlebar'.
- magpie-desktop (wsl-run), the same: 2/2 each, before and after.
No other GUI test filters its POSTs this way (grep startsWith("POST")).
8ebf9cbea (a Claude account from a setup-token, v0.1.2167) raised the
app.js budget 1,315,316 -> 1,317,705 and the core-script budget
1,537,034 -> 1,539,423. A raise bounds nothing (#2710), so this takes it
back. app.js's budget is 1,315,316 again. The core's had since been
lowered to 1,538,975 by 1bbaded62 (purposes.js, 448 bytes less); it is
lowered by the 2,389 the setup-token added, to 1,536,586.
The two sign-in sheets that ask one value before a sign-in starts move
out of app.js into signsheets.js: Claude's setup-token sheet and
Copilot's GHE.com host sheet. app.js imports the file only when one is
asked for (signAsk), the way it imports cfgblocked.js. A failed import
says why in the status line. app.js is now 1,314,384 bytes (budget
1,315,316), the core scripts 1,535,654 (budget 1,536,586). old-webkit's
"loaded by index.html" check exempts signsheets.js as it does
cfgblocked.js; its Safari 15 syntax checks still read the file.
Run on xiaomi-gpu (win-run), at the pushed head (this and the next
commit, signin-close's test fix) on origin/main 1bbaded62:
- go test -run TestCoreScriptBudget ./internal/gui: ok.
- node --test claude-setup-token, copilot-ghe, old-webkit, i18n-keys,
signin-close, Chromium and WebKit: 19/19 each. Both sheets open through
the lazy import, their text translated, the setup-token's refusal and
success, the GHE.com host's check.
- gofmt -l internal/gui: empty.
Broken by hand: signAsk without its import, claude-setup-token and
copilot-ghe (Chromium) 0/7.
Not run: the whole GUI suite and the full Go suite on mote, which is
running other sessions' suites at load 82; the full Go suite runs on
Linux after the push.
ferock (Discord) asked to see calls to magpie's MCP tools, such as
magpie-image's generate_image, generate_video and generation_result, in
Routing > Requests.
Each tools/call to magpie's own MCP servers (image, vision, web search,
tools and the Library hub) is now a row of the request log. The row has
Source and Kind "mcp", the tool as its model, the server as its host,
how long the call took, and its error if it failed. The provider and
model it shows are those of the model requests the call made, collected
through the request's context in appendUsage. generation_result names
the model of the job it answers. The stdio Magpie Image server reports
each call it answered to the gateway as "magpie/toolCalled". That report
carries the tool, ms, model and error, never the prompt.
The arguments are never stored at all, so there is nothing to mask. The
rows go down the probe lane: they are listed, but no total, host list,
budget or key limit counts them. The model requests a call made are rows
of their own.
In the GUI the row reuses the Requests list. It gets a muted "MCP" badge
with a tooltip, the server beside the provider, and a Succeeded/Failed
status. The Purpose filter gains "MCP tool" in every language. There is
no new page, no <select> and no left border.
The core scripts went over their budget with the new purpose.
genpurposes now writes purposes.js as compact JSON, which makes the core
448 bytes smaller than main in all, and coreScriptBudget is lowered to
the new total, 1,538,975. No room is added.
Run on mote, at the rebased head:
- gofmt -l: clean. go vet -tags nogui ./... with GOOS darwin, linux
and windows: ok.
- go test -tags nogui -timeout 45m: ./internal/usage, ./internal/imagemcp,
./internal/usageapi and ./internal/gui ok. internal/budget has no test
files. ./internal/gateway (805s): every test ok except five Antigravity
and Codex/Grok tests. They fail the same on a clean origin/main
3bebc3839 and are filed as #4362.
- GUI, the usage-ledger*, routing-request*, purpose*, i18n* and
gui-zh/ja/de files (25). On mote, Chromium: 32 of 32 ok; WebKit
could not launch (10 other sessions' suites on mote). On Linux
(wsl-run), both engines: 335 of 355 ok. The 20 reds are
routing-request-model, usage-ledger, -ttft, -chart and
-open-settled, which fail the same at the parent 1534474c8 (#4120).
usage-ledger-mcp, purpose-filter and i18n-keys are ok in both.
The whole GUI suite runs after the push, and each red it finds gets
an issue.
- At the pushed head, rebased on 0804f2d97: ./internal/gui (the
budget and purpose asset tests among them), ./internal/usage,
./internal/imagemcp and ./internal/usageapi ok, and ./internal/gateway
-run "MCP|Purpose|Probe" ok.
- usage-ledger-mcp.test.cjs covers 5 languages, widths 1180 and 420,
light and dark, with no sideways scroll.
Broken by hand. Each break went red:
- sawHost's MCP skip removed: TestMCPCallRowsListedNotCounted (the hosts
list had magpie-image).
- Row/Record.IsProbe's MCP case removed: the same test (3 calls counted),
and TestMCPCallCountsInNoKeyLimit (Calls: 1).
- The callMCPTool hook removed: TestMCPToolCallIsARequestRow and its
siblings (no rows).
- The appendUsage hook removed: the row had no provider or model.
- imagemcp's report removed: TestToolCallsAreReported.
- The gateway's magpie/toolCalled case removed:
TestMCPCalledFromStdioIsARow.
budget's in-memory counts() now skips these rows too. Breaking only that
stays green, because budget.Of reads the file through usage.Visit, which
already skips probes, and limits count tokens and cost.
Not tried:
- no real agent calling a real vendor's drawing;
- no test run on Windows or Linux;
- the page not checked in the real app or in WebKitGTK.
A generate call that answers while its drawing still runs has no model on
its row. The generation_result row that follows names it.
chenjiangzi asked for Tencent Cloud's WSA SearchPro (元宝搜索). It is added
as vendor "wsa", following Doubao Search (dca3e2d71), from Tencent's
own docs:
- API-key method (cloud.tencent.com/document/product/1806/130615):
POST https://api.wsa.cloud.tencent.com/SearchPro with
Authorization: Bearer <key> and a JSON body {"Query", "Cnt": 10}.
Keys come from console.cloud.tencent.com/wsapi/index (KeysURL).
- SearchPro (121811): Response.Pages is an array of JSON strings, each
with title, url, date, passage and content. The text is passage, or
content when passage is empty or only the title. Tags are stripped.
- Errors (121818/121820, 130615): HTTP 200 with Response.Error{Code,
Message}. AuthFailure*, UnauthorizedOperation and ResourceNotFound are
turned away (403); ResourceUnavailable (欠费), LimitExceeded and
ResourceInsufficient are out of credit (402); RequestLimitExceeded* is
rate limited (429); others are plain errors, with the key masked.
The fixtures in testdata are the docs' two example replies. 130615's is
shown with its quotes escaped twice, which isn't JSON; they were
unescaped once and nothing else changed. The GUI's picker is built from
SearchVendors, so no GUI file changes. README (en, zh), the CLI help and
gateway-routing.md name it.
Run on mote (mote-run), at the rebased head:
- go test -run 'SearchAPI|WSASearch|Volcengine|Search' ./internal/gateway/
./internal/gui/
./internal/provider/ ./internal/cli/: ok
- go vet -tags nogui darwin/linux/windows: ok; gofmt -l clean
- GUI (no GUI file changes; the picker reads SearchVendors):
search-api.test.cjs in Chromium 4/4 ok. Its WebKit cases and
searcher-pick timed out at browserType.launch (180s) on mote,
where ~57 WebKit pw_run launches from several sessions hang. Not
a result about this change; WebKit not run.
Broken by hand, each made TestWSASearchAPI red: the wsaSearchError call
removed, and Cnt dropped from the body.
Not tried: the real API. No WSA key was available, so the request,
reply and error mapping rest on Tencent's docs only. The full go test
./... is to follow.
chenjiangzi set Tavily's url to https://api.tavily.com/search, and magpie
appended /search again. Each vendor now names the paths magpie puts after
its base (SearchVendor.Paths). A url that already ends in one of them,
with or without a trailing slash and in any case, is cut back to its base.
This happens when it is saved (SetSearchAPI) and again when it is read
(SearchAPI.Base), so an entry saved before this change works too, and so
does Tavily's quota URL built on the same base. Every vendor is covered:
tavily, brave, exa, firecrawl, you (both paths), deepseek, volcengine,
searxng, and wsa in the next commit. A path of the user's own
(/my-search) is left alone. The url= help and gateway-routing.md say so.
Run on mote (mote-run), at the rebased head:
- go test -run 'SearchAPI|WSASearch|Volcengine|Search' ./internal/gateway/
./internal/gui/
./internal/provider/ ./internal/cli/: ok
- go vet -tags nogui for darwin, GOOS=linux and GOOS=windows on
provider, gateway, cli (and gui on darwin): ok; gofmt -l clean
- GUI (no GUI file changes; the picker reads SearchVendors):
search-api.test.cjs in Chromium 4/4 ok. Its WebKit cases and
searcher-pick timed out at browserType.launch (180s) on mote,
where ~57 WebKit pw_run launches from several sessions hang. Not
a result about this change; WebKit not run.
Broken by hand: ownBase returning the URL unchanged made
TestSearchAPIBaseURLWithItsPath red ("asked /relay/tavily/search/search,
want /relay/tavily/search").
Not tried: a real Tavily request; the full go test ./... (to follow).
3f91b98ea (dbydd) turned five internal/gateway tests red in the full
suite at 1534474c8:
- TestCodexSpentGrokFailingIsTold (every shape): the Codex account was
already resting out of its quota and asked only as the one back
soonest. spentAfter had already asked Grok again as the last that may
answer; lastSpent then replanned Grok another dozen times, and the
Routing page no longer showed Codex's 429 as the earlier one told.
lastSpent now holds only for a last member not already resting out of
its allowance (!spentAfter([]candidate{c})).
- TestAntigravityTurnsCodexsGPT5ThreadAwayOnce, ...TurnedAwayIsForeseen,
...TurnedAwayLastIsNoQuota, ...TurnedAwayInsideTheReplyLast:
Antigravity's 429 to Codex's prompt reads as quota by failure() alone,
so the widened #1772 block rested that account, which isn't at fault.
The account case now needs it not turned away and its try not
failPrompt; a key's stays as it was.
Run (mote): the six families above plus the dbydd and PaulT tests, then
go test -count=1 -timeout 45m ./internal/gateway: ok (686s).
Broken by hand: lastSpent forced false -> TestGroupRelayBlipDoesNotEnd
OnSpentLast red; the #1772 block back to keys only ->
TestGroupSpentLastAccountRests red ("Codex asked 2 times").
The full suite at 1534474c8 had other reds, none in code touched here:
internal/gui's real-window AppKit tests (killed at their deadlines; the
same three chosen ones fail on origin/main f2c6831a3; #2645, #4125,
#1936, #3178), and TempDir-cleanup reds in TestLibraryMCPHub (#4140),
TestRelaunchOpenTriedAgain (#3881) and TestRequestChunksFromDisk
(filed #4390); all three pass alone at both heads.
Not tried: a full ./... again after this change (gateway alone was run).
sfss5362 on X asked "支持 CLAUDE_CODE_OAUTH_TOKEN 吗". It didn't work
before: cleanClaudeEnv strips the variable everywhere, and the import
flow needs a refresh token and an email.
A Claude account can now be added from the token `claude setup-token`
prints. In the window: the sign-in's "Use a setup-token instead…" and
the accounts list's "Add an account by setup-token…", which post to
POST /api/signin/claude-token.
The token is kept in logins.json as {"setupToken":…}. The real Claude
Code gets it in CLAUDE_CODE_OAUTH_TOKEN, and only for runs in that
account's own config directory (inClaudeDir via
provider.ClaudeDirToken). It never goes on the command line or into a
log. magpie never asks Anthropic anything with it. The bridge, the
sdk-cli entrypoint and the weighting are unchanged.
What such a token can't do: it has the inference scope only.
- Claude Code's `auth status` gives no email or plan. The account is
named "Claude setup-token <6 hex of its hash>".
- Its /usage prints the API cost view. /usage is never run for it, so
its allowance is unknown (errClaudeSetupToken, which `passing` keeps
as saying nothing about the account), not zero. Windows heard on
real replies still fill it in.
- Its config directory holds no .credentials.json, so Claude Code has
no sign-in to fall back to if the token is refused.
- Claude Code itself is never signed in to it. addLogin, switchLogin,
putClaudeLogin, SetKeepLoginAs, NextLogin and signInToFirst all pass
it over. Its row shows Remove and "magpie only", and the switch menu
leaves it out.
New strings are in zh, zh-TW, ja and de. Docs: providers-accounts.md
and claude-subscription-bridge.md.
Run:
- mote: gofmt -l (clean); go vet ./internal/...; GOOS=linux go vet
-tags nogui and GOOS=windows go vet of provider, gateway and gui; go
build ./...
- mote: go test of provider and gateway, -run on SetupToken, Claude
usage, warm-up, saved, account, logins, switch and keep-login: ok.
- New tests, with a fake claude binary in a sandbox HOME:
- TestClaudeSetupTokenAccount, TestClaudeSetupTokenSignsClaudeCodeInToNothing,
TestClaudeSetupTokenAllowanceUnknown and TestCheckClaudeSetupToken
in provider;
- TestClaudeSetupTokenReachesItsOwnRunsOnly in gateway: the token
reaches only its account's run, not "" or another dir, even with
the shell's CLAUDE_CODE_OAUTH_TOKEN=leaked, and never in args;
- claude-setup-token.test.cjs: Chromium on mote and WebKit on
xiaomi-gpu, each in en, zh, zh-TW, ja and de.
- GUI files the change reaches (signin-link, signin-web-blocked,
signin-closes-sheet, revoked-signin-account, account-eye,
account-row-line, i18n-keys and the new one): 73/73 on xiaomi-gpu
Chromium.
- On mote, 33 account, sign-in and i18n files had 96 reds. mote was
overloaded by another session's full GUI suite. Six of those files
fail 58 of 64 the same way at origin/main dafe4af82 there, and pass
on xiaomi-gpu. WebKit on mote timed out on the untouched
copilot-ghe.test.cjs too.
Size: app.js was 2,885 bytes over its budget after the rebase. The
new comments were cut, and the budgets were raised to the measured sizes
(app.js 1,317,705, core 1,539,423) with no room added, as
core_budget_test.go says. After the rebase onto origin/main 969868ccd,
these were run on mote at this head: TestCoreScriptBudget and the
SetupToken tests ok, and claude-setup-token plus i18n-keys in Chromium
9/9.
Broken by hand (each went red):
- without the token line in inClaudeDir, the gateway test;
- with addLogin allowed to sign Claude Code in, two provider tests;
- with /usage run for a token account, AllowanceUnknown ("told no
allowance").
- With switchLogin's guard removed, the tests stay green, because
putClaudeLogin still refuses.
Not tried: a real setup-token against Anthropic. The full Go and GUI
suites will be run after the push.
CyberCaius pasted
https://github.com/volcengine/mcp-server#subdirectory=server/mcp_server_askecho_search_infinity
(Volcengine's askecho web search) into the Library's MCP search. The
fragment was dropped, the MCP Registry was asked for "mcp-server" and
"volcengine", nothing it lists is there, so the page offered only a
blank command named "server".
A GitHub address naming a folder (#subdirectory=, /tree/<ref>/…,
/blob/<ref>/…/file) is now read before the registry: the folder's
pyproject.toml names the program ([project.scripts]) and its README's
"env": {…} examples the keys. It is offered as a normal market card:
uvx --from git+https://github.com/o/r[@ref]#subdirectory=<path> <program>,
with the keys asked for in the install sheet. Of several keys none is
required (askecho takes an API key, or an access key and secret); one
alone is. A bare repository is read that way only when the registry
has nothing at it. A pypi.org/project/ page, or a one-word search
naming mcp (with - _ or .) that the registry lists nothing by, asks
PyPI's JSON API and offers uvx <package> with its description's keys.
Claude Desktop is already wired for local Library servers
(claude_desktop_config.json); the test installs it there.
Run (mote):
- go test ./internal/library -run 'TestMarket|TestParseRepoAt|TestEnvInputs': ok
- go test ./internal/library rebased on ceef9e943 (AnySearch d05482bab in): ok; the push then rebased onto 70a0c387c (agent, cli only), not run again
- Full suite go test -timeout 45m ./... at d29414c1a (rebased only onto
origin/main since): 78 ok; reds in internal/gateway (Antigravity
turned-away x4, TestCodexSpentGrokFailingIsTold) and internal/gui
(AppKit real-window tests). Same reds on fresh origin/main ceef9e943,
filed as #4362, #2645, #4125, #1936, #3178, #3949.
- GOOS=linux/windows/darwin go vet ./internal/library: ok; gofmt clean.
- Broken by hand: MarketServers back on searchRegistryAt/searchRegistry,
TestMarketServerInRepoFolder, ...RepoFolderPage and ...OnPyPI red.
- Real use: the search against live GitHub and PyPI returns the uvx
command and the three keys; the command itself, run with uvx and a
fake key, answered initialize and listed web_search.
- Fixtures are the real pyproject.toml, README.md and PyPI entry, in
testdata/askecho; tests reach no network.
Not tried: a real search with a real Volcengine key; Claude Desktop
launching it (Desktop needs uvx and git on its PATH, as for the
featured fetch/git/time servers); Node servers in a folder (still the
blank form); a word search like "askecho" (no index has it). No GUI
change.
After the heatmap's settled days were kept (heat-v1.json, fixed in the
commit before), the cold start's largest part was codexEffortOfIndex:
a pairing of the whole history, every gateway call with its session
row, for the effort column, ~90 MB of a ~310 MB heap at 18 s on the
real history bench.
effortSplit does for it what heatSplit does for the heatmap: the effort
of rows before cut (local midnight two days back) comes from memory
while the settled chunks' serials match (10 min), else from
effort-v1.json under a key built by heatSettledKey (the settled chunks,
the recent chunks' rows before cut, the identities, the code, root and
meta); only the chunks since edge are paired again. When neither
stands, the full pairing is used as before and the part before cut is
kept. Old data: no file yet means one full pairing, as today, then the
file. A write that fails only means the next start pairs again.
Real history (mote ~/r2278/full, heap at 18 s, three starts of this
build): CodexModelEffort 14 MB, effortSplit 3.6 MB on the third start
(v0.1.2156: 91 MB); /api/usage/heatmap at 40 s byte-identical to
v0.1.2156's (md5 7e458920...) on all three. The first two starts of a
new binary write the files (the settled chunks differ once between a
fresh build and requests-v1.bin's read), the third reads them.
TestCodexEffortSettledFromDisk: a restart pairs fewer chunks with the
same sums; a changed settled file pairs all with the changed input; a
cold run without the file equals it. Red with effortDiskRead disabled
by hand ("started again, paired 6 of 6").
Run at this tree, on d05482bab + the commit before (mote): go test
-count=1 ./internal/usage ok (86.1s); rebased onto 70a0c387c (an agent
change) and ran again: ok (16.8s); gofmt -l clean; go vet -tags
nogui ./internal/usage ./internal/gui for linux, windows, darwin ok.
Not done here: queryPageOf, the warm-up's QueryPage(All) page 0, is now
the largest part (111 to 227 MB at 18 s), a full pairing for 50 rows.
Pi set up by hand on a provider of its own named magpie (magpie/<model>
at the gateway) read as connected in magpie: every catalog change wrote
magpie's list over that provider, RenameProvider rewrote its refs, Drift
offered Reconnect, and Disconnect took the provider out.
0911a65e7 (yyddbds, MiMo) already holds a ListOnly agent's sync until
it is Wired; that still let a hand-written config that names a magpie
model (JFunfunfun's Pi) read as Wired. Both gates now apply.
Its test's last case said a magpie model picked by hand on MiMo's own
magpie provider connects it; that is JFunfunfun's case, so it now
stays the user's until connected in magpie (listonly_test.go, and the
doc's ListOnly line says so).
An agent whose magpie is a provider of its own config (Spelled, not
Native) is now connected only when magpie set it up (setUp): a field in
applied.json, the new applied.Kept that Keep leaves instead of deleting
the record, or the <id>.connect.was stash Connect has written since
10-03. Otherwise (handWired) it isn't Wired, has no Drift, and
SyncCatalog, RenameProvider and renameRefs skip it; Disconnect is a
no-op as it is for any unwired agent. Connecting it in magpie takes it
on as before; Disconnect after that skips putting back "was" values
that were themselves magpie's (dsh errored on them). RenameLegacy
records the dial/ -> magpie/ values it writes, and moveEfforts (the
Cursor/Antigravity effort ids, at start-up) leaves a hand-written
magpie/<ref> alone. Aside keeps its own
key-based ownership. OpenCode's own-gateway-provider test now connects
through Apply as `magpie opencode` does.
Run (on mote, at this head, rebased on f2c6831a3): go test -tags nogui
-count=1 ./internal/agent ./internal/cli ./internal/library
./internal/gui; go vet darwin/linux/windows of internal/agent and
internal/cli; gofmt -l. internal/agent again after the ListOnly test
change: ok. Pushed on ceef9e943, whose five commits since touch usage,
sessions, library, provider movers and gui only.
New tests: TestPiHandWiredMagpieProviderIsTheirs (pi's literal
settings.json/models.json in a sandbox HOME, files byte-identical after
SyncCatalog, RenameProvider and Disconnect), TestPiConnectedBefore-
StaysConnected (applied record, gone model, connect.was, applied then
Keep), TestHandWiredMagpieProviderSiblings (29 Spelled agents). All fail
on the old code.
Tests that wrote a connected agent's files by hand (Pi, OpenCode,
Hermes, omp, dsh, the Kilo plugin, Cursor efforts, and the cli's
save-then-sync test) now also mark it as Connect leaves it
(setUpInMagpie, the connect.was stash); without it they read as
hand-written, which is what this change is about.
Broken by hand, each red: the Sync gate, the rename gates, the Drift
gate, Keep deleting the record, the was-skip in Disconnect, the
moveEfforts gate (TestMoveCursorEfforts' hand-wired case).
Not tried: a real pi binary against the gateway. Users connected
between 09-23 and 10-03 who pressed Keep (record deleted before this)
read as not connected; one Connect brings them back and pi keeps
working meanwhile. Agents without Spelled (Claude Code, Codex, Gemini
and others) decide by their own checks and are unchanged.
8d4c07ffe (v0.1.2156) named the heatmap's settled days with %#v of the
Filter, and the page's filter carries Zone, a *time.Location: %#v
writes its address, another in each run. So heat-v1.json never matched
on a start and every start paired the whole history for the heatmap
again, the cost 8d4c07ffe was to take away. Its bench start matched by
chance.
The zone is now written by its name, the rest of the filter as before.
Found with a key-parts log on mote (~/r2278/full): two starts of one
binary wrote headers differing only in Zone:(*time.Location)(0x1089b81e0)
vs (0x105d8c1e0). After the fix three starts of a build with it: the
first (new binary) and second wrote heat-v1.json, the third read it,
and its heap at 18 s has no heatSplit (was 83 to 95 MB in each start
before).
TestHeatSettledKeyNamesTheZone: two FixedZone("Z", 3600) give one key,
nil or another zone a different one. Red at 8d4c07ffe's heat_disk.go
("one zone, two keys"), green here.
Run at this tree, cherry-picked onto d05482bab (mote; first
run on c28cc5c87 the same): go test -count=1 ./internal/usage ok (16.4s); gofmt -l clean; go vet -tags
nogui ./internal/usage for linux, windows, darwin ok.
lileo asked for the AnySearch MCP. From AnySearch's own repo
(github.com/anysearch-ai/anysearch-mcp-server, README): remote Streamable
HTTP at https://api.anysearch.com/mcp; the key is optional (anonymous use
has a lower rate limit), sent as Authorization: Bearer as_sk_..., and made
at anysearch.com/console/api-keys. Like Exa, a remote entry with an
optional secret header; the icon is the anysearch-ai GitHub account and
the docs link the repo. Its examples also send X-Anysearch-Client;
tools/list answers without it, so it isn't added.
Probed by hand from mote (not in a test): initialize 200, serverInfo
anysearch-mcp-server 1.0.0, protocol 2025-06-18; tools/list gives
batch_search, extract, get_sub_domains, score, search.
Run at this commit after the last rebase (on e8d42c02d): go test
./internal/sessions ./internal/library ok; go vet darwin, linux -tags
nogui, windows over ./internal/... VET-OK; i18n-keys ok (mote).
Run at 7ec95b5dd (the same two commits on 1534474c8):
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows
(mote): VET-OK.
- Full go test -tags nogui ./... -timeout 45m on the Linux box (wsl-run):
internal/library ok. Reds only where origin/main eadeb89c4 is red on the
same box, each filed: internal/agent (#4033, #3548), internal/gateway
(#4362); internal/cli's two field-name tests red in the full run and ok
alone here (#4247).
- GUI files this reaches: i18n-keys and gui-de/ja/zh-tw ok on mote,
both engines; library-* ok in the WSL full GUI run at this tip (on mote
they timed out launching browsers at load ~140, not on an assertion).
market-*, sessions-* and usage-* hadn't finished on mote when pushed.
- The whole GUI suite has not finished (WSL run about half way when
pushed; its reds so far are in files this doesn't reach). It will be
finished and each red filed on its own.
Before the rebase: go test ./internal/library and the internal/gui
Market/I18n tests on mote, ok.
Broken by hand: format "{}" in place of "Bearer {}" turns
TestAnySearchKeyIsOptional red.
Not tried: a search with a real AnySearch key, or the entry added from
the GUI and called by a real agent.
CyberCaius on Discord: Usage's Claude Code filter listed Claude Desktop's
sessions. Desktop's Code tab runs Claude Code, which keeps the session in
~/.claude/projects like a terminal one; only each line's `entrypoint`
(claude-desktop, claude-desktop-3p) tells them apart. The calls were
counted under Desktop already (desktopEntrypoint), but the session, its
stats rows and its summary were Claude Code's, and the gateway's own
record of the session ("claude-desktop|<id>") wasn't matched with it, so
it could be listed twice.
The parse now keeps the entrypoint (state.Entry, on both the ccWhere fast
path and the full parse; cacheVersion 29) and a Code tab session gets
Session.App "claude-desktop". Its Agent, key claude:<id>, resume and
transcript stay Claude Code's. Stats rows and the summary use the app,
GatewayKeys and MergeExternal know the claude-desktop|<id> pair, the GUI
names it Claude Desktop, and Usage › Sessions filters by app || agent.
Run at the pushed tip (the AnySearch commit after this one, on
e8d42c02d): go test ./internal/sessions ./internal/library ok (mote);
go vet darwin, linux -tags nogui, windows over ./internal/... VET-OK;
i18n-keys ok; usage-sessions-desktop-app.test.cjs (new) 4/4 chromium +
webkit, en + zh, on the Linux box (on mote its webkit.launch timed out at
load ~40, before any page code).
This commit alone, before the last rebase (8bd8f50d5 on 1534474c8):
go test ./internal/sessions ok and the new GUI test 4/4 (mote).
Run at 7ec95b5dd (both commits on 1534474c8):
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows
(mote): VET-OK.
- Full go test -tags nogui ./... -timeout 45m on the Linux box (wsl-run).
Red only where origin/main eadeb89c4 is red on the same box, each filed:
internal/agent install detection (#4033, #3548), internal/gateway
Antigravity turned-away and TestCodexSpentGrokFailingIsTold (#4362);
internal/cli TestAgentFieldNameShowsIt and
TestEveryAgentFieldNameWritesNothing red in the full run, ok alone at
this tip (#4247).
- GUI: i18n-keys and gui-de/ja/zh-tw ok on mote; the other sessions-*
and usage-* files hadn't finished on mote when pushed.
- The whole GUI suite has not finished: a WSL run at the tip was about
half way (2226 ok) when this was pushed, with reds only in files these
changes don't reach (routing key models, panel name width, LAN
addresses, Codex composer, Copilot GHE, gateway key limits, ...);
they'll be checked against origin/main and filed on their own.
Earlier, before the rebase (da5f1e5bd on ffa07395e): full go test
-tags nogui ./... on mote, 80 packages ok.
Broken by hand, each red: stats not using appsOf (usage agent stays
claude); the Entry in claudeFull; the Entry in ccWhere (the test's first
line is an attachment so the fast path is taken); MergeExternal without
the App pair (3 sessions become 4); page.js's byAgent on agent only (GUI
test times out).
Not tried: a real Code tab transcript (none on this machine; fixtures are
written from the field names only). A Code tab that sends the plain
magpie key through settings.json env would be recorded by the gateway as
claude, not looked at. NativeIDs for claude-desktop doesn't read Claude
Code's files yet: #4333.
workbuddy 0.2.2 (plugins #511, MYCF711) sends DeepSeek Harness's opener
as "You are an AI agent, powered by DeepSeek Harness.". That line passes
WorkBuddy's whole-line 11128 check and keeps the harness's name. Since
0.1.27 the plugin had put a neutral line in its place, which took the
name out.
Run: go test -timeout 45m ./internal/provider on mote, ok (168s).
0.2.2 is on registry.npmjs.org (dist-tags latest 0.2.2). The plugin was
reviewed at 4830b16: bun test 257/257 on mote, and with the old
rewording put back by hand the unflag tests went red. A live request to
workbuddy-ai/deepseek-v4.1-flash with the comma line came back 200.
Not tried: the China WorkBuddy site, because the review account's
sign-in answers 401 there.