35face90f3b48cd4efb8b6d8e2cb565cb1f5f58f
8449
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
35face90f3 |
gateway: thinking.display goes to a Claude only (StudyingPython on X)
pi-ai, DeepSeek Harness's client, sends thinking {type, budget_tokens,
display: "summarized"} for every model it lets reason (and adaptive with
display for some). magpie passed display through to non-Claude models on
an Anthropic route, and Alibaba Cloud's Anthropic endpoint (Bailian and
its Coding Plan) answered a Qwen request with 400. The reporter saw it
around compaction, which dsh can move to another model.
withoutForeignDisplay drops thinking.display when the body's model is
not a Claude (claudeVersionOf, or "claude" in the name). It runs in
forwardOnce's Anthropic block after adaptiveThinking, so Anthropic's API,
the Claude subscription and relays serving Claude models keep display
"summarized" (#1485). The provider's own fields go on afterwards, so a
display the user forces there ("!thinking") is still sent.
Run (mote, at this commit on
|
||
|
|
28236ad2d5 |
LESSONS: a red only CI's OS shows is probed there with the suspect toggled
EBADF on macOS CI (#6368, #6785) sat four days; local macOS 27 never
showed it, and one probe run on CI's runners named WatchRoot (
|
||
|
|
d46af794b1 |
dirent: a folder renamed in whole under a watched one's name is read again
A listing was taken as current unless its own folder or its root's was
heard to change. A folder replaced whole (renamed away, another renamed
in under its name) is heard only in the folder that holds it, so a
Sessions read kept the old folder's listing until listedFor ran out.
Found while dropping WatchRoot (the commit before), which never covered
this: it reports the root alone. Every folder from the listing's parent
up to its root is now checked.
Run (mote, at this tree):
- go test -race -count=5 ./internal/dirent: ok
- go test ./internal/sessions: ok
- go vet ./internal/dirent for linux, windows; gofmt -l: clean
- red on the old code: the same rename as TestFolderReplacedWholeIsReadAgain,
3 of 3 "new file not seen" at
|
||
|
|
0522bf84f8 |
dirent: watch without FSEvents' WatchRoot, which left files EBADF (#6368, #6785)
macOS CI's internal/sessions runs failed on ordinary file reads, writes,
closes and TempDir cleanup with "bad file descriptor" since 11-13, the
day after
|
||
|
|
421d5ce000 |
proc: a context that ends a running command says so off macOS too (#5967)
CombinedOutputOwn off macOS (and without cgo) was plain
cmd.CombinedOutput(). When the context killed a command that had
started, exec.Cmd's Wait said "signal: killed", while the macOS path
returns ctx.Err() whenever the context ended. TestCombinedOutputOwnContext
cancelled right away, so it passed when the cancel beat the start and
went red on ubuntu CI (run 43771048472 at
|
||
|
|
881497507c |
lessons: the one-suite-per-machine lesson is listed as moved
|
||
|
|
ff5a7dfc03 |
lessons: one full suite per machine moves into the code standards
Seen a third day:
|
||
|
|
ada0125303 |
providers: Antigravity's accounts move to agy-cli in one click (@tongzhenbao on X)
@tongzhenbao asked whether accounts signed in on the old Antigravity plugin (opencode-antigravity-auth, withdrawn since |
||
|
|
64c4261582 |
sessions: search what was said in every agent's sessions, from the page and an MCP server
cryingLiu on X asked to search the chat history of every agent magpie
reads sessions from: prompts and replies, from one place.
What the user gets:
- The Sessions page's search also lists, under the agent's own list,
the other agents' sessions whose conversation says the words, each
with a snippet. A hit opens the conversation in the sheet at the
message that said it (transcript?find=), with "N earlier messages
not shown"; the page itself never scrolls. While the index is still
being built the head says "Indexing sessions…" or "Indexing N of M
sessions…", and the page asks again every 3s until it is done.
- Magpie Sessions, a built-in MCP server in Library → MCP (Discover),
opt in per agent like the other magpie servers. Its tools are
search_sessions(query, agent?, limit) and read_session(id, around?),
both returning text. It runs as `magpie mcp sessions` over stdio and
reaches the gateway's /mcp/magpie/sessions, which serves only local
callers that are not browsers.
How it works:
- internal/sessions/said_index.go keeps said-v1.db beside sessions.json:
a contentless SQLite FTS5 index (detail=none) of the words each
session says. It is built from the sessions list sessions already
caches and refreshed at most every 10s: a new or rewritten file is
read once, a grown Claude Code or Codex file only from where it ended,
and a gone one is forgotten. A query asks the index which sessions
have every word, then reads only those files for the snippet, for at
most 6s. A search waits up to 2s for a refresh. While the first
listing is still running the answer says `listing`, so an empty first
answer is not read as "no session says it".
- Privacy: only agents sessions.Reads allows are indexed or searched;
nothing is read until the user has answered the sessions question,
and in gateway mode no agent's own files are read (the page doesn't
ask). Reset forgets the index.
- /api/sessions/said for the page; the CLI parity list names it.
Run, at this tree (rebased on origin/main
|
||
|
|
103eff4d44 |
routing: a group's model is dragged by its row, not only by its number (NovaStudiosss on X)
NovaStudiosss on X: "the models added to a routing group should be draggable with the mouse; I move them often and Up/Down each time is not handy enough". A member could already be dragged since |
||
|
|
65e3dfa957 |
LESSONS: a byte-for-byte stream check allows SSE comments, and its message counts against what it compared
From
|
||
|
|
fff0755b58 |
gateway: TestPassthroughResponsesBigLastEvent leaves a held stream's keepalive out of its comparison
On macOS CI at |
||
|
|
e34228669c |
library: agy's GEMINI.md is no longer emptied by Antigravity's app switched off
vizmoe42 on X (v0.1.4271): Library -> Instructions had agy CLI's
GEMINI.md switched on, but ~/.gemini/config/GEMINI.md held nothing.
agy and Antigravity's app share that file (and its folder). With the
built-in agy the targets run agy first, then Antigravity; agy wrote its
part and the unticked Antigravity row, wanting nothing, took it out
again, leaving the file empty or gone. The unticked row also showed
"edited". With agy on its plugin the order is reversed, so it worked by
luck there.
syncInstructions now takes every target. A file another target reads
too belongs to the one switched on (instrOwner): the others leave it
and drop their own record. The Edited check compares against that
owner's text (wantedIn). The path itself is right: agy 1.5.9 reads
~/.gemini/GEMINI.md, ~/.gemini/AGENTS.md and their config/ copies
(binary strings and `agy changelog`, sandbox HOME). MCP and skills in
the shared folder already behaved; probed, unchanged.
Existing users: agy's record says written but the file has no block,
so the next start-up Sync writes it, without switching anything again
(covered by the test).
Run:
- TestAntigravitySharedInstructionsFile (agy and antigravity subtests),
red on the old code (file empty after the switch; agy row Edited),
green with the fix, on mica.
- go vet ./internal/library; go test -count=1 ./internal/library
./internal/gui ./internal/tui ./internal/cli: all ok on mica.
- At the pushed head (rebased on
|
||
|
|
e47abdf468 |
usage: the allowances' trend takes any last N days; a curve's hover reads the exact numbers
shangyuan0818 on X asked for exact numbers on the Overview's quota curves when hovered, and for the trend to take any "last N days". - Usage → Overview, the allowances' "Trends: …" button: the menu now has 7 days and 30 days beside Off, 2 days and Cycle, and "Other number of days…", which turns the button into a field for 1 to 45 (the days of history magpie keeps). Enter or leaving the field keeps it; Escape leaves the range as it was; a number out of range says so and keeps the old one. A custom N stays in the menu, and is kept across a reload (magpie.quotaRange). - Hovering a quota curve shows a small tip at the reading nearest the pointer: when it was read, then each window's left to two decimals (70.46%), with a hairline at that time. A balance curve shows the balance in the card's currency. The curve's own tooltip (what the dashes mean) waits while the tip shows. A touch still zooms, as before. - The trend menu, the days field and the hover live in the usage plugin's page.js, so app.js stays inside its budget. - No animation: the tip follows the pointer, which a movement would lag. Run, at |
||
|
|
d597b4d010 |
usage: a priced cost without "≈", at least two decimals; cache hit rate to two
shangyuan0818 on X: Usage → Requests showed every cost as "≈$…", and the cache hit rate with one decimal. - A cost from known prices is what magpie counted, so "≈" is gone from every priced cost: Requests' Cost card and tiles, the agent, model and account rows, the quick panel's Usage, Routing's live rows. An estimate keeps it (a window's whole on an account card, a session file's times). - fmtCost gives at least two decimals ($1.00, $100.00, $2500.50), three under $1 as before, and a sub-mill amount to its first two digits ($0.00040, $0.000012) instead of $0.000. - Requests' Cache hit rate card has two decimals (93.97%); hitPct still never rounds up to 100% or down to 0%. - A whole-window estimate from $100 up stays whole ($1235): its cents would claim a precision it hasn't (wholeCost, moved to page.js to keep app.js inside its budget). Run, at |
||
|
|
fc41381d60 |
LESSONS: a docs page change left llms-full.txt stale a second time (256910f17)
Under the 11-13 entry for
|
||
|
|
25ad34f425 |
site: llms-full.txt carries 256910f17's Antigravity line
|
||
|
|
d6ca7d8225 |
edit: the big-TOML ratio test gives both sizes the same CPU (#4109)
|
||
|
|
2d106b5c1a |
LESSONS: a gone check that looks past made-up text moves into the code standards
Seen a third day: on 11-15 TestMoreKinds' "ops" was in the made-up
user name zpxopsat (ubuntu CI at
|
||
|
|
8765ca1758 |
redact: TestMoreKinds' gone check looks past the made-up user name (#4345)
TestMoreKinds checks that each masked value is no longer in what is
sent, after taking out the {{KIND_…}} placeholders. A user name goes as
a made-up name instead, eight lowercase letters from a key that is new
each run, and that name can spell a short user name: on ubuntu CI at
|
||
|
|
dd77094ca2 |
gui: on Windows the header is the window's title bar (258a14 on X)
With a wallpaper, Windows' main window had a white native title bar over
the page, cut off from it ("内容区域和标题栏有割裂感"). On Windows the main
window is now frameless (mainFrameless), as the Mac's header already is
the title bar: the page and its wallpaper run to the top edge. Wails v3's
frameless window keeps WS_OVERLAPPEDWINDOW, so the shadow, Windows 11's
rounded corners, snap (Win+arrows, drag to an edge) and Wails' resize
edges stay. The header draws minimise, maximise/restore and close at its
right (#wincap, wincap.js, imported in that window alone), Windows-sized
with Segoe Fluent Icons, in the theme's colour, Close red on hover
(.1s ease); the header's refresh and pin sit left of them and stay
no-drag. A double click on what drags the window maximises or restores
it. The app tells the page when the window is (un)maximised (captionJS),
which swaps the glyph and its tooltip and keeps Wails' resize edges off
while maximised so the corner pixel is Close's. The buttons stay over a
dialog's scrim (wincap.js undoes modalBackground's inert on them). The
Mac, Linux, the tray panel and the web page are unchanged.
TestCoreScriptBudget: +27 on both budgets for the one import line in
app.js, past the 29 bytes of room there were; the rest lives in
wincap.js and app.css.
Run (mote, at this tree on origin/main
|
||
|
|
256910f174 |
plugin: Antigravity's plugin keeps serving whoever has it, and is given to nobody new
The owner (11-15): "正在使用的继续正常,加个提示,新用户不让下载". Google suspends accounts it sees on Code Assist through Antigravity's own client, so |
||
|
|
ff6f6337f1 |
sessions: the kept parses are written binary, not JSON
The Sessions and Usage index (sessions.json, ~18k files on a long
history) was JSON. Every start decoded all of it through reflection,
and every save, which happens at most once a minute while a session is
live, marshalled it whole again. It is now a compact binary form
(cache_binary.go):
- A magic and a version header.
- Then length-prefixed records, varints for the numbers.
- Interned names, as the JSON path interned them.
- The rare nested parts (Claude Code's window, a Codex identity,
StateMore) as JSON blobs.
Records are decoded in parallel.
A JSON index from an older magpie is still read. loadCache saves it
again at once, so it turns binary on the first start even when no
session changed; before, a save came only after a file changed.
A binary file is refused whole, never half read: when it is cut
anywhere, has a byte added, or is of another zone or version. That
means one full read again, as a refused JSON file meant before.
TestCacheBinaryKnowsEveryField fails when state, day or Tokens gains a
field that the binary form doesn't carry.
On the real acctp history, on mote (18,346 files):
- The file is 14.8 MB, down from 23.3 MB.
- Decoding takes 19 ms, down from 69 ms, and allocates 28 MB, down
from 58 MB.
- Encoding takes 10 ms, down from 98 ms, and allocates 3.1 MB, down
from 32.5 MB.
- The heap kept after decoding is the same: 24 MB.
- /api/sessions from a w94 build on the binary index and from a w92
build (before) on the JSON index answer the same bytes (5000
sessions). Neither rewrote the index.
- The page-open footprint peak was 152 to 214 MB on both builds at
load 60 to 80. It is too noisy to claim a change.
Run:
- mica-run go test -count=1 -timeout 45m ./internal/sessions
./internal/usage ./internal/gui: all ok.
- GOOS=linux and GOOS=windows go vet ./internal/sessions
./internal/usage: ok. go vet ./internal/sessions: ok.
- gofmt -l: clean.
- TestCacheBinaryRefusesBadFiles cuts the file at every length, adds a
byte, changes the zone and the version, and flips every byte; it
checks that a bad file is never accepted and never panics.
Broken by hand:
- The decoder skipped Provider: TestCacheBinaryIsJSON went red.
- loadCache stopped re-saving a JSON index:
TestCacheJSONRewrittenOnStart went red, the file still JSON.
At the pushed head (rebased on
|
||
|
|
500f39886e |
testenv: a package's own run fails on a package-level regexp it compiles at launch
TestNoEagerPackageRegexps lives in the root package, and a change runs its own packages, so the guard went red on main on six days: #6020, #6145, |
||
|
|
022ffd09ec |
provider: Qianfan's cURL cookie patterns compile when first used (TestNoEagerPackageRegexps)
|
||
|
|
52e83f7b58 |
provider: Devin's plugin is at least 0.1.44, for long conversations
a1pha1nthefog on X: a long session through Devin answered "There is an
issue with this request, please try a different model" on every turn.
Devin's plugin 0.1.44 (magpie-community/plugins 1260b2ba, on npm) sends
a picture as the type its bytes are, drops a white-space user prompt,
sends turned-away signed thinking again unsigned, and past half the
window answers the refusal as "input is too long", which the gateway
already turns into a compaction. Raising the mover's min brings every
moved user onto it (keepMovedCurrent).
Run on mote at 91d309f7a (rebased on
|
||
|
|
8f3f7a46af |
provider: Baidu Qianfan's Token Plan Personal shows its month through a console sign-in (yuushabu_buyinn on X, #5860)
A Qianfan Token Plan key tells nothing of the plan's usage: Qianfan's
OpenAPI has no read for it, and the console's own page asks
console.bce.baidu.com/api/qianfan/charge/tokenPlanPersonal/resource with
the signed-in cookie. So the plan is read as StepFun's Step Plan is: the
editor of a provider at qianfan.baidubce.com/v2/tokenplan/personal has a
"Token Plan usage" field, drawn by the same renderStepPlan (now told
whose sign-in it brings) from qianfanplan.js, imported when such an
editor opens. The bookmarklet, run on the console, checks the session
with that same request and copies the console cookie; a raw Cookie
header or a copied cURL is taken too, since document.cookie leaves out
HttpOnly cookies. The paste is checked with a real read before it is
kept, by provider id, in qianfan-auth.json (0600, lastgood-guarded,
moved and dropped with the provider). POST /api/qianfan/{id}/session and
/signout serve it.
The Usage page's card (qianfanPlanQuotas in PlanQuotas) is the running
plan's credits (billingMode credit) or tokens as one Month window up to
expiresAt, the plan's tier as its name and auto-renew beside it;
released and past plans are skipped, and routing reads the same windows
(accountPlanWindows). A redirect, 401, 403, an HTML page or a refusal
naming the login is a signed-out session: an error card saying so, never
0 left; any other failure is an error card too, the last reading kept
only on a passing network error. The per-plan apiKey in the console's
reply is never kept, logged or shown.
Not done: the Enterprise (team) plan has no card. The console has no
tokenPlanTeam/resource; it reads team plans through seat and admin APIs.
Not tried with a real account: no one here is signed in to Baidu Cloud's
console, and #5860 has no reply bytes posted. The fixtures follow the
field names in the console's own script bundle and in the
dsh-qianfan-token-plan reader (planType, resourceStatus, billingMode,
usedCredits/totalCredits, usedTokens/totalTokens as numbers or strings,
expiresAt, autoRenew), not a captured reply.
core budget +35 (app.js and core): the field moved to qianfanplan.js;
what is left in the core is the import and two quotaError lines.
Run (at the pushed tree, rebased on origin/main
|
||
|
|
8df7885d48 |
gui: an agent's current model, lifted to the top of its picker, says whose it is when another provider lists a model by the same name
ADNANYURTSEVER3 on X (Mac, macOS 27.2.1): with WorkBuddy and WorkBuddy AI both serving Hy4 and DeepSeek-V4.1-Flash (WorkBuddy AI spells it Deepseek-V4.1-Flash), the Agents page's picker showed WorkBuddy AI's section with Hy4 alone, while dsh listed and ticked "Deepseek-V4.1-Flash · WorkBuddy AI". Cause: not case handling. buildVia and the catalog keep both spellings apart (checked with a probe test in internal/agent, not kept). openPicker lifts the agent's current model out of its section to the top of the list (#1229). There its note named only the account. With WorkBuddy's DeepSeek-V4.1-Flash, a model of the same name, under the same icon, the row on top could not be told apart, and WorkBuddy AI's section read as if magpie had dropped the model. Fix: when another provider lists a model by the same name, in any case, the lifted row's note now starts with its provider ("WorkBuddy AI · b@…"). The rail's own provider view leaves the name out, since its section already says it. Pickers with no such clash are unchanged. A first try listed the current model both at the top and in its section. It broke the "each model once" and "current first" contracts of claude-picker-fold, claude-picker-magpie-first and others, so it was dropped. Siblings: - The tray panel uses the same openPicker. - The Routing member picker and modelfind do not lift the current model. - The TUI's withCurrent lists the current row by its full value (magpie/workbuddy-ai/…), which names the provider. - dsh already names the provider on every row. Run (on mica via mica-run): - New internal/gui/tests/picker-current-in-section.test.cjs: chromium and webkit, en/zh/zh-TW/ja/de, 1000 and 440px. - Red on origin/main, 20 of 20 ("it says whose it is: b@example.com"). - Green with the fix, 20 of 20. - Picker files at the change: picker-rail-current, claude-picker-fold, claude-picker-magpie-first, agent-path-same, codex-accounts-via, searcher-pick, images-codex-one, video-gen-pick. - 150 of 156 pass. - The 6 reds (images-codex-one and video-gen-pick, "reading 'x'") fail the same on origin/main |
||
|
|
9e627c5079 |
claudetui tests: a deadline case cut off before its screen was drawn runs again (#5429)
The retry ported from Fldicoahkiin's 165e33d89 (the commit before this) reran a case only when the helper said "showed no prompt". The "banner, no /usage panel" case, added after that fix was written, can be cut off one step later on a loaded machine: Claude Code is up, "/usage" is typed, and the deadline comes before the banner is drawn again. The helper then says "hadn't drawn /usage's panel in the 6s …: ❯ /usage", the right words with none of the case's screen, and the case failed. With FAKE_SLOW_START=3500ms it was red 2 runs of 2 at the ported commit. A case with a screen of its own now runs again, with twice the time up to 12s, whenever that screen isn't in what the helper said; a case with none (no prompt, no /usage panel) as before, on "showed no prompt". One whose screen is there with the wrong words still fails at once. Ran at this head (origin/main |
||
|
|
f3a758b734 |
claudetui tests: a deadline case run before Claude Code was up runs again with twice the time
TestShimEndsAtItsCallersDeadline gave each case a deadline 3s after it
started the helper. Every case but "no prompt" is about what Claude
Code draws once it is up (the trust question, the Bypass Permissions
disclaimer, /usage's panel), and "no prompt" wants "Starting up" drawn.
On a loaded machine the helper and the fake Claude Code, two starts of
the test binary, can take longer than that; the helper then says,
rightly, "showed no prompt in the …s its caller waits for it", and the
case failed. Seen in a full run here ("showed no prompt in the 2.8s",
no_/usage_panel, load 13-20), in #3831 (trust_unanswered) and #5079,
and as "red in the full run, green alone" in the run records of #2398,
#2845, #3430, #3435 and #3475.
- A run that ended at its deadline with no prompt shown, whose screen
lacks what the case expects (any screen, for /usage's panel), says
nothing of the case: it runs again with 6s, then 12s. A run at 12s is
told as it is.
- A run whose screen has what the case expects while the helper says
"showed no prompt" fails at once: the helper misread it.
- The duration bound follows the deadline: from 500ms before it to 12s
after. The helper's own waits (20s, 45s) are still told apart by their
words: "in 20s", never "in the …s its caller waits for it" (c.why).
- FAKE_SLOW_START (new): the fake draws nothing for that long, as a
loaded machine starts it. A case with 3.5s keeps the retry tested
("trust unanswered, slow to start", 9s).
Timing assumptions left in the test:
- the helper and the fake are up within 12s;
- a run ends between 500ms before its deadline and 12s after it;
- runEndsTold's 30s for a run to end at all, which 12s + 12s fits.
Run (darwin/arm64, Go 1.26.8, sandbox HOME, Go caches pinned), at
|
||
|
|
3173c4f41e |
gui test: a route the CLI's list doesn't name fails internal/gui too
TestEveryRouteHasACommandOrIsNamed (internal/cli) went red on main for a new GUI route six times in a week (#5946, #6162, #6677, #6724, #6786): GUI changes run internal/gui, not internal/cli. TestEveryRouteIsNamedForTheCLI reads the same HandleFunc routes and fails when one isn't a key in internal/cli/settings_parity_test.go, so the run a GUI change already does catches it. The CLI test still checks which command each route has. LESSONS: the 11-15 case and the rule that a check repeatedly missed goes where the work runs.
Run at origin/main
|
||
|
|
ec5b96c44f |
cli test: POST /api/quit/disconnect is the window's own (#6786)
|
||
|
|
f9807c5e84 |
LESSONS: a red claimed and left a month (#2903) is unowned
#2903 was claimed on 10-19 and came back at
|
||
|
|
b26f16ee24 |
agent: Alma has one magpie provider, whichever side turned it on
realLemonawa on X: Alma has its own Magpie preset, and magpie's Alma
agent adds a provider of its own, so turning on both left two.
Alma's preset card claims the provider whose id is "magpie" (Alma
origin/main: forPredef / getProviderForPredefined, provPredefBody in
desktop-native settings_providers_detail.go). magpie's provider is now
made under that id (with the preset's icon), so Alma's card shows it set
up and offers no second one. When a provider has that id already (a
user's own elsewhere), magpie makes one as before and leaves it alone.
almaMagpie already took a Magpie set up in Alma first (same gateway
host) as magpie's, so the row showed connected and nothing was added.
What was wrong was switching off: almaSet("") DELETEd whichever
provider it had matched, the user's own preset included. Now a provider
magpie didn't make (name not "magpie") is kept: only the default model
and image refs that point at it are taken back, as before, and it is
turned off again only if it was off when magpie turned it on
(alma.wasoff in the stash). Sync no longer rewrites its model list after
the switch-off.
Tests: TestAlmaOneMagpie (internal/agent/alma_test.go), against the
fake Alma, whose POST now honours an id and answers a taken id with
Alma's 500 "UNIQUE constraint failed":
- set up in Alma first: connected, no second provider, switch-off sends
no DELETE, the preset stays on, sync after off writes nothing
- turned off in Alma: enabled on connect, disabled again on switch-off
- none in Alma: created under id "magpie", removed on switch-off
- preset id taken by another host: left alone, a new one made
Red on the old alma.go: "the user's own Magpie was removed:
[PUT /api/settings DELETE /api/providers/magpie]". Broken by hand:
without the id, "none in Alma" fails ("not under the preset's id");
without the Sync skip, "sync after off wrote [PUT
/api/providers/magpie/models]".
Real Alma (alma-server from /Applications/Alma.app, sandbox HOME and
ALMA_DATA_DIR, port 23917, never the live one): the preset's own POST
body creates id "magpie"; a second POST with that id is refused
500 UNIQUE constraint failed; PUT {"enabled":false} turns it off; DELETE
204; magpie's POST body with id "magpie" and type openai is kept as
sent.
Run at this tree (rebased on origin/main
|
||
|
|
0ffb21f833 | lessons: a request the page sends on its own is looked for in every GUI test that counts requests (#6709) | ||
|
|
38e60d7449 |
gui tests: a page's page-away beacon is left out of the writes they count, as update/using is (#6709)
|
||
|
|
47ce008da8 |
gui: Settings asks for HTTPS only while its rows can show (#6709)
renderHTTPS sent GET /api/settings/https on every renderSettings, and renderSettings has 35 callers, so each Settings draw cost a request, LAN or not. GUI tests count a request under /api/settings/ as a write, so checkin-now-account and panel-shortcut have been red in both engines and every language since |
||
|
|
261f482260 |
gui: Disconnect and quit puts the agents back for the next start, which connects them again (jtbbtnt54249 on X)
jtbbtnt54249, on LolingVerse's agy thread: "很多都这样,退出有时候又要重新开启".
Several agents' switches were off after quitting magpie and had to be
turned on again by hand.
Looked for a shared path that flips agents off. The row's switch is
Wired() alone, and nothing automatic disconnects an agent except a
removed plugin, the gateway pause (which reconnects on resume) and
Put agents back when quitting (which reconnects at start). The quit
question's Disconnect and quit, though, ran each row's Disconnect,
which leaves the disconnectedKey mark: every agent it listed stayed off
at every start after, and RewireOnStart skips a marked agent. Users
choose it so their agents work while magpie is closed, not to leave
magpie for good.
Now Disconnect and quit posts quit/disconnect (quitDisconnect), which
runs agent.RestoreOnQuit on the agents the question lists: their own
files back, no mark, recorded in quit.restored, so the next start's
RewireOnStart connects them again, the setting on or off. This covers
every agent the question lists: every detected agent wired to magpie,
built-in, plugin and WSL ones alike. A failure answers an error naming
the agent and magpie stays open. Its tooltip says magpie connects them
again when it opens (en, zh, zh-TW, ja, de).
Run at this tree (parent
|
||
|
|
99a54fa874 |
agent: agy's own /model pick no longer costs settings.json its model, and each thinking level is a model in agy (LolingVerse on X)
agy's /model writes its pick into settings.json ("model": "magpie/…")
even when started with --settings magpie-settings.json. The next Sync's
migrate took that for an older magpie's wiring and put back the old
stash: a stale model and "modelProvider": "gemini", or nothing, which
took the user's own model and provider out. That is the wrong restore
point the reporter saw. While magpie-settings.json is already on one of
magpie's models, such a pick is now moved into magpie's file (what agy
starts on next), and settings.json's model goes back to the one
connect.was kept when magpie was switched on, or out. The old stash is
no longer read for it.
agy 1.5.9 turns /effort away for every custom model, one with a
thinkingLevel too. A custom model's thinkingLevel takes low, medium or
high, and agy sends it as generationConfig.thinkingConfig.thinkingLevel,
which the gateway already asks over the row's effort (agyLevelAsked). A
model with two or more of those levels now has a custom model per
level, magpie/<ref>:<level>. The row's model field shows such a pick as
its model, so the switch stays on (agyLevelOf).
Run:
- TestAgyOwnPickKeepsSettings is red on the old agy.go. The levels part
fails with "level low:". The pick part, with the levels cut out,
fails with settings.json {"model":"stale","modelProvider":"gemini"}.
It is green on the new code.
- go test -count=1 ./internal/agent ./internal/cli on mote: ok (agent 259s, cli 67s) at base
|
||
|
|
139a6be2bb |
gui: a pin in the title bar keeps the main window on top (NovaStudiosss on X)
NovaStudiosss wanted to watch Usage and Routing while working in other apps. The main window's toolbar now has a pin between Refresh and Settings. A click keeps the window above other apps' windows (Wails SetAlwaysOnTop through POST /api/window/ontop?on=1|0) and saves it as settings.json's onTop, which this computer keeps for itself (KeepOwn, not synced). makeMain opens the window pinned on the next start, and boot.js shows the pin pressed before the first paint. There is no pin in the panel, in a browser's page (magpie web) or under Wayland, where always-on-top is ignored (GDK_BACKEND=x11 keeps it). A refused pin goes back up. Tooltips "Keep on top" and "Stop keeping on top" are in every language. A Settings save keeps onTop (settingsapi.Merge), which a test showed was lost before. Run (rebased on |
||
|
|
a80a920f56 |
gateway: a turn on a Codex WebSocket says where its time went
buhaodeshiyehao on X (Codex through Lody's ACP): the Routing page's
"Where the time went" showed only the request's masking. Codex's turns
to the ChatGPT backend, and to a Responses provider with Socket, go over
a WebSocket (codexSocket), and every turn of a conversation after its
first goes on the kept socket. No HTTP request went out that the try's
client trace saw, so TryNet was nil and the page had nothing but the
masking to show. A new socket's turn had TryNet from its handshake only:
the 101's wait read as the vendor's, and the backend's real wait went
into "First token".
codexSocket.turn now tells the request's client trace of the turn as
Go's client tells it of an HTTP request (socketTrace): on a kept socket
GetConn and GotConn (reused), on a new one GotConn once the handshake is
answered (its DNS, connect and TLS stand; its round trip is the wait for
the connection), WroteRequest once the message is written and
GotFirstResponseByte at the first frame. Both callers' traces get it
(gateway.go's routed tries and codex_backend.go's own sign-in), and so
does the usage record's sent/own split, which kept-socket turns lacked.
Test: TestSocketTurnTellsWhereItsTimeWent, Codex's own sign-in and a
Responses provider with Socket, a new socket then the kept one, a 200ms
hold before the first frame. Red on the old code (new socket: Wait 0.4ms
for the 200ms hold; kept socket: no timing), green with it (Wait ~201ms
on all four turns).
Run on mote at this tree (base 9bcdcfb7d; rebased onto
|
||
|
|
2a8e1b4448 |
LESSONS: a host outliving its test's HOME, a review's case argued away, Test's colour
- A helper that gives a test a new HOME also stops what an earlier test started under the old one (#6761, 248edad80; same class as #2449/#2702 on 10-17). Seen 2×. - Never merge with a review's problem open: plugins#1183 merged with the tool-loop test the review asked for argued away. Seen 2×. - Under "A cancelled run tests nothing": main's colour is the Test workflow's, not Docker's ( |
||
|
|
75ab21af4d |
plugin: a test binary takes no Bun from PATH (#6761, #6764)
TestRemoveListedAccountLeavesHiddenNamesake went red in every whole-package run of internal/provider since |
||
|
|
248edad80c |
provider: a plugin host ends with the test whose HOME it started in (#6761)
TestRemoveListedAccountLeavesHiddenNamesake failed in full runs (CI Test
at
|
||
|
|
9bcdcfb7d1 |
provider: Antigravity's Orchestrator ids are priced as the Gemini model each is
guyng35955 on X: an Antigravity local session's calls under gemini-pro-orchestrator-argon, gemini-pro-orchestrator-carbon and the worker gemini-flash-worker-agy showed tokens and cache but cost "—". They are Orchestrator mode's role ids, which no catalog prices. pricedNamesTo now reads them as the model Antigravity's docs name (https://antigravity.google/docs/models/): Orchestrator (Argon) plans with Gemini 4 Argon, Orchestrator (Carbon) with Gemini 4 Carbon, and Gemini 4 Hydrogen does the implementation, so the worker is priced as gemini-4-hydrogen. gemini-pro-orchestrator (Carbon's id before Argon came, per the Antigravity Context Window Monitor extension 1.17.1's table) is Carbon too. Only these four ids, under a route prefix or an effort suffix; a name only like one stays unpriced. Every cost reads through this one place: the Sessions list and overview (sessions.priceOf -> PricedName), the usage ledger, its totals and per-agent view (Pricer -> ListPrice / MakerPrice). Prices are taken as rows are read, so sessions recorded before the update are priced once it is installed; nothing is re-parsed. Google publishes no rate for the role ids themselves; they are priced at the named model's models.dev list price. Run (mote, at this tree): - the three new tests red on origin/main's models.go (every role id unpriced), green with the fix; red again with argon mapped to carbon by hand - go test -tags nogui ./internal/provider ./internal/sessions ./internal/usage: sessions and usage ok; provider ok but for TestRemoveListedAccountLeavesHiddenNamesake (ZCode account removal, not reached by this change), which passes alone -count=3 with and without this change; filed as #6764 with its output - go vet, GOOS=linux and GOOS=windows go vet of those packages; gofmt -l clean Not tried: the reporter's own Antigravity database, or a real Orchestrator mode account (this Mac has no Antigravity app and the account isn't offered Argon). No GUI change. Reported-by: guyng35955 on X |
||
|
|
e99307fb86 |
usage: a file read anew forgets when the last one was written or pruned (#6760)
TestWholeKeptAcrossReset was red on main at -count=5 (4 of 5, "after a
restart: <nil>"), and TestFeedExpiresACursorOlderThanItsTombstones at
-count=3 (2 of 3, "must be refused, not skipped over: <nil>"). Both had
the same cause. A package-level "last done at" outlived the file it was
about:
- carryLoad reset the window-holds map and dirty bit for a new path,
but not wroteAt. carrySave then waited 30s from the last file's write,
or from a held clock later than this one, and wrote nothing.
- feedLoad reset everything but pruned, so a journal read anew wasn't
pruned for an hour after another one was.
In the app it matters when the config dir changes (MAGPIE_CONFIG_DIR, a
sandbox HOME) without a restart, or when the clock moves back.
Each reset is now done where its sibling fields already were.
Run on mote at origin/main
|
||
|
|
30de93e9e9 |
plugins: a request whose Bun is still downloading fails at once and fails over (#6735)
hixonchan (kyrierekkok123-del on GitHub): with magpie's own Bun missing and its download stalled, every plugin-served request hung with zero bytes, nothing in the log, no timeout and no failover, and `magpie plugin` hung too. The host's lock (hostMu) was held across Bun's download, which had no bound on the whole, so every caller waited on it whatever its context said. Now: - Bun is downloaded in the background, once at a time per Bun (bunready.go). The host waits for it up to 10s from when it began (bunReadyWait); then each call ends with BunNotReadyError, "Bun runtime not ready: downloading Bun 1.4.2 (12s so far)…" or "… failed: <why>", logged, and the gateway goes on to the group's next member. - A failed download is said at once for a minute, then tried again; installs (plugin.Bun) still wait as long as their context lets. - hostMu is a channel lock that a caller's context can end (LockCtx); the gateway's TryLock polling loops use it. - When the download fails, a Bun on PATH or in ~/.bun/bin is taken if magpie would run it itself: at least BunVersion, not set aside, passing the try a new release gets. It is copied in as magpie-bun (#1048). magpie's checksummed build stays first; the user's own Bun is better than no plugins, and it is what the reporter fell back on by hand. - Each stage is logged: download started, failed after N, downloaded in N, the PATH Bun taken or refused and why. - Every route through the host gets it: fetch, loader options, sign-in, the plugin listing (CLI and GUI). `magpie plugin` prints the list and the not-ready reason within ~10s. Self-restart and env (the reporter's point 4): Reexec, RelaunchBinary and StartBeside pass os.Environ; only the Mac's bundle relaunch (open -n) starts with LaunchServices' env. Filed as #6757, not changed here. With this change MAGPIE_BUN isn't needed. Tests (each red on the old code with a shim for the new test hooks, logs kept): - TestHostWhileBunDownloadStalls: old code, "a caller whose context ended still waits on the stalled Bun download"; now not-ready at 2s, the 100ms caller returns, then the host starts on the download, asked once. - TestHostAfterBunDownloadFailedSaysWhy: old code, a plain 500 error, not BunNotReady; now the 500 is said twice with one ask, Bun() retries. - TestBunOnPathAfterDownloadFailed: old code failed; now 1.4.2 taken, 1.0.0 refused. - TestPluginWhoseBunIsNotReadyFailsOver (gateway, real Handler): old code, "group/mixed still unanswered after 20s"; now 200 from the next member in 0.84s, and the plugin's own model answers 502 "Bun runtime not ready" after ~300ms. Run on mote at |
||
|
|
d7cda856ad |
library: MCP servers turned off fold away below the ones on (hzlxb on X)
hzlxb on X asked for Library -> MCP servers to keep the servers turned off apart, folded, as Providers keeps the providers turned off. The list now holds the servers on. The ones off sit below it, above "+ Add server", under a "Servers turned off (N)" fold drawn with Providers' Turned off markup (row-head off-head, .fold with the chevron, the count in .note). It is folded at first and remembered in localStorage magpie.offServersOpen, as magpie.offProvidersOpen is. A server switched off moves under the fold, and one switched on comes back up. While picking (Select) the fold is held open and disabled, so every server picked is in sight, as Providers holds its fold open while searching. The MCP tab has no filter of its own, so there is nothing else for it to hide from. With every server off only the fold shows. With none off there is no fold. Strings are in en, zh, zh-TW, ja and de. Run: - library-mcp-off-fold.test.cjs (new): Chromium and WebKit, 1100 and 420 wide, en/zh/zh-TW/ja/de. It checks order, label, count, title, aria-expanded, that opening by a wheel-scrolled click leaves the head where it is and opens no editor, the reload memory, moving on a switch, picking, all off and none off. It is red on the old library files (no fold; checked on mica in chromium). - Library/MCP/i18n/click-scroll/providers-off-fold GUI files (102 files, both engines) on mote at the pre-rebase head 29a5f10f9: 2304 of 2310 pass. The 6 reds are library-open-again's 1100px cases, red the same alone on the old tree (filed as #6751). - go test -count=1 ./internal/gui/ on mica at this head: ok (143s). gofmt clean. - The whole GUI suite on mote at 29a5f10f9, in two parts (mote rebooted mid-run; the rest ran after it came back, under suite.lock). Part 1: 411 not ok in 75 files. Part 2 (640 files): 11355 tests, 10911 pass, 444 fail. No red is in the files this change touches except library-open-again (#6751). Every red file has an open issue saying it is red on main: skill-fold-all/skill-manual (#6667, #6668, the window's /api/update/using), skill-group-shared (#6687), view-open-wheel (#4723), view-trackpad-coast (#4724), view-wheel-unheard (#5158), usage-* (#6743, #4263), the rest in #6709 or by name; icon-tile was unfiled and is now #6759 (dim-color from |
||
|
|
923cc8747f |
routing: filtering groups reuses indexed lookups and cards (liu-kan, #6744)
Ported from liu-kan's routing_mod_filter branch at 5aca86598 (#6744). Typing in the Routing groups filter re-ran every member's lookups as a linear .find over all models, deciders, drawers and accounts, and redrew the whole page each keystroke. Now a lazy index (Maps built first-match like .find, splitMember and memberInfo cached, search text cached per group and locale) is rebuilt whenever `groups` is reassigned (it never is mutated in place) and dropped 5 minutes after both Routing pages are hidden. The filter's input redraws only the group list from cached cards, falling back to a full draw when groups or the locale changed. No look, matching or saved config change; no new strings; app.js untouched (client.js is outside the core budget). Measured (mote, Playwright, 4000 models, 20 groups x 20 members, 16 keystrokes, ms per keystroke incl. layout): chromium: before mean 4767.6 / median 5086.3, after 0.37 / 0.2 webkit: before mean 4813 / median 5075, after 0.88 / 1 Run: - go test -count=1 ./internal/gui/ on |
||
|
|
1f04ed2193 |
gui: a form's name and its control share a line in every editor
The owner (11-12, the second time): in a provider editor, Free for me and Redaction sat 4-5px under their ticks. "这个事情发生过不止一次了,要彻底避免。" Cause: each label carried a padding-top guessed for one control, 5px for a 29px input. Any other kind of control, such as a tick, a switch, the icon box, a row of options, a list or a JSON box, sat off its name. Fix, at the shared row layout instead of per row: - Every editor grid sets its rows on their first baseline: .editor, a dialog's .ebody, Advanced's .more .inner and Connect. The per-label padding and label.by-list are gone. - Controls with no text of their own carry a text line at their middle: the icon box (line-height 30px) and the library switch (a ZWSP ::before). - Exception: a row whose control starts with a text field is set at its top, its name padded to the field's line (--field-h, 44px on the narrow web). WebKit lays a baseline row out again on every layout and reveals a focused field each time, so the page jumped back to a new group's name (group-from-model-add). app.js's settleRows marks those rows .at-top (and a JSON box's name .by-json), only in grids a mutation touched. A CSS :has(+ ...) version held WebKit ~9s on Codex's editor (9209ms vs 249ms on base, provider-pass-errors). - Connect's options wrap at <=520px instead of scrolling: WebKit grew a baseline row holding a scroller 6px each time its bar came and went (connect-snippet-shell). - The rate-windows Add button sits at its row's top. - provider-at-once compares the label's text height, not its padded box. The label is still one line; a name beside a 44px field is padded down to its line. Guard: form-align.test.cjs opens the provider editors (a key's, Codex, with Advanced open), the group editors and Connect. For every name and control row it asserts the label's first text line and the control's first line share a vertical centre within 2px. It runs in chromium and webkit, en/zh/zh-TW/ja/de, at 1100, 420, a web 390 and a panel width. LESSONS.md gets the rule. Run (mica, through mica-run): - At the pushed tree (49274f690, the same tree before this message): form-align, provider-pass-errors, provider-at-once, provider-count-free, provider-unmasked, provider-rate-windows, provider-proxy, connect-snippet-shell, group-from-model-add, icon-url, library-mcp-hub, settings-lines-wrap, settings-update-proxy, editor-roomy and i18n-keys: 499 pass, 3 fail at load 75. The 3: settings-lines-wrap chromium de 440 is red the same on origin/main |