Paseo (getpaseo/paseo) starts the same Claude Code, but builds its own model
list: first-party models plus settings.json's `model` and a few
ANTHROPIC_*_MODEL variables (providers/claude/models.ts). It never reads
Claude Code's modelPicker, where magpie writes every model, so the rest were
not selectable in Paseo. Paseo's own ~/.paseo/config.json takes
agents.providers.claude.additionalModels ([{id,label,description}], checked
against protocol/src/provider-config.ts) and passes each id to Claude Code as
written.
New agent "Paseo" (detected by ~/.paseo or PASEO_HOME): its switch writes the
models Claude Code's /model lists (same ids, [1m] marks, names; only the ones
picked for it) there, marked "via magpie" in the description; the user's own
entries and keys stay, off takes out only magpie's, a sync refreshes when on.
Claude Code must be connected to magpie as well.
Run (mote-run, sandbox HOME in tests): TestPaseoAdditionalModels,
TestStateListsPaseo, internal/agentenv, internal/gui full package ok;
internal/agent full run red only on TestPiGroupEntryKeepsItsMembers, which is
red the same on origin/main 12cd456f2 (passes alone; filed). gofmt clean,
vet darwin, windows and linux nogui on internal/agent. Broken by hand: Set
writing no models goes red.
Not tried: a real Paseo daemon reading the file (checked against its schema
source only); GUI browser suites.
park() marks a streamed call with the conversation it answered while its
callLine.uuid is still empty. branch()'s no-call path only took lines with a
uuid, so it skipped the call and logged "no run waits on a reply to this
conversation". Claude Code can write the call's transcript line late, after
the tool has run, so waiting for the uuid never helps.
branch() now also takes pending lines with no uuid whose conversation
matches, records their tool-call ids in savedSession.cutCalls, and
cutSessionBeforeCalls cuts the session before the first assistant line
holding one of them. It asks again until cutWait; if the line never appears
the session as it stands on disk is already the conversation before the call.
A line whose uuid is known still wins. The match is still on the conversation
before the reply and on the run's own account.
Run (through mote-run): go vet for darwin, windows and linux; gofmt -l clean;
go test -count=1 -timeout 45m ./internal/gateway: one red,
TestKeyLimitReservationsStayInTheirWindow total/tokens and total/cost, which
is red at base 7a606eecd without this change and is #6165.
TestClaudeBranchForSummaryBeforeTheCallLineIsRead covers a parked call with
no uuid, a call line written 60ms into the cut, and a line that never comes.
Broke it by hand (len(unread) ignored): red with recih's message.
Not tried: a real TUI run. Other code that needs a uuid (noteLines, cutSessionAt)
was read: they guard lines noted from Claude Code's output and are not
reached by this path.
josephBenchap asked to create a skill in the Library; it could only
install or bring one in. Skills now has a New skill button beside Find
skills. A dialog takes a name, a description and the agents (the app's
chips, no select); Create writes skills/<name>/SKILL.md in the library's
folder with name and description front matter (YAML-marshalled, one line,
at most 1024 characters), lists it with no source, gives it to the agents
picked like any imported skill, and opens it in the reader, whose path
link opens the file in the user's editor. The name is checkName's, and
refused when the library or an agent already has one by that name
(compared without case) or a folder is in the way. The follow-the-server
note already sits above the Skills tab, so it covers this too. en, zh,
zh-TW, ja, de. docs/subsystems/library.md says so.
Run on mote at this head:
- gofmt -l clean; go vet ./internal/library ./internal/gui on darwin,
GOOS=linux -tags nogui and GOOS=windows: ok.
- go test ./internal/library ./internal/gui: ok. TestCreateSkill is new.
- GUI node --test in chromium and webkit: library-new-skill (new; en and
zh, 1100 and 420px: refusal stays in the dialog, agent untick posted,
reader opens, no select, no sideways scroll), library-items,
library-follow-server, library-all, library-discover-jump,
library-groups, library-intro-width, library-linked-set,
library-pick-remove, library-row-open-scroll, library-ime-scroll,
library-desktop-skills, library-gone-agents, library-bar-more,
library-chip-fan, i18n-keys, i18n-en-no-cjk, gui-de, gui-ja, gui-zh-tw:
all pass.
- library-loading is red (2 of 6) on this tree and on origin/main
e6fe481b3 alike: the tab list gained Claude plugins. Already #5997.
Broken by hand: the agents' own-skill name check removed:
TestCreateSkill red ("theirs" was taken).
Not tried: the real app; Windows run of the tests (vet only); the full
suite starts after the tag.
0.1.3688 on Windows 11: after a restart by a script, "timed out after 1m0s
waiting for the WebView2 controller" and the window never came back. Wails
waits 60s in Embed for a controller, then exits the process (ErrorHandler
runs, then os.Exit). The cause is a start that meets the previous magpie's
msedgewebview2 still holding the profile folder (EBWebView\lockfile, opened
without sharing).
- Before the first window, the start waits (30s at most) until the profile
folder's lockfile can be opened, i.e. the old WebView2 has let go. The
folder is the one passed to Wails, else Wails' %AppData%\<exe name>.
- ErrorHandler now logs the error with the WebView2 runtime version, the
folder and whether another process holds it.
- On a WebView2 failure the process starts itself again (update.Respawn,
MAGPIE_REPLACES set so the new one waits for this one to exit), backing
off 2s, 4s; after 3 starts a box says what failed and what to do.
Run: gofmt; go vet darwin, GOOS=windows, GOOS=linux with and without
nogui; go test of the WebView2 tests on mote; the same on xiaomi-gpu via
win-run, where TestWebView2FreeSeesTheHeldLockfile holds a real
non-shared file and goes red when webView2Free is forced true (broken by
hand). Full gui/update/proc packages on mote.
Not tried: a real WebView2 timeout and the restart (the controller
timeout can't be forced here without the live app); Wails still exits
the process after the handler, so the tray does not stay up through a
failed start, it is started again instead.
Go's docs (opencode.ai/docs/console/go, Endpoints) give one URL per API
under /inference/go: /openai/v1, /anthropic, /google/v1beta. The preset
and the filled-in defaults still used /zen/go and Gemini's
/inference/go/v1.
The preset now gives the three; a preset provider saved with the older
URLs is moved on load; openCodeRoot reads the per-API forms; a Go URL in
the per-API form gets its siblings in that form. A URL the user gave stays.
Run (mote): go test -run 'OpenCode|Preset|PlanQuota|Balance|Go|Gemini'
./internal/provider ./internal/gateway ok; vet darwin/linux/windows ok.
Broken by hand: old opencode_endpoints.go/presets.go with the new
TestOpenCodeEndpointsFilledIn goes red on 6 cases.
Not tried: a real Go key (none here); old /zen/go routes still answer
(400 MissingSessionID unauthenticated), so URLs the user set keep working.
Full suite and GUI files not run before the tag.
With only relay/strata/model enabled on a Remote, the cards of relay/kiro and
relay/codex still passed, since remoteCardWanted compared the first part of
the card's id alone. A card is now wanted when its id is the provider path of
an enabled model (its id less the last part) or a parent of it, whole parts
only (relay/kir never matches relay/kiro). A model listed with no provider
still leaves it unknown, so all shown. cardWantedFor holds the rule.
Run (mote): TestRemoteCardWantedByWholePath (two levels, three levels,
non-boundary prefixes, several models, one level, no provider) is red with
the first-part rule put back by hand, green with the fix; -run Remote in
internal/provider ok; go vet darwin/linux/windows ok; gofmt clean. Full
internal/provider: TestQuotaSpanCarriesEveryWindowField and
TestKeptQuotaReportAsksNobody are red, and red the same on origin/main
bbfa8501f without this change (open issues 4457/4190 and 3487).
Siblings: remoteOf and ThroughSelf take one leading part on purpose (a
remote's own id), unchanged. Not tried: a real multi-level chain of magpies.
inlinePage wrote each script as "<script>" + body + "\n</script>" but hashed
body alone. A CSP hash covers the exact text between the tags, newline
included, so the browser blocked every inlined script (the bridge too) and a
plugin page opened in magpie web was blank. The hash is now taken from the
text that is written, in the one place that writes it. The siblings: no other
code hashes an inline script (grep sha256- in internal; the stylesheets go
under style-src 'unsafe-inline').
Run (mote): TestPluginPageWebComesAsOneDocument now hashes every served
<script> body and looks each up in the policy; red on the old pageinline.go
(all three scripts, the bridge included), green on the fix. internal/gui
package, vet on darwin, windows and linux nogui. New GUI file
plugin-page-csp-hash.test.cjs (chromium and webkit: hash of served bytes runs
with no securitypolicyviolation; hash of the body alone is blocked), with
plugin-page, plugin-page-cookie-proxy: green.
Not tried: the full suite before the tag (started after it); a real browser
against the live Go server behind a proxy.
16ed1a952 added the route (the sidebar's drag order of plugin pages,
saved to settings.PluginPageOrder) without naming it in the route map, so
TestEveryRouteHasACommandOrIsNamed was red on main from then on. Its
siblings (agents, usage, providers arrange) are W already.
Run on mote at this tree: go test -tags nogui -count=1 ./internal/cli ok
(42s). Without the line: TestEveryRouteHasACommandOrIsNamed red,
"POST /api/plugin-pages/arrange has no command".
Four Sessions GUI files were red on origin/main da169135a, run alone on
mica (Playwright 1.62.0, both engines, every language they cover):
- sessions-gateway-delete (10 of 10) and sessions-manage (4 of 4) read
every .sm-note. e6f151507's speed note (sm-speed-note) is a second
one when no row has a speed, so the exact-notes and textContent
checks met two. They now read the notes other than the speed note.
- sessions-folder-delete (4 of 4) counted every POST as a delete call.
10c4dc109's in-use ping, POST /api/update/using on a click or key,
landed in "Cancel deletes nothing". It is left out of the count.
- sessions-export (4 of 8, en not-web, #5947): at 560px the head's tabs
give way to the agent menu, so the OpenCode tab is hidden. The test
now chooses OpenCode through whichever control is shown.
Test-only; no app code changes. Run: those four files on mica, 26 of 26
ok; at da169135a, 22 red.
Pi's Drift is asked on every /api/drift poll, about every 12s on
every page. Each poll wrote the entry of the model the agent is set
to. For a routing group, piModelJSON found all of the group's members
again (GroupFinder, membersFound, resolveIn) only to see whether one
speaks Anthropic's Messages API, for #5037's short promptCache. With
the real-account copy on mote, an alloc_space diff of 55s with the
Sessions page open showed 21.7MB allocated, 17.1MB of it under Drift
(5 polls, ~3.4MB each), 16.1MB of that in this look-up.
provider.GroupHasNative answers it through keptOf: kept across
requests while the files' stamp stays the same, a minute at most, as
the catalog's other kept builds are. Outside a request it is found
afresh, as before. The entry is the same.
Test: TestPiGroupEntryKeepsItsMembers. Over successive requests, a
group's entry allocates under half of one provider.FindGroup: 3,600
bytes against 71,040 for a 40-member group. With the old agents.go it
is red: 72,672 against 71,040. TestPiGroupPromptCache and
TestPiGroupThinkingIsWhatPiRuns pass.
The Sessions page asked /api/speeds once a second while open, whether
or not the gateway had heard any session. On a resting page the list
is empty, and each ask woke magpie through the whole web middleware
chain. On mote with the real-account copy, a 60s CPU profile with the
Sessions page open measured 0.50-0.56s, against 0.22-0.29s on Home. An
alloc_space diff over 55s showed /api/speeds allocating next to
nothing (21.7MB in all, 79% of it /api/drift). So the cost was the
62 wake-ups a minute, not their garbage. Old main de13afbf6 measures
the same 0.50/0.56s, so this is no regression; the page always
cost it.
While the last answer was empty, the page now skips four ticks before
asking again. A session that starts is kept by the gateway (its curve
is the last 120s), so its speed shows within 5s with its whole curve.
Once any session has a speed, the page asks every second again.
Opening the page asks at once.
Test: sessions-speed-rest.test.cjs (every language, Chromium and
WebKit). A resting page reads at most once in 3.5s, a session heard
shows within the rest, and then the page reads once a second. On the
old client.js it is red, 5 of 5 in Chromium ("read 3 times in 3.5s
with nothing heard").
ChatGPT's image generation has a quota apart from the 5-hour and weekly
windows. Neither /wham/usage (additional_rate_limits is null) nor the reply
headers (x-codex-primary-*, x-codex-secondary-*) tell it, so no remaining
count exists to show. Each Codex account's card (Usage page, magpie quota
--json, /v1/magpie/quotas, /v1/magpie/quotas/cards) now has an "Image
generation" row (provider.WithImageLane, Lane "images", Text and Aside so
routing, holds, history, tray and statusline never see it): "Used up" with
the reset time while the image model rests on that account after a refusal
(the #2244 drawing-lane rest, whose time is the refusal's resets_at), and
"Unknown" otherwise. Never a share or a count. Shown in en, zh, zh-TW, ja, de.
app.js: a Text row's display now goes through t(), a same-length change, as
the core script budget has 1 byte of room.
Run (on mote): go test -count=1 -run 'TestWithImageLane|TestCodexImageRow'
./internal/provider ./internal/gateway ok; codex-image-row.test.cjs in
chromium and webkit at 900 and 390px in all five languages ok;
TestCoreScriptBudget ok; go vet darwin, windows, linux nogui on provider and
gateway ok; gofmt clean; 158 GUI files matching i18n/quota/usage/balance
names in both engines (result in the follow-up).
Broken by hand: the GUI test is red with app.js's display line put back to
the old form; the Go row tests are red with imageRestOf returning false.
Not tried: a real ChatGPT account hitting its image quota (the row is
driven by a faked refusal's rest); the generated-image count the issue also
asks for is not built.
Claude Code's and Codex's sessions, and each call's tokens and time, need no provider: with the consent given, a sandbox HOME with no providers lists both agents' sessions and /api/usage/requests returns their calls (source log, ms, tokens). The only gate is sessions/reads asked=false, which the Sessions page asks but the Usage Overview and Requests pages did not mention; they said to point an agent at a catalog model. Now they say the files aren't read yet and offer one button that allows the agents found. The Sessions page says live output speed is measured only on gateway requests and where the files' own figures are.
With Settings > Sync > This computer set to Follows the server, a skill
or MCP server added in the Library is replaced by the next sync, and the
reporter read that as the update deleting their skills. The Library now
says it in one line above Instructions, MCP, Skills, Hooks, Subagents and
Plugins (Memory too while memory is synced), with a link that opens the
This computer row. Nothing is said when sync is off, the part isn't
synced, or the computer syncs both ways. en, zh, zh-TW, ja, de.
Run on mote: library-follow-server.test.cjs (new, 48 cases x en/zh, 1100
and 420px) in chromium and webkit; broken by hand (note not appended) it
goes 29 red. Also green in both engines: i18n-keys, i18n-en-no-cjk,
sync-follow-server, library-items, library-intro-width, library-hooks,
library-all (chromium).
Not tried: the full suite, the real app, a real sync server.
TestCoreScriptBudget counted every byte of the core scripts, so a change
that reached the cap was paid for by cutting comments that said why the
code is as it is (five times on 11-10 alone, and 40-odd "comments cut"
in the budget's own history). Main was red on it again from 16ed1a952:
1,534,484 at 8016205e3 against a cap of 1,533,802.
The test now counts code only: blank lines, lines that are only a //
comment and /* */ blocks that start a line aren't counted (codeBytes).
The caps are set once to that measure at 8016205e3: app.js 1,086,267
(1,080,614 plus the 5,653 of room it had), the core 1,263,333 with no
room. That takes in the 682 bytes the old measure was over; the step
over was features measured with their comments. From now on cutting a
comment pays for nothing; moving a page out still does. The ~20KB of
history in the constants' comments is replaced by a pointer to
`git log -L` of the file.
Run on mote (Go 1.26.8), at this tree on origin/main 8016205e3:
- go test -tags nogui -count=1 -run TestCoreScriptBudget ./internal/gui: ok
- broken by hand: 20KB of // and a 5KB /* */ block appended to app.js
stay ok; one 20-byte line of code on top fails "over their budget";
restored.
- go test -tags nogui -count=1 ./internal/gui (the whole package): ok, 83s.
- gofmt -l internal/gui: clean.
Not tried: the GUI suite (no script changed).
Zhangzhangi on X couldn't add a Remote magpie at a domain with a
self-signed certificate ("x509: "api.magpie.local" certificate is not
standards compliant") and asked for a skip-verification option. A
follow-up asked for the same on other self-signed hosts.
This adds a pin (trust on first use), not a blind skip. It is off by
default and kept per provider:
- Advanced → Server certificate → "Trust its certificate…" fetches the
certificate the server shows (provider/peekcert) and lists its SHA-256,
subject, issuer and expiry. "Trust this certificate" keeps the
fingerprint as the provider's serverPin.
- From then on only that certificate is accepted (netproxy pinTLS:
InsecureSkipVerify plus VerifyConnection comparing the leaf's DER
SHA-256). Another one fails with PinMismatchError, saying the server
showed a certificate other than the one trusted.
- The editor shows a red "Certificate not verified: only this one is
accepted" with the fingerprint, and "Verify it again" drops the pin.
- The pin is set only on the provider's own hosts (provider.PinHosts):
- every address of Remote magpie and of a provider added by URL;
- for a preset (Ollama, LM Studio, OpenAI at your own box), only https
addresses whose host is not one of the preset's or its regions' own
hosts. A vendor's host never takes a pin.
- Never for an account, Vertex or a subscription. Save refuses one
elsewhere.
- The client certificate and Server CA still go only to the providers
that took them before (TakesClientCert). A preset gets the pin alone.
- The editor's certificate rows (Client certificate and the new Server
certificate) are drawn by a lazily imported tlscerts.js. The Client
certificate row moved out of app.js with it, so the core scripts stay
under TestCoreScriptBudget without a raise.
Run (Go 1.26.8):
- WSL magpie-desktop, before the rebase:
- go test -tags nogui -count=1 ./internal/netproxy ./internal/provider
./internal/gui all ok;
- GOOS=darwin -tags nogui vet of gui fails on traywindows_darwin_test.go's
undefined trayImagePNG, the same at the base (a cgo-only helper).
- mote and mica, after the rebase on ab5824aee:
- gofmt -l clean; node --check app.js;
- go vet darwin (cgo), GOOS=linux -tags nogui, GOOS=windows: ok;
- go test ./internal/netproxy ./internal/provider: ok.
- mote, at the final tree: node --check app.js and tlscerts.js; go test
./internal/gui -run 'Budget|ServerPin|InsecureTLS|ClientCert|OnDemand|Lazy'
ok (TestCoreScriptBudget under 1,533,802) at the base ab5824aee.
Rebased on fe5a0cf6d, TestCoreScriptBudget is red, as it is on that
main alone: main's core is 1,534,708 (16ed1a952 took it to 1,535,318);
this change takes it to 1,534,484, 224 bytes less (#5918, commented).
The rest of the run above passes at the pushed head.
- mica, GUI files at the final tree, both engines inside each file:
- green: provider-server-pin (54), mtls-settings (16),
provider-insecure-tls (60), provider-socket (60), provider-http1 (60),
i18n-keys, i18n-en-no-cjk, editor-advanced-align, provider-advanced-fold
(50);
- old-webkit: headerpresets.js not loaded (#6030) and Safari 15's :has()
(#5919), both on main too;
- menu-scroll: 24 of 24 red on /api/update/using, the same alone at
origin/main fe5a0cf6d (#5982, commented).
- Earlier flakes of provider-http1 beside another session's suite:
#6159.
- Broken by hand, each red:
- presets never take a pin: TestServerPinSaveChecks,
TestServerPinPresetAtOwnServer, TestServerPinNoVendorHost;
- vendor hosts pinned (the own-host check dropped):
TestServerPinNoVendorHost;
- client cert and CA sent to presets: TestServerPinPresetAtOwnServer;
- the pin never compared: TestPinOnlyThatCertificate,
TestServerPinRemoteMagpie.
Restored: both packages ok.
Not tried:
- a real self-signed domain from the macOS app (httptest servers with
their own certificates only);
- the Responses WebSocket dial (read only: it takes the same netproxy
transport);
- go test ./internal/cli and the whole GUI suite before the tag (the
full Go suite runs after it, under suite.lock).
The morph gives each nav tab a view-transition-name of its own (app.css
.nav-morph), but the list stopped at the eight tabs that existed when it
landed; Routing groups and Masking came later and only faded with the whole
sidebar. Both are in the list now, in the nav's order (ggbdpq's analysis and
patch on #5434, which sat without a PR since 11-08).
side-toggle.test.cjs now holds the masking tab's group to animating and every
tab drawn in the nav to a name of its own, all different, so the next tab
can't be left out. Run on mote: red on the old CSS in chromium and webkit
(no nav-masking group), 26 of 26 green after. Durations and curve are the
morph's existing .32s strong ease-in-out, unchanged.
Not tried: the live app; Routing groups is display:none in the header
layout, so its group is a fade there, as before.
The day card's copy button showed "Cannot read properties of undefined
(reading 'write')" in magpie web opened over plain http (a LAN address) or in
a webview with no async Clipboard API: pageshare.js called
navigator.clipboard.write unguarded. It now tries the API when it exists,
else copies the picture as a selected <img> with the copy command, else
throws a message that says to save it instead (translated in zh, zh-TW, ja,
de). The desktop window was not affected: it already hands the PNG to
/api/plugin-pages/image. app.js's text copy already falls back (/api/copy,
writeText, execCommand), so no sibling is left on the raw API.
Run on mote: page-image-no-clipboard.test.cjs (new, chromium and webkit, en
and zh, navigator.clipboard removed), 4 of 4 red on the old pageshare.js and
green after; plugin-page.test.cjs and i18n-keys.test.cjs green.
go test ./internal/gui: only TestCoreScriptBudget red, on main already
(#5918); pageshare.js and i18n.js are not counted in it.
Not tried: a real http LAN page pasting the image into another app; the
execCommand path was observed selecting the PNG, not read back from the OS
clipboard.
Only the folder CLAUDE_CONFIG_DIR (else ~/.claude) names was found. Every
other ~/.claude… folder holding Claude Code's files (settings.json,
.credentials.json or projects/) is now claude#<name>, "Claude Code · <name>",
made by claudeIn at that folder (place.dir, as claude#launch is): connected,
model picked and checked in its own settings.json. With the variable
elsewhere, ~/.claude is claude#default. ~/.claude.json, another tool's
.claude-… folder and the launch file's folder are not rows. A folder
outside the home folder is not found (documented in agent-wiring.md).
Run at the pushed head's parent 16ed1a952 plus this change, on mote:
go test ./internal/agent (ok), ./internal/library (ok), ./internal/cli
(one red, TestEveryRouteHasACommandOrIsNamed on POST
/api/plugin-pages/arrange, not this change; #6162). gofmt clean; go vet
darwin, linux nogui and windows on internal/agent. Broken by hand:
dropping claudeDirAgents from onMachineAll turns
TestClaudeCodeInMoreThanOneFolder red.
Not tried: a real Claude Code against a second folder; GUI suite (no GUI
file changed); internal/gateway and internal/sessions were still running.
Codex's memories had a model of their own, its compaction did not. Codex's row has a compaction model square (compact_model, settings.CodexCompactModel), read by the gateway on each compaction (codexCompactTo, before codexCompact). Only a compaction magpie makes is moved: it asks for a plain-text summary any model reads back. One a ChatGPT account seals, or a pick that compacts natively, is left, since only the writing account reads it (#1099); a disabled, unserved or key-barred pick is left with a log line. The text sent to the model is unchanged.
Run on mote: TestCodexCompactOnItsOwnModel (red with the move taken out) and TestCodexCompactToLeavesNative; go test for gui, settings, settingsapi, agent, provider, gateway; darwin, linux and windows vet; the GUI files in both engines. Not tried: a real Codex session compacting on the chosen model.
startRun notes the entry on the request's context (noteEntry); serve copies it to Try.Entry and Try.EntryWhy (the claudePrint code). The Routing row shows a TUI or -p chip, with the reason in its title, in en/zh/zh-TW/ja/de. The bridge page also records the answer to Tossipe on X: a local Claude Code on a remote magpie sends its history each turn, and the remote resumes its session and types only the new turn, so the history isn't sent to Anthropic twice.
Run on mote: TestEntryNoted; routing-entry.test.cjs in both engines, five languages, 1000 and 480 wide; i18n-keys (a key repeating a Go string is reworded). Not tried: a real Claude Code run on each path.
The provider editor's 'Claude Code runs as' row was disabled in magpie web as a gateway, so it read as a switch that doesn't switch, while a second Settings row for the same claudePrintMode was the one that worked there. The editor's row is enabled everywhere (savePrefs works in gateway mode) and the duplicate row and its CSS are gone.
Run on mote: claude-tui-setting.test.cjs rewritten for the one row, app and gateway, en/zh/ja/de, 1100 and 420 wide, chromium and webkit; the claude-*, routing-*, i18n-*, agent-*, codex-*, mobile-web, provider-*, settings-*, dsh-* GUI files in both engines against a base copy (the same reds on both; proxy-auth and Hide accounts differ run to run). Not tried: the real app's Windows and Linux webviews.
The report asked for Kimi Code's monthly window on the card and as the basis
for choosing among keys. Both already ship: readKimiCode reads the month
(limit_month_total/limit_month_code, limits[] by length) since v0.1.2022,
and routing weighs a key by every window it reads (Allowance.Renewal ranks
biggest first, Pace takes the tightest budget window). No behaviour change;
this pins it with the reporter's case: synced 5h/7d, differing months.
Run: go test -run TestKimiMonthRanks ./internal/provider via mote-run, ok.
Not tried: breaking it by hand (test-only, no code changed); a real key.
Resting the pointer on Settings › About's 更新内容 row put the hint at the
far left of the row. 5710283da lined its text up with the row's name; the
pointer is what asked, so settingshints.js now keeps the pointer's x and a
card the pointer asked starts there (12px left of it, kept 16px inside the
window), with its grow-from origin at the pointer. A card a key asked
(focus) still lines up with the name. Every row hint comes through this one
module (Settings, a provider editor's fields, Routing groups), so they all
behave the same; native titles already show at the pointer.
Run on mote: provider-prefs-layout (card at the pointer; red on the old
code, 5 of 10), editor-hints, settings-hints (its pointer and key checks
changed), searcher-pick, settings-lines-wrap, sign-in-moves, and the gui-*
and i18n-* files, chromium and webkit; TestCoreScriptBudget; gofmt.
Reds: settings-hints "Settings' explanations show on hover and focus"
(chromium and webkit) fails the same way on base before reaching the
changed lines ("the card doesn't say the row's line"), and editor-hints in
webkit ("Tab didn't come back") fails on base too; both are filed.
Not tried: a live Mac window.
The Limit window menu gains "in total" (period "total", CLI: gateway-key limit <id> total). It counts from when it is set or last reset and ends a century off (access.Limit.Window), so only Reset usage starts it again; its 429 says it stays refused until reset or raised, the row reads "$0.00 / $300 · 总额" with no reset time, and a remote key's window is "Tokens/Spend in total" with no reset. Old settings files read the same (new period only). i18n in zh, zh-TW, ja, de; reference.md and gateway-routing.md say it.
Run: TestLimitTotal and TestTotalLimitNeverResetsByThePeriod, red on the old code (Valid refuses "total"); gateway-key-total.test.cjs red without the keys.js change (5 of 5). Not tried: a real key through a live gateway; full suite follows after the tag.
Run (before this push):
- gofmt -l clean; go vet darwin, linux (nogui), windows clean.
- go test: internal/access, internal/budget, internal/cli, internal/provider ok.
- Go tests for the total period are red on the old code (Valid refuses "total"); the GUI test is 0 of 5 languages passing without the keys.js change.
- gateway-key-total.test.cjs and i18n-keys: 9 pass in chromium and in webkit (zh, zh-TW, ja, de, en; 500px width; no native select).
- Full GUI suite on mica, chromium: 46 reds in files this change does not touch (accounts, Pi/OpenCode Go, panel sheet, check-in, Aside provider, API key theme, allowed addresses); none is a key-limit test. Webkit pass still running; reds are to be compared with origin/main and filed after.
- TestCoreScriptBudget is red on origin/main 2d12e8274 by 7 bytes (1,533,809 > 1,533,802); this change touches no counted core script (#5918).
Not tried: a real key through a live gateway; the full Go suite (started after the tag).
Resting the pointer on Settings › About's 更新内容 row put the hint at the
far left of the row. 5710283da lined its text up with the row's name; the
pointer is what asked, so settingshints.js now keeps the pointer's x and a
card the pointer asked starts there (12px left of it, kept 16px inside the
window), with its grow-from origin at the pointer. A card a key asked
(focus) still lines up with the name. Every row hint comes through this one
module (Settings, a provider editor's fields, Routing groups), so they all
behave the same; native titles already show at the pointer.
Run on mote: provider-prefs-layout (card at the pointer; red on the old
code, 5 of 10), editor-hints, settings-hints (its pointer and key checks
changed), searcher-pick, settings-lines-wrap, sign-in-moves, and the gui-*
and i18n-* files, chromium and webkit; TestCoreScriptBudget; gofmt.
Reds: settings-hints "Settings' explanations show on hover and focus"
(chromium and webkit) fails the same way on base before reaching the
changed lines ("the card doesn't say the row's line"), and editor-hints in
webkit ("Tab didn't come back") fails on base too; both are filed.
Not tried: a live Mac window.
ca8ff054d (times follow the system's clock) ran TestCoreScriptBudget under
its budget at its own base; rebased onto main it was 7 bytes over, because
main had grown meanwhile. No raise: the comment above resetClock is shorter.
Run on mote: TestCoreScriptBudget ok at the rebased head.
Anthropic words the refusal "Third-party apps now draw from extra usage,
not plan limits. Ask your workspace admin to add more" on Team and
Enterprise. thirdPartyWords only matched the Pro/Max "your extra usage",
so an interactive turn was neither redone as -p nor recorded in
refusedTUI, and the raw 400 reached the caller every turn.
thirdPartyIn matches both wordings; its three uses (refusedTUI,
thirdPartySaid, which feeds redoable and thirdPartyRefused's message
selection) all go through it. Docs updated.
Run on mote: TestClaudeTUIThirdPartyTeamWording (reporter's literal text:
a TUI turn redone as print, and both thirdPartyRefused messages) red on
the old code (400 reached the caller), green now; go test -tags nogui
./internal/gateway ok; gofmt clean; go vet darwin, linux nogui, windows.
Not tried: a real Team account.
On macOS race CI at de13afbf6 the test failed with "Grok was asked 3
times" and nothing more. It doesn't reproduce on mica: alone (30 of 30),
in CI's chunk c.0110 (8 of 8), or in 16 copies of that chunk at once
(32 of 32). The assertion stays: one ask sent twice costs the user a
vendor call. The failure now lists each request's method, path, size,
whether it carried a tool output, and when, so the next red names the
extra one.
Broken by hand (want 3): the message lists the two requests. go vet and
go test -race -count=5 ok on mica.
TestServingWritesDownWhereItListens read the note as soon as listening()
saw s.ln. ListenAndServe sets s.ln before recordListening writes the
note, so under load the read came first. It failed on macOS race CI at
de13afbf6 (run 43003416676): "while serving: {Addr: Pid:0 ...} false".
The test now polls ReadListening for up to 10s.
Run on mica:
- 300ms injected between `s.ln = ln` and recordListening: the old test
red 3 of 3 (the CI message), the new one ok 3 of 3;
- injection removed: go vet ./internal/gateway, and go test -race
-count=5 of the four listening tests plus
TestGrokReasoningGoesBackThroughOtherAPIs, ok.
Not run: the full suite (test-only change in one file).
An en-US Mac set to 24-Hour Time showed Routing's request times in 12
hours: no webview hands the page the system's clock, and navigator.language
carries only the region. boot.js now says it as hourCycle ("h23" or "h12",
left out when the system names none, and for a browser tab, which keeps its
own): macOS from AppleICUForce24HourTime / AppleICUForce12HourTime, Windows
from Control Panel\International sTimeFormat, Linux from gsettings
clock-format. intlLang() adds -u-hc-<cycle> to its tag, so every formatter
that takes it follows, and the places that forced 24 hours (hour12: false,
hourCycle h23) spread hourClock() instead: 24 unless the system says 12.
Read once per 30s, so a change in System Settings shows at the next load.
Run on mote: new hc-clock.test.cjs (en-US on a 24h system, en-GB on a 12h
one, a silent system), chromium and webkit; Go tests for the three readers
and boot.js; gofmt; go vet darwin, windows and linux nogui; internal/gui
tests; GUI files of gui-*, i18n-*, panel-*, quota-*, reset-*, routing-*,
usage-* in chromium and webkit. TestCoreScriptBudget was over by 77 bytes
and passes with two app.js comments cut, no raise.
Broken by hand: hc-clock goes red (2 of 3) without the intlLang suffix.
Not tried: a real Windows or Linux session's setting (the readers are
unit-tested on their formats), a live Mac.
55dff77b4 compiled seven package-level regexps in pageinline.go with
regexp.MustCompile, so TestNoEagerPackageRegexps was red on main. They
now go through lazyre.New, like the rest of internal/gui.
Ran on mica at this tree (origin/main 817ccb56f + this change):
- go test -run TestNoEagerPackageRegexps . : ok (red in the full suite
log at 6b4513082 before)
- go test -tags nogui ./internal/gui -run 'Inline|PluginPage|Page': ok
- GOOS=linux go vet -tags nogui ./internal/gui, GOOS=windows go vet
./internal/gui: ok; gofmt clean
Not run: the full suite or GUI suite (the change is a constructor swap).
Fixes#6145
Grok Build answers a spent allowance with 402 "usage balance exhausted".
"balance" matched creditWords, so the account rested as out of credit for
creditRest (30 minutes) and was asked again, refused again, though the
usage card knew the weekly window renews in 4 days. For a Grok plugin
account (plugin:grok, plugin:grok-plugin) that 402 is now failQuota, which
rests to the full window's reset (By "window"), and to the 15-minute quota
rest only when no window is known. Other vendors' 402s and Grok's other
402s (payment) are unchanged.
Run: TestGrokBalanceExhaustedRestsToReset red on the old code (credit, 30m),
green now; TestFactoryStandardOut*, TestResetsInWords and the Rest tests of
internal/gateway green; go vet darwin/windows/linux on internal/gateway.
Not run: full suite; a real exhausted Grok account.
Alma's MCP client is Node's fetch (undici in alma-server/lib/server.mjs). It
sends Sec-Fetch-Mode: cors on every request, with no Origin, no
Sec-Fetch-Site and no browser agent. hubVisitor used fromBrowser, which counts
Sec-Fetch-Mode, so Alma was an Away visitor and the HereOnly servers
(magpie-image) were neither listed nor run for it, while magpie-vision showed.
hubFromPage judges the hub's visitor by what a page's POST always carries and
its script can't remove: Origin (null under no-referrer too), Sec-Fetch-Site,
a Mozilla/ agent. The hub takes POST only, so the GET-without-Origin rebinding
case fromBrowser covers does not reach it; a rebound name is still refused
first by lanGuard's rebound (an Origin or Mozilla agent) and serveMCP refuses
any Origin that isn't listed in Settings. fromBrowser itself is unchanged for
heap, memory, join, restart and the rest. No per-agent token exists for a local
agent (the hub entry carries a key only from another machine), so the decision
rests on the marks, not on a credential.
Run (mote): TestHub* in internal/gateway; new
TestHubGivesAlmaItsHereOnlyServersNotAPage (Alma's headers are given
magpie-image; Origin null, evil, localhost, evil.localhost, tauri.localhost,
app://obsidian.md, chrome-extension://, Sec-Fetch-Site only, Mozilla/ agent
only, and three rebound-Host shapes get none and run nothing, no key). Red on
the old code ("Alma's fetch is given 200 [magpie-vision]"). Broke by hand:
hubFromPage = fromBrowser(r) goes red; dropping the Origin mark stays green
because serveMCP refuses an unlisted Origin on its own (two layers).
gofmt, vet darwin/linux(nogui)/windows, then go test -tags nogui -count=1
./internal/gateway (ok, 1283s) and ./internal/library (ok, 300s) at the
commit before the rebase onto origin/main.
Not tried: the real Alma app against a real hub (its config is the user's live one).
55dff77b4 compiled seven package-level regexps in pageinline.go with
regexp.MustCompile, so TestNoEagerPackageRegexps was red on main. They
now go through lazyre.New, like the rest of internal/gui.
Ran on mica at this tree (origin/main 817ccb56f + this change):
- go test -run TestNoEagerPackageRegexps . : ok (red in the full suite
log at 6b4513082 before)
- go test -tags nogui ./internal/gui -run 'Inline|PluginPage|Page': ok
- GOOS=linux go vet -tags nogui ./internal/gui, GOOS=windows go vet
./internal/gui: ok; gofmt clean
Not run: the full suite or GUI suite (the change is a constructor swap).
Fixes#6145
2c05df52b sent a model on to the relay's next API when New API answers 503
"No available channel ... under group" on the one asked. WandAPI answers 404
for the same case, so a GPT asked on its Anthropic URL stayed a 404.
catalog.NoChannel already took a 404 but only by the 503's words; it now also
takes a 404 whose JSON error carries New API's model_not_found code (code or
type) with a message that names a channel or a group, in English or Chinese,
and the Chinese 没有可用渠道.
A real 404 stays one: a wrong base URL ("404 page not found", HTML,
"Invalid URL"), Anthropic's not_found_error, and OpenAI's "The model X does
not exist or you do not have access to it" (same code, no channel or group
named) reach the client and nothing is remembered.
Fixture basis: New API's source (QuantumNous/new-api, middleware/distributor.go
and service/channel_select.go) gives no-channel as 503 with
ErrorCodeModelNotFound and "No available channel for model {{.Model}} under
group {{.Group}} (distributor)". I did not find WandAPI's 404 body: the 404
fixtures are built from New API's code and message template, not a captured
WandAPI reply. If WandAPI's wording names neither a channel nor a group, this
will not match; the reporter's body would settle it.
Run (mote, -tags nogui): go vet catalog+gateway; go test -run NoChannel
catalog and gateway: ok. TestNoChannel and TestNoChannelAs404FromAFork
(fallback taken; missing-model and wrong-base-URL 404s not) are red with the
404 branch switched off by hand.
Not tried: a real WandAPI account.
Copilot's Gemini models still answered 400 "invalid request body" to Codex
Desktop after the oneOf rewrite. RoyShen12's live isolation on #4374: the
cause is geminiToolTypes writing `type: string` beside a nullable union
(move_thread_to_project.projectId = anyOf [string, null]); removing that one
field made the full request 200. For a Copilot Gemini on chat, a union node
(anyOf or oneOf, any shape, nullable or not, at any depth) now goes as its
client wrote it, without the parent type; its branches are typed as ever, and
every other Gemini route (Vertex relays, plugins) is unchanged.
Grok 4.7 behind Copilot (Responses) is turned away over a namespace tool
(mcp__codex_app) and over a function whose parameters are a root union
(automation_update); Copilot's word is a bare 400/422, so nothing teaches
the refusal-learner. For a Copilot Grok the namespaces go flat
(namespace__name, provider.GrokFlatBody, nothing else of the body touched)
and root unions become objects (ObjectRoot); the model's call to a flat name
gets its namespace back through the existing namespacedIn path. GPT on the
same /responses keeps its namespace and unions as they came.
Run (mote, -tags nogui): go vet gateway+provider; go test -run
'TestCopilot|TestGemini|TestGrok|TestObjectRoot' gateway and provider: ok.
New TestCopilotGeminiKeepsNullableUnionsUntyped (anyOf, oneOf, array items,
$ref'd nullable), TestGeminiTypesOtherVendorsKeepTheirs and
TestCopilotGrokTakesNamespacesFlat (GPT unchanged) are red with the two
wiring lines reverted by hand, green with them.
Not tried: a live Copilot account (the fakes refuse with the shapes
#4374's isolation recorded); the full suite, started after the tag.
Plugins rode the providers part and AddPlugins only adds, so a plugin one
computer removed came back from another that still held it and was sent up
again. davsync now keeps the plugins both sides had after the last sync
(state.Plugins, as sign-ins keep theirs); a name one side has since lost is
taken out of the server's list when it was removed here, and removed here
(provider.RemovePlugin) when it was removed there. A plugin added meanwhile
stays. A removal that fails (agent on magpie) is retried next sync. backup
now writes an empty plugin list as [] so "none" is told from "older magpie".
Run (mote): go test internal/davsync + internal/backup ok; vet darwin,
linux nogui, windows clean; gofmt clean.
Broken by hand: pluginPlan returning nothing turns
TestSyncPluginRemovalSpreads red (b keeps x after a removed it).
Not tried: real WebDAV server, two real machines, full suite before tag.
Siblings: MCP servers, skills, providers and search APIs are mirrored
(library.Put, provider.Mirror), so their removals already spread when one
side changed.
Claude Code's AgentSummary sends the sub-agent's conversation whole, minus
the assistant messages whose calls have no result yet, keeping the words
before them. branch() needs a call in the last reply to find a session
line, returned nil, and a new Claude Code was told the whole transcript:
90K-160K cache tokens written for a progress label.
branch() now also takes a last reply with no call: the run is the owner's
run with a call line whose conversation (told) is the one before that
reply, the session is cut before its first call line (cutSessionBefore,
savedSession.cutBefore), and the run is told only the request's tail.
When no branch is found the log now says why, by structure only (no
prompt text): "no branch of a run's session for this request: <reason>".
The reporter's second cause, "answered by another request", already
branches off through the calls path; the new reason line will show which
condition fails there if it still does.
Run: go test -run 'TestClaudeBranchForSummary|Fork|Branch|Retry' ./internal/gateway
ok on mote; the new test is red with the pending path off
("no run of the account made the calls"); gofmt clean; go vet darwin,
windows, linux nogui; full ./internal/gateway started after the tag.
Not tried: a real Claude Code AgentSummary against a live subscription.
LingYingNX sent MiniMax's Messages video block through the MiniMax plugin
(a plugin is always sent a translated request). readAnthropic had no case
for "video", so the block was left out: the reply was 200, the request
billed, and the model never saw the video. Chat's video_url and a Chat
file of a video were left out the same way (#4101).
A video is now a File part with a video/* media type (video_input.go):
- read from Messages' video block, Chat's video_url, a Chat file of a
video (nested, or the AI SDK's flat {type, data, mediaType}) and a
Responses input_file of one;
- built as a video block on Messages, video_url on Chat, inlineData on
Gemini's API (as before for Gemini);
- Responses has no shape for one: a latest-turn video translated there
is a 400 that says so (unportableVideo in translate).
A latest-turn video for a model whose list says it takes no video is a
400 before any upstream is asked; one of an earlier turn is told of in
words (Request.videoOff, set in buildFor). A routing group takes the
union of its members' Inputs/Outputs (buildGroupEntries, #2898), so
/v1/models lists video for group/... when a member takes it, and a video
goes only to members that take one, else to unknown ones, else a 400
naming the group.
Not changed: PDFs (Messages document, Responses input_file of a PDF, a
Chat file of a PDF) stay as #5452 says; input_audio stays with #4101.
Ran (mote, at this tree): gofmt -l (nothing), go vet ./...,
GOOS=windows go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=linux go build -tags nogui, GOOS=windows go build,
go test -tags nogui -timeout 45m ./internal/gateway ./internal/provider:
ok gateway (1072s), ok provider (132s).
Rebased on origin/main c4a9856df (3d8510f32 changed Gemini's inlineData,
which passes a video as it is): go vet ./internal/gateway and the video,
group and Gemini media tests again, ok.
New tests: TestPluginGetsTheVideoBlock (the reporter's body shape to a
plugin), TestVideoReachesEveryAPI (Chat video_url / file / AI SDK file /
Responses input_file to Messages, Messages to Chat, Chat to Gemini,
Messages to Responses = 400, Messages relayed), TestVideoForAModelThatTakesNone,
TestGroupVideoGoesToMembersThatTakeIt, TestGroupInputsAreItsMembers.
Broken by hand, each red: the Messages video parse case (4 tests), the
Messages video build, Chat's video build, Chat's video_url parse,
Responses' input_file parse, unportableVideo, the single-model gate, the
group filter, buildFor's videoOff, and unionKinds (provider and gateway
group tests).
Not tried: a real MiniMax account or any real vendor with a video; the
plugin side is plugins#985 (opencode-minimax-auth 0.2.6). The full
suite runs after the push.
Reported-by: LingYingNX
The asset call from 2022aa3c0 put 365 bytes over TestCoreScriptBudget. It moves
to pageshare.js, imported when a page asks. Run on mote: go test ./internal/gui
ok; plugin-page, plugin-page-cookie-proxy, i18n-keys in chromium and webkit ok.
A plugin page's frame is sandboxed (opaque origin), so its stylesheet and
scripts are cross-site requests that carry no SameSite=Lax cookie. Behind
Cloudflare Access they were redirected to the sign-in page and the page
said it "didn't answer" (Day card). index.html's manifest link also
fetched without credentials.
In magpie web the page's HTML now comes as one document (pageinline.go):
classic scripts (bridge included) and url()-free stylesheets are written
in, scripts allowed by sha256 in the policy, deferred ones moved to the end
of body. A script the page adds later is fetched by the window (asset call,
folder-checked, window carries the cookie) and loaded from a data: address
(WebKit finds no blob made in a sandboxed frame). The manifest link has
crossorigin="use-credentials". Modules, url() stylesheets, images and
fonts loaded by the page itself still ask the proxy.
Run on mote at this tree: go test -run PluginPage ./internal/gui; node
--test plugin-page, plugin-page-idle, plugin-page-cookie-proxy in
chromium and webkit; gofmt; vet. Broken by hand: inlining off turns
TestPluginPageWebComesAsOneDocument red, the bridge shim off turns the
cookie-proxy test red in both engines.
Not tried: a real Cloudflare Access tunnel; images/fonts behind a proxy.
A DeepSeek card that could not be read said "Allowance unavailable -
hover for why", and hovering showed the error. After one press of its
refresh the hover showed only those short words. The page's hover over
cut-short text (the mouseover handler in app.js) writes an element's own
text as its title when it has none and is clipped; the tray card's line
(.pq-sub / .pq-say, which the refresh redraws) had no title of its own,
so the short words went over the card's title that held the error. The
line now carries the reason as its own title, in the tray card and in
the Usage page's aq-none row.
panel-error-why hovers the tray card's line before and after a refresh,
en/zh/zh-TW/ja/de at 486 and 360px. Red on origin/main in Chromium
(10 of 10, the zh one reading "暂时无法获取额度 — 悬停查看原因" after the
refresh), green with the change. WebKit is green on both: its hover
leaves the title alone. Also ran the 55 GUI files that name pq-card,
aq-none, pq-line, quota-refresh or pq-say in both engines: 826 pass, 38
fail, the same 38 that fail on origin/main de13afbf6 (account-refresh-holds,
claude-quota-onboarding, codex-auto-reset, plugin-signed-out-account,
tray-cell-click, usage-fold).
Not tried: the Windows tray window itself (WebView2).
A Claude Desktop conversation on antigravity/gemini-4-carbon was turned away
several times with "Antigravity: Request contains an invalid argument."
(Anthropic to Gemini, 1.3 MB, the last input a tool result). Antigravity's
model list says what Gemini 4 reads: png, jpeg, webp, heic, heif among the
images. magpie passed an image block's media type through as it came, so a
GIF, an SVG, or an image block with no type went to Google as it was, and
since a history keeps it, every later turn failed. geminiInline now sends
such an image as a PNG when Go can read it (a GIF's first frame), names a
type from the bytes when the block gave none, and puts a short note in its
place when it can't be read. It covers images in messages and in tool
results, for every Gemini route that builds through buildCodeAssistSent.
Run: TestGeminiRequestHasOnlyImageTypesGeminiReads (Antigravity and Gemini
routes), red with the two call sites put back, green with them. On mote:
go test -run 'Gemini|Antigravity|CodeAssist|Vertex|Image|Agy|Factory|Zed'
./internal/gateway ok, go vet for darwin, windows and linux nogui clean.
Not reproduced: the reporter's own request. The owner's Antigravity account
answers every generate call 403 (no licence) and Gemini 4 Carbon is listed
disabled, Ultra only, so the live call could not be tried. The image type is
the cause the model list supports, not one seen in their request; the other
suspects (tool schemas, thinking level, tool_result shape, size: Carbon's
window is 1M) already have handling or don't fit. The full suite was not run.
Detected asked only magpie's own PATH off Windows. A magpie started from a
desktop launcher has no ~/.local/bin on it, where the official Antigravity
CLI installer puts agy, so the Plugins page said "Antigravity CLI isn't in
Agents: magpie doesn't find it in ~/.gemini/antigravity-cli". binAt now asks
proc.FindTool on every OS (PATH, then ~/.local/bin, npm, bun, Volta, cargo
and the other folders a user's tools live in), as Windows already did and as
CLIMissing already did.
Run: TestDetectedFindsBinInLocalBin on Linux (wsl-run, magpie-desktop): red
with binAt put back to LookPath only, green with the change. On mote:
go test ./internal/agent ./internal/proc ./internal/gui ok, gofmt clean,
go vet for darwin, windows and linux nogui clean.
Not tried: a real agy install on the Linux VM, and the GUI Plugins page.
TestListingsOfDifferentSizesMadeOnce went red on macOS CI (run
42998160416, at f10c546db) and in #5990's full run: ten polls of
unchanged folders allocated 71-94 KB against a 64 KiB bound. The 64 KiB
read buffer came from a sync.Pool, which a collection empties, a Get on
another P misses, and -race drops one Put in four of; each such miss
made a new buffer inside the window. In the app, that is a new 64 KiB
buffer on the next poll after each collection.
The buffers are now kept on a small free list under a mutex, up to
four, the way listings already are (stats.go says why those aren't in
a pool). The test runs two collections in its window.
Run on mote at origin/main de13afbf6 plus this change:
- go test -count=20 -run TestListingsOfDifferentSizesMadeOnce ./internal/dirent: ok
- go test -race -count=5 ./internal/dirent: ok (#5990: every -race run failed before)
Broken by hand: the old stats_darwin.go with the new test, -count=5:
5 of 5 red, 73856 to 93624 bytes.
Not tried: Linux and Windows, where the file isn't built and the test skips.
A provider with image models and no chat models answered "Pick a model
first" to Test models, since the list it tests is the chat models agents
see. The backend already draws a tiny image for an image model id, so with
no chat models the ticked image models are sent to test instead. Image
models stay out of the Agents list on purpose; Settings > Models > Images
picks one.
Run: new image-models-test.test.cjs and image-models-hide.test.cjs in
chromium and webkit, five languages, 1000 and 360px (74 pass, wsl-run);
the new file is red (11 of 11 in chromium) with the app.js change stashed.
Not tried: a real image provider account; the whole GUI suite (no new API
call).
Copilot answers 400 "invalid request body" to every Gemini turn whose tools
have a schema with a required entry naming no property (common in MCP
tools), or two tools of one name. Probed live on a real Copilot account
with gemini-3.8-flash: required-missing, nested required-missing, required
without properties, and duplicate names were each 400; the same request
with the entry or the second tool gone was 200. Claude Code, Codex and
OpenCode bodies without those were 200. Now such required entries are
dropped and the first of same-named tools kept, for Copilot's Gemini on
chat only; a clean tools array goes byte for byte as it came.
Run: new TestCopilotGeminiTakesToolsFit and the TestCopilotGemini* set
(Linux, wsl-run); red with the call removed by hand (400 back). vet on
darwin, linux, windows and the gateway and gui tests on mote.
Not tried: Gemini tool names with a space, a leading digit or a slash are
also 400 on Copilot (probed); a rename needs the reply mapped back, so it
is left. items given as an array and boolean schemas are 400 too, left.
Windows CI compiles the tests and runs none, so both were red there only.
- TestGoneAgentListedToTakeOut wrote Hermes's config to ~/.hermes. On
Windows Hermes's home is %LOCALAPPDATA%\hermes (appdir.HermesHome), so
hermes was never found and "wasn't given the skills". The test now
points LOCALAPPDATA into its sandbox and uses appdir.HermesHome(), as
hermes_mcp_test and targets_gone_test do.
- TestCheckMixedServerEachSide's fake server is the test binary, a .exe
on Windows, and a Windows program is checked on this machine only, by
design (checkSides, TestCheckWindowsServerHere); its distro side also
runs the fake through /usr/bin/env. It is skipped on Windows, saying so.
No product code changes.
Run, at origin/main 4cc20f93c plus this: go test -count=1 -timeout 30m
./internal/library ok whole on Windows 11 (xiaomi-gpu, win-run), the
first green whole-package run there today; -run 'TestGoneAgent|TestCheck'
ok on mote (macOS) and WSL magpie-desktop. Both were red alone on Windows
at origin/main 961427f12 before.