ac4af582301a4e8a29245dbba767eba31334ddf9
6816
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e31e3699a8 |
provider: Qoder's mover min is 0.2.28, which waits its turn in Qoder's queue (wallance on Discord)
Qoder 0.2.28 (magpie-community/plugins 26ddabe) answers a queued
request (10605) as Qoder.app 0.4.3's client does: it asks
/api/v2/service/ask/queue/status at the retryAfterSeconds Qoder gives
(0.5s to 30s), and sends the same request again once it is no longer
queued, for up to 4 minutes before the old 503. Raising the min brings
every moved user's plugin up to it.
Run: npm view @magpie-community/opencode-qoder-auth version
--prefer-online shows 0.2.28. gofmt -l clean; go vet on darwin, linux
(-tags nogui) and windows ok; go test ./internal/provider ok at this
tree on origin/main
|
||
|
|
9572a35761 |
usage: dsh sessions in Context go by their titles (Kumo31 on Discord)
Usage -> Context listed DeepSeek Harness sessions as "magpie-a",
"magpie-f" and so on, while Usage -> Sessions showed their titles. Real
dsh 0.2.0-rc.2 sends no session header on its chat-completions and
messages routes. The gateway therefore keys each request by
conversationID, a hash of the first user message. contextOf joined
titles on agent + session id, and a hash never matches a dsh session
id. The responses route sends session_id and was already joined.
- The dsh reader (sessions) records the ids the gateway gives a
session's requests: the first typed user/message and the
session/title-llm-request message. Each is hashed in the forms dsh
sends it: a string, and a text part with or without a cache mark.
The text goes through a JSON.stringify-compatible encoder (jsString),
because encoding/json escapes <, > and &. These ids are
Session.Convs; cacheVersion goes to 22.
- contextOf (joinConvs) puts a route that names no session under the
session its conv id came from. An id two sessions share is left as
it is. The title call merges in and is skipped as a tool-less side
call. The existing title join then finds the session.
Fixture: internal/sessions/testdata/dsh-gateway holds two real dsh
session files and the four requests that dsh sent for them to a fake
upstream: a turn and a title call on each of the completions and
messages routes, headers and body as captured. Only the cwd is
rewritten to /work/proj.
Siblings: other agents that send no session header have the same gap,
but none was run to see what it sends. Filed as #3263.
Run at bc11b8a5f (on origin/main
|
||
|
|
46176fc14f |
settings: every row has its line and the same room above and below its words
The owner (10-22, a screenshot of Settings → General): no line above
"Open at login", and the rows' space above and below differed.
- The line between rows is `.row + .row`; Settings' agent-pref link box
(#agentPrefLinks, empty but while searching) sits between "Provider in
model names" and "Open at login", so that row had none. The row after
the box, and the box's own first row, now get it.
- In the window every row had `body.window .row`'s 7px, which beat
`.row.pref` on specificity: one-line rows were centred by min-height
(13-15px around their words), a row with a line under its name had
7-8px. Every settings row now has 12px above and below; the Language
and Session terminal buttons are 26px as the segments are, so every
one-line row is 51px and a two-line row 61px, in both engines.
- A row's new line now grows it ~12px (was 1-2px under min-height).
hold() kept a view at its top only while the clicked control moved
less than half its height, so turning automatic updates off scrolled
About 12px (#2134 says the view stays at its top). The bound is now the
control's height; #961's ~138px stage still holds the bar.
- turn-done, reset-reminder and usage-alert clicked a switch left under
the window's foot or the tabs; Playwright's scroll to it read as the
page moving. They now reach() it first; update-restart's at-top bound
is "less than the switch's height", not 4px.
Run at this tree (worktree magpie-wt/setrows, base
|
||
|
|
ccbc727818 |
agent, gateway: a Claude model magpie can only ask translated no longer keeps auto mode's server review on (nexnull on Discord)
nexnull (Claude Code 2.1.308, magpie v0.1.1318, DeepSeek 4.1 flash) saw
Claude Code's notice that auto mode's classifier "isn't eligible because
your requests go through 127.0.0.1:3425". The wiring leaves
CLAUDE_CODE_AUTO_MODE_SERVER unset while any model Claude Code can reach
through magpie is reviewed (claudeReviewed), and it judged that by
AutoModeReviewed, which counts a Claude model by its name. A relay that
lists claude-* beside DeepSeek with only a Chat (or Responses) URL, or a
Claude model the user pinned to chat, is asked translated: a probe showed
such a request goes to /v1/chat/completions with no safeguards and no
safeguard_results. So the review stayed on and the notice showed.
AutoModeReviewable (gateway/automode.go) is AutoModeReviewed on a route
that reaches the Messages API: the Claude subscription, or a provider
with an Anthropic URL whose APIs for the model (a user pin first) include
Anthropic. claudeReviewed asks it for the provider and each fallback, so
Claude Code and T3 Code get CLAUDE_CODE_AUTO_MODE_SERVER=0 there. It is
still magpie's own stashed value (claude.auto_mode_server): a user's own
value is left alone, and disconnect or restore takes magpie's off.
serverReview, already on the Messages route, keeps AutoModeReviewed.
Chosen on purpose: any reachable model that is really reviewed keeps the
review on. Writing 0 by mistake would lose server review on Claude
silently, while leaving it on by mistake costs the notice, which Enter
dismisses for 24h. A relay with an Anthropic URL (OpenRouter, AiHubMix)
still counts as reviewable, since some pass the field through. No
client mimicry and no prompt or identity text changes.
Pass-through on Anthropic routes (asked in the same task): no defect.
Probes against a fake upstream showed the anthropic-beta (with
dangerous-tool-use-2026-09-03) and anthropic-version forwarded, the
safeguards body byte-identical, a stream:false reply relayed byte for
byte with safeguard_results and an unknown key intact, and the SSE relay
keeping an unknown key, an unknown event type and toolu ids. The probe
file was removed and is not committed.
Full run at 983425662, the same change one commit back:
- gofmt -l: clean. go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: ok.
- set -o pipefail; go test -timeout 45m ./...: EXIT 0, 68 packages ok,
no FAIL (internal/agent 386s, internal/gateway 507s), run alone after
another session's suite ended.
- TestAutoModeReviewableAsksOnMessages and
TestClaudeReviewedOnlyWhereMessagesReachClaude are red on the old code
("cr/claude-sonnet-5: true, want false"; "a relay without an Anthropic
endpoint: \"\", want 0").
Rebased then onto
|
||
|
|
61b92529e4 |
budget: a window two limits share counts a call once (#2942)
A key with a day and a week limit has both windows start at 00:00 on a Monday; a day and a month do on the 1st. sumsFor gave both limits one *sums, but once it was kept from an earlier call it was appended to the kept list once per limit, and Append adds a call to each kept sums. From the second call of such a day each call counted twice in the day and the week (three times on a Monday the 1st): calls, tokens and cost, so the key was refused at half its day while limit list and Usage, which read the file, showed the right sum (oxsean). A restart hid it until the next call. sumsFor now looks first in the list it is building, then in what was kept, so each window start is kept once. Reserve's holds already took one a window. JoeyWu-tech's 119a09f, as posted; xiedekai's repro (calls and tokens double too) added its checks to the test. TestKeyLimitWindowsThatStartTogetherCountACallOnce runs a day limit of 400 tokens ($4) beside a week, a month, or both, on 2026-10-19 (a Monday), 2026-10-01 and 2026-06-01 (a Monday the 1st), by tokens and by cost, 100 tokens ($1) a call: four calls are let in, the fifth refused on the day at 400, with 4 calls and 400 tokens, and budget.All (what limit list shows) agrees with the refusal. Red on origin/main's budget.go, all six subtests: "call 4 refused with 300 of 400 used; it counts 500", and on a Monday the 1st "call 3 refused with 200 of 400 used; it counts 400". Green with the change. Run: - Full suite, `go test -timeout 45m ./...` (pipefail, log kept whole), darwin arm64, go1.26.8, at 31136c446 ( |
||
|
|
572a1757cc |
sessions: a path listed twice in one read is read once, so the start's warm-up no longer quits magpie (#2932)
Since |
||
|
|
ec7e50b828 |
redact: a decimal's digits are not masked as a number of their own (willz, Discord)
willz on Discord: a tool's JSON with "height": 5.13393848347348 went to
the vendor with part of the number as a placeholder. A run of digits
right after the point of a decimal, or right before it, was judged on
its own: 0.13800138000 went as 0.{{PHONE_…}}, 6.4111111111111111e-3 as
6.{{BANK_CARD_…}}e-3, 1.110105194912310038 as 1.{{ID_CARD_…}}, and
13800138000.5 as {{PHONE_…}}.5. The rules' bound only kept digits off
either side, not a point with a digit beyond it.
mask now drops, after noIDs, any span of a personal-data kind (kindCats:
PHONE, BANK_CARD, ID_CARD, SSN, IP, the model's ACCOUNT and PHONE, …)
that starts with a digit after "<digit>." or ends with a digit before
".<digit>" (noDecimals, inDecimal). It is one choke point for every
finder: the rules, the local model's spans and values known from
before. Not changed: secrets (a key or password masked once is masked
wherever it is, a decimal's digits too), the user's words and rules,
and the signed-thinking path, which re-masks only secrets. A phone
number or card standing alone, in text, after a colon, in a JSON
string, or at a sentence's end ("13800138000.") is masked as before.
A number list written "1.13800138000" with no space now goes as
written; a comma decimal (5,13800138000) is not treated as one.
Reporter's literal: at
|
||
|
|
86254d4049 |
tests: an unreachable upstream is 127.0.0.1:1, not a closed server's port
TestCodexOwnModelUnreached went red on ubuntu CI at |
||
|
|
0ddcf28a1d |
redact: a backend's id (a UUID, 32+ hex digits) goes as written, never a piece of it
The owner found UUIDs masked, and a backend looks an id up by every
character: a masked one, or half of one, finds nothing or the wrong row.
A probe with every kind on and the model labelling each value found five
ways a UUID went masked:
- a piece of one: PHONE took 13800138000 at the end of
…-a13800138000, BANK_CARD took 4111-1111-1111-9007 across a UUID's
groups, and the id went half a placeholder;
- the SECRET rule in a field named for an id, a cursor or a request:
secret_id, token_id, api_key_id, access_key_id, next_page_token,
nextPageToken, csrf_token, trace_token, secret_hash;
- the bare "key" rule ("key": "<uuid>", Idempotency-Key);
- the serial rule (sn:, Serial Number:);
- the model labelling a UUID a name, an account and so on (only
"secret" was held back before), and a phone number masked earlier
being found again inside a UUID.
noIDs (internal/redact/ids.go) drops, after every finder, a span that is
a piece of an id, and a whole id unless the user's own words or rules
found it, a PASSWORD/API_KEY/TOKEN/PRIVATE_KEY rule did, the SECRET rule
did in a field named for a credential (password=, api_key=, X-Api-Key,
refresh_token, session_token, token), or it was masked before in full.
32 hex digits without hyphens the model calls a secret in prose ("the api
key is 9f8e…") stay masked; a UUID it calls one does not, as before.
Run in ~/workspace/projects/magpie-wt/mask-act at this tree:
- TestIDsGoAsWritten: 7 id shapes × 22 contexts kept, 7 credential
contexts masked, the model's every label kept, a known phone not found
inside an id, a phone and a card number of their own masked, the user's
word masked. With noIDs taken out of mask(): 108 failures; restored: ok.
- The first full redact run caught two of my own mistakes, now fixed:
idAround didn't check the run's inside, so a 33-character IPv6 address
counted as an id (TestMoreKinds), and the model's 32-hex API key went
unmasked (TestModelSecretIsNoID).
- go test ./internal/redact ./internal/maskrec ./internal/gwmw
./internal/settings ./internal/gateway (-timeout 45m, -count=1): all ok (gateway 439s)
- gofmt -l: none; go vet ./internal/redact for darwin, linux, windows: ok.
Not tried: a real request through a running gateway with the local model
on; the model's labels are simulated with fakeModel.
|
||
|
|
053fc2f2b6 |
provider: Kiro's mover min is 0.1.14, each account named "email (Google)", "email (GitHub)" (plugins#309)
kiro 0.1.14 (magpie-community/plugins 7fdc07f) names a sign-in by its
email and the way it was signed in to, so two Kiro accounts of one email
no longer read "email (slot)". An account kept by its bare email is
renamed on its first request, usage read or renewal. npm has 0.1.14
(npm view --prefer-online, at landing).
Run at
|
||
|
|
8a99473ed9 |
gui: the local model's row under Found by takes a dot, not a sparkle
The owner dislikes the sparkle beside 本地模型 in the Privacy card's Found by ledger. The row now takes the same 7px dot as every other row, in the local model's colour (--c6, which its meter already uses). The SPARK path and .mo-spark rule are gone; the row keeps its .model class. Run at this tree: masking-records, mask-actions, privacy-model and i18n-keys GUI files, chromium and webkit, every language and width: 71 of 71. Not run: go test ./internal/gui (the disk has 126MB free and the build failed writing its archive); CI runs it before any tag. |
||
|
|
c4551dfcac |
provider: moved Kiro accounts take plugin 0.1.13, which keeps one email's Google and GitHub sign-ins apart (plugins#309)
molvqingtai on Discord: a Kiro account signed in with Google and another signed in with GitHub under the same email are two Kiro accounts, but the second sign-in replaced the first. The plugin named both by the email, and the plugin host's settle replaces an account whose name matches unless both carry a uid that differs. Kiro 0.1.13 (plugins d767d1c) saves the login provider as uid, and gives accounts saved before it theirs on their first request, usage read or renewal. Raising the min updates every moved user's plugin. npm view @magpie-community/opencode-kiro-auth version --prefer-online --registry https://registry.npmjs.org: 0.1.13. Run at this head (on origin/main): - gofmt -l internal/provider: nothing; go vet ./internal/provider ok for darwin, linux -tags nogui and windows. - go test -timeout 30m ./internal/provider: ok (89s). Not run: the full suite. The disk has 1.3Gi free, under what a full run needs; this changes one string in the mover's table, which the provider package's mover tests read. Not tried: real Kiro accounts (none here). |
||
|
|
ea6be15927 |
provider: Qoder's plugin min is 0.2.27 (plugins #304)
qoder 0.2.27 (plugins 6219a71) answers a check-in on a computer that
has no Qoder runtime-info helper (no Qoder desktop, no signed-in Qoder
CLI, no QODER_RUNTIME_INFO) as ineligible, with what to install once.
Before, it came back failed, and magpie said "签到失败,magpie稍后重试"
and asked again all day with no chance of success. A helper that is
there but fails stays failed and is retried. Raising the mover's min
updates every moved user's plugin.
npm view --prefer-online --registry https://registry.npmjs.org shows
0.2.27 for @magpie-community/opencode-qoder-auth.
Run at this commit's tree (on origin/main
|
||
|
|
3334386385 |
provider: Factory's plugin min is 0.1.37 (plugins #302)
factory 0.1.37 (plugins bb020ce) drops only the billing header's own
line from a system block or string, so instructions joined after it,
such as Claude Code auto mode's classifier policy, reach the model.
Raising the mover's min updates every moved user's plugin.
npm view --prefer-online --registry https://registry.npmjs.org shows
0.1.37 for @magpie-community/opencode-factory-auth.
Run at this commit's tree (on origin/main
|
||
|
|
c036d6c34a |
gui: what the window shows can be selected and copied, its controls can't
Outvi V on Discord: the page is user-select: none as a whole, so nothing could be selected or copied into a bug report, only the few places that opted in. Two rules at no specificity after body in app.css now make content selectable: paragraphs, pre and code, a detail's values (dd, td), hints, notes, every error class (.err, .error, *-err, *-error), a conversation (.sess-talk, a subagent's too), a request's story and log on Routing (.rt-log, .rt-steps, .rt-time). Controls stay unselectable with what is in them, as in a Mac app: buttons, labels, summary, select, the navigation, menus (.pop), tabs, switches, segments, grips, draggable rows. With no specificity, a view's own rule still decides (a list being sorted, a blurred value), and a field stays a field. An account's or a key's name was selectable by accident through its row (a button inside .accts > [data-account-id]); .acc .rename now says so itself, and account-arrange keeps checking it. user-select.test.cjs: on Routing, a mouse drag across a vendor's error in a request's story selects it; a drag across a request's row selects nothing, and the row still opens on a click with text selected elsewhere; no nav, button, tab, segment or option is selectable, and no field is unselectable. Both engines, en/zh/ja/de, 1100 and 420 wide: 16/16, twice. Red on HEAD's app.css (16/16 fail: 'none' !== 'text'). Ran: click-scroll 22/22, agent-grip 10/10, provider-order 6/6, search-order 16/16, account-arrange 2/2 (red in chromium before the .acc .rename line), account-alias 20/20, panel-arrange 8/8, sessions-talk 4/4, sessions-subagents 40/40, usage-ledger-detail 6/6. Not tried: the app's own webviews (WKWebView, WebView2, WebKitGTK); only Playwright's Chromium and WebKit. Run for this batch of seven commits (devin, routing zh, qoder, masked words any case, Long conversations, Claude subagents, user-select), in a worktree, sandbox HOME, never against live configs: - At e352cc823 (tree ea497c9f5, on origin/main |
||
|
|
2ea148b103 |
gui: Claude Code's unset subagents read "Claude Code's own pick", not "same as model"
KorenKrita on Discord wanted Claude Code's subagent model left unset so
Claude Code picks. magpie already leaves env.CLAUDE_CODE_SUBAGENT_MODEL
out when the field is unset (writeTiers deletes it, setSubagent too),
but the GUI called unset "Same as model", which says the subagents run
on the main model. They don't: Claude Code 2.1.306 (read from the
installed binary) takes the Agent tool call's model, then the subagent's
frontmatter model, then the variable, then the lead's model; the
built-in Explore inherits, capped at opus.
The unset option is now "Claude Code's own pick", its note "{model}
unless the lead or the subagent names another", and the field's title
says what a model set there does. Translated in zh, zh-TW, ja and de.
Codex keeps its own lead's-pick wording.
Tests:
- TestClaudeSubagentsUnsetWriteNothing: routed, pick a model, take it
back, move the main model; the variable stays absent. Red when
writeTiers writes the main model for an unset sub (broken by hand).
- claude-subagents-pick.test.cjs: 5 languages x 2 widths x 2 engines,
20/20. Red on HEAD's app.js and i18n.js (chromium 0/10).
- Ran: codex-subagents-lead 20/20, claude-auto-mode 8/8, desktop-tiers
4/4, tier-effort 8/8, i18n-keys 3/3; go test -run TestClaude
./internal/agent ok.
Not tried: a real Claude Code session picking a subagent model with the
field unset.
Run for this batch of seven commits (devin, routing zh, qoder, masked words
any case, Long conversations, Claude subagents, user-select), in a worktree,
sandbox HOME, never against live configs:
- At e352cc823 (tree ea497c9f5, on origin/main
|
||
|
|
9691997bb0 |
gui: Long conversations stays in Settings when no Codex or Claude Code is here to hold it (Linka)
Linka on Discord runs magpie in Docker, with no agent installed. |
||
|
|
dd7915243b |
privacy: masked words can match in any case, by a switch under Masked words (ZoeCats)
Settings › Privacy's masked words (脱敏词) were matched as written:
Nightjar masked "Nightjar" and let NIGHTJAR and nightjar go to the
vendor. A new row under them, "Masked words in any case", makes each word
match in any capitals (Unicode simple folding, so МОСКВА matches Москва
too), with no rule to write. It is off by default and for every existing
user: settings.json without redactWordsAnyCase reads false, and a page
from before it that saves without the field keeps what was set
(api.go, as noAutoDownload). Each match goes as {{TERM_…}} and comes
back as it was written in the request. Translated in zh, zh-TW, ja, de.
redact.Options.WordsAnyCase; settings.RedactWordsAnyCase
(redactWordsAnyCase) reaches it through internal/masking; prefsKeep
sends it on every Settings save.
Tests, each red when its part is broken by hand:
- TestWordsAnyCase (internal/redact): with the any-case branch skipped,
FAIL "any case: \"NIGHTJAR\" still in …" and NIGHTJAR left in a request.
- TestCountTokensRedacted/words_any_case (internal/gateway): with
masking.go not passing the setting, FAIL "system, message and tool
description must be masked: …NIGHTJAR…"; words_as_written holds that
the default leaves NIGHTJAR alone.
- TestSettingsRedactWordsAnyCaseKept (internal/gui): with the
not-sent guard removed, FAIL "after {…no field…}: any case false".
- redact-words-any-case.test.cjs: 20 of 20 (Chromium and WebKit, en,
zh, zh-TW, ja, de, 1100 and 640px). With the old app.js it times out
waiting for #redactWordsAnyCaseRow; with only prefsKeep's field
removed, WebKit fails "a later save keeps it".
Not tried: a real vendor request with the switch on; the gateway test checks the body that goes out.
Rebased over
|
||
|
|
7b888f2c24 |
qoder: moved Qoder and Qoder CN users get plugin 0.2.26, whose Codex requests hit Qoder's cache (plugins #290)
0.2.26 (plugins dc59000): a request from Codex marks its prompt for Qoder's cache the way Qoder's own client does, so the Ultimate model's cache hits are no longer 0% (plugins #290); the international check-in finds the runtime info of a machine-wide Windows install under Program Files. keepMovedCurrent now updates every moved qoder and qoder-cn user. npm view @magpie-community/opencode-qoder-auth version --prefer-online --registry https://registry.npmjs.org printed 0.2.26 when the min was raised, and @0.2.26 resolves. No new test: the change is the mover's version string. Not tried: a real moved Qoder account updating to 0.2.26. Run for this batch of seven commits (devin, routing zh, qoder, masked words any case, Long conversations, Claude subagents, user-select), in a worktree, sandbox HOME, never against live configs: - At e352cc823 (tree ea497c9f5, on origin/main |
||
|
|
39e5964353 |
routing: an error that may pass reads 暂时性错误 in Chinese, not 会过去的错误 (Outvi V)
The group's "Every member busy" hint and the two Routing lines that say a group or a lone member is asked again called the error "会过去的那种", "以会过去的错误失败了" and "此类失败可能很快恢复": hard to read, and three words for one thing. zh now says 暂时性错误 in all three, zh-TW 暫時性錯誤. ja already said 一時的なエラー / 一時的な失敗 and stays; de's lone-member line said "ein Fehler, der vorübergehen kann" beside "vorübergehender Fehler" in the other two, and now says the latter too. English is unchanged. git grep for "may pass" finds no other string, in Go or the GUI, with this term. group-patience.test.cjs checks the three strings name 暂时性错误 (zh) and 暫時性錯誤 (zh-TW). With the old i18n.js put back it fails, listing the three zh strings; with the change, 4 of 4 pass (Chromium, WebKit, en and zh). Not tried: the strings in the real app; only Playwright's Chromium and WebKit. Run for this batch of seven commits (devin, routing zh, qoder, masked words any case, Long conversations, Claude subagents, user-select), in a worktree, sandbox HOME, never against live configs: - At e352cc823 (tree ea497c9f5, on origin/main |
||
|
|
fc2810e1a6 |
devin: moved users get plugin 0.1.23, which keeps organisations under one email apart (plugins #296, #297)
The Devin mover's min is now 0.1.23, so keepMovedCurrent updates every moved Devin user to it: - 0.1.22 (plugins a20c1b9, #296 by whofly2016): an account in more than one Devin organisation under the same email is signed in once per organisation, named "<email> · <org>" and keyed by its orgId/teamId, each with its own Coding Plan quota; before, signing in to the second organisation overwrote the first. - 0.1.23 (plugins 397a890, #297 by mameikagou): a reply with only usage or metadata is refused before the stream starts, not passed on as an empty success. npm view @magpie-community/opencode-devin-auth version --prefer-online --registry https://registry.npmjs.org printed 0.1.22 at 18:25 UTC and 0.1.23 when this landed; @0.1.23 resolves (sha512-cHVTcK6q…). No new test: the change is the mover's version string. The host-side half of #296 (uidOf reading orgId/teamId, the own account's label) is yetone/magpie#3198, still open and not in this commit. Not tried: a real moved Devin account updating to 0.1.23. Run for this batch of seven commits (devin, routing zh, qoder, masked words any case, Long conversations, Claude subagents, user-select), in a worktree, sandbox HOME, never against live configs: - At e352cc823 (tree ea497c9f5, on origin/main |
||
|
|
4a87c4476d |
provider: Zed's mover min is 0.1.11, where a system message inside an Anthropic request reaches Zed as user text
Roy on Discord: Claude Code through a Zed subscription failed with "400
Zed: failed to parse Anthropic request: unknown variant system, expected
user or assistant". Claude Code puts {role: "system"} messages inside
messages[] (a turn's effort, hook notices after tool results); Zed's
cloud takes only user and assistant there. Plugin 0.1.11
(magpie-community/plugins 3d355d3) sends their text in a user turn
where it was said, and leaves an effort-only one out. Raising the min
lets keepMovedCurrent bring every moved Zed user up to it.
npm: `npm view @magpie-community/opencode-zed-auth version
--prefer-online --registry https://registry.npmjs.org` answered 0.1.11
before this change.
Run at
|
||
|
|
7dd965ed22 |
gui: the tray's allowances show without their history, and stay as drawn when nothing changed (#3192)
parkavenue9639 found three things on the tray panel's Allowances tab: - loadQuotas waited for /api/usage/quotas/history (45 days, and a remote magpie's too) in one Promise.all with the allowances, so the skeleton stayed until the curves' history came. The history is now read on its own (loadQuotaHist); the cards are drawn as soon as the allowances are in, and drawn again when a history that differs lands. Of two history reads on their way, the later asked stands. - The window coming back (focus, visibility) ran renderPanelQuota from load() and again when the quotas came, each a rebuild of cards that had not changed (and, while loading, a restart of the skeleton's shimmer). Those two calls are now lazy: the panel is drawn only when something it draws from changed (the allowances, a new history, used or left, the curves' range, folded options, the settings, language, tab, peek, arranging, or the minute, for its clock deadlines). Every other caller draws as before. - renderQuotas went on to build the Usage page's cards, trend and curves in the panel, which never shows that page. It now stops after the panel's own draw there. renderQuotas' local `const mode` (the Used/Left picker) shadowed the page's mode, so the new panel check hit its temporal dead zone; it is `pick` now. The fold check `mode !== "panel"` beside it compared that element, so it was always true; it is dropped, which changes nothing. Tests: panel-quota-lazy.test.cjs, every language, 440 and 360 wide, Chromium and WebKit: with the history held the card is drawn and no skeleton is left; the panel draws no #subscriptionUsage cards; loadBack with the same answers keeps the card and group nodes; a changed allowance is drawn. tray-cell-click waited for the card to be replaced after the window's focus; with the same allowances it is kept now, so it waits for the refresh to finish and checks the highlight on the card as drawn. Red 4 of 4 at the old wait, green with the new one. Run: - panel-quota-lazy at the old app.js: red in every case; at this change 20 of 20. - The whole GUI suite (826 files, --test-concurrency=3, load 40 to 90) at e0abb65ff on |
||
|
|
b0d46ca7fe |
gateway: a routing group's reply has its DSML close and finish mended as a member's own does
喜欢一个人 on Discord later said the model alone works and only their routing group "DeepSeek-V4.1 flash" (several entries of the model, in order, fallback last) breaks from Alma. TestDSMLThroughGroup sends the reporter's bytes through such a group: a native call followed by "\n</||DSML|| calls>" cut inside the full-width pipes, and the whole text-written block, answered by the first member and by the second after the first's 500, on Chat streamed and whole, Responses streamed and whole and Anthropic streamed and whole. Each must give the exec_command call, no DSML, no stray "\n" message, finish tool_calls / stop_reason tool_use, nothing of the refused try, and the tries counted. Alone vs group, read in the code: the tidy is the same. textCallTidy, chatTidy and chatWhole are set up in passthrough, textCallSee in translate and streamTranslated, per try inside attempt; none of them is keyed on the model, provider or group (chatToolNames reads the request's tools), and holdWriter drops a refused try's held bytes and switches on FirstToken only before anything was let through (started()). So the group path leaked exactly what the model path leaked, which the two commits before this fix. What a group does change is what the upstream is asked: a member the catalog marks as not reasoning (quietTo) is sent no reasoning ask in a group only, and a FirstToken group moves on from a slow member. Either can change how the model writes its reply (thinking off), which is a likely reason the reporter saw the residue only through the group; neither bypasses the tidy. Ran: the test at this head, ok. At origin/main |
||
|
|
9a0df964e4 |
gateway: a relayed Chat reply that made calls and ended "stop" ends "tool_calls", streamed and whole
喜欢一个人 on Discord (v0.1.1299, deepseek-v4.1-flash through a relay, usage row stop "stop"): the agent loop ended mid-turn. Their first ask: when a reply calls tools, finish_reason must be tool_calls on every path. Checked each path on origin/main |
||
|
|
d1173c8c16 |
gateway: DeepSeek's calls close left in a reply's text (</||DSML|| calls>) is dropped, after a call the upstream made too
喜欢一个人 on Discord (v0.1.1299, macOS arm64, a Responses client translated to Chat, deepseek-v4.1-flash through a relay, 232312 in / 645 out, stop "stop"): the client got the text "\n</||DSML|| calls>" and the agent loop ended mid-turn. Their history has ||DSML|| calls> 712 times against 133 <||DSML||invoke. Reproduced on origin/main |
||
|
|
c358e76607 |
zcode: on Windows, write where ZCode reads, %HOME% before %USERPROFILE%
Gearclickist on Discord: magpie connects ZCode without an error, but
ZCode on Windows never lists magpie as a provider; on a Mac it does.
ZCode 3.14.3 (the same JS in the Mac and Windows builds, diff -rq of the
extracted app.asar) picks its data folder from setting.json's dataBaseDir,
then ZCODE_DATA_BASE_DIR, then process.env.HOME, and only then
os.homedir() (USERPROFILE). magpie used Go's home, which on Windows is
USERPROFILE. With HOME set (Git Bash, MSYS2, Emacs and the like), ZCode
reads %HOME%\.zcode\v2\provider_config.json and magpie wrote
%USERPROFILE%\.zcode\v2\..., a folder ZCode never opens. On a Mac HOME is
Go's home too, so the two always met.
appdir.ZCodeHome gives %HOME% on Windows when it is set, absolute, and
the folder asked about is USERPROFILE (a folder given on purpose is
kept). The agent target, the ZCode credential and team readers and the
library target use it. ZCode's CLI database stays under USERPROFILE (seen
on Windows below), so the sessions reader is unchanged; its comment says
why.
Run:
- go test ./internal/agent/ -run TestZCode; the new
TestZCodeOnWindowsUsesTheHomeZCodeReads forces zcodeOS=windows with
HOME and USERPROFILE apart. Broken by hand (ZCodeDataIn(home) back in
zcode()): red, "ZCode's folder on Windows with HOME set: .../001/.zcode
... want .../003/.zcode".
- gofmt -l; go vet for darwin, linux (-tags nogui) and windows.
- Windows box, sandbox folders only, HOME and USERPROFILE set apart:
ZCode 3.14.3 for Windows, extracted and started there, kept its logs,
workspace and provider_config.json under HOME\.zcode\v2 and only
cli\db under USERPROFILE. The old magpie.exe's `zcode provider magpie`
wrote profile\.zcode\v2\{config,provider_config}.json (the bug); this
build's wrote home\.zcode\v2\..., beside ZCode's own files, and nothing
under the profile.
- Full suite (go test -timeout 45m ./..., one at a time on the box):
68 packages ok, exit 0, at d87be7f13 and again after rebasing onto
|
||
|
|
b00c82acfa |
masking: each kind is masked, sent with a warning or held back; a Never mask list and Try it (#1977)
Settings › Privacy gets two sections under What to mask:
- When a value is found: Mask, Warn or Block per kind (redactActions;
a kind left out is masked). Warn sends the value as written and records
it with a placeholder nobody remembers, not counted as masked. Block
masks it as before and the gateway answers 400 naming the kind and the
value's hint, never the value, with nothing sent (maskBlocked); the
record is kept as Blocked. The secret kinds come first, the personal
ones behind Show all kinds. A Never mask list (redactAllow) lets a whole
value go as written in any case; a longer value it is part of is masked.
- Try it: POST /api/masking/preview masks a text as a request would
(redact.Preview) and remembers nothing: no placeholder stands for it
afterwards and its values aren't masked later as seen before. The page
shows the vendor's text, what was found and what would be done, and
keeps the text in no storage.
The masking card counts requests held back and values sent as written; a
call whose values only went as written gets an amber badge on Recent calls
and the Routing log. zh, zh-TW, ja and de throughout. Docs: gateway-routing
and gui-shell.
Broken by hand: the new GUI badge assertion fails on the old maskedBadge
(no .warn badge drawn); TestSettingsSaveKeepsWhatItDoesNotSend went red
until the two settings were in its fixture; "{n} held back" turned
i18n-keys red against the routing plugin's "{n} held" and was renamed.
Run at this tree (base origin/main
|
||
|
|
9b0f48612b |
gateway: a plugin's model that searches by itself can be the web searcher
01huadalang (Discord #feedback, 10-20): Settings › Web search offered only Antigravity; Trae's search model couldn't be picked, "可能也有别的模型能搜索 但是识别不到". partSearcher and modelSearches answer false for every provider with an account behind it, so no plugin-served provider was ever offered, and a plugin had no way to say which of its models searches. A plugin now marks such a model with `searches: true` (in its config models or the list its models hook gives). host.js passes it on, plugin.Model carries it, and pluginCatalog makes it WebSearch "native". partSearcher offers a plugin provider with such a model, with those models only, at rank 4 (as Command Code's search models); remoteSearch asks it in plain words, the way it asks Command Code's. A client's own web_search sent to that model still goes to magpie's searcher (searchesModel is unchanged): the plugin's upstream takes no web_search tool. Behaviour change: a marked plugin model ranks ahead of Antigravity and Google (rank 5) when magpie picks the searcher itself. Run: - TestPluginSearchModelIsASearcher (new; a fake plugin's model marked searches answers a weather question with a URL): red on the old code (the picker offers [], want the plugin's fake-search alone), green now. - Broken by hand: host.js without the `searches` passthrough; the test goes red at the picker. - gofmt -l clean; go vet darwin, linux -tags nogui, windows on gateway, plugin, provider, catalog. - set -o pipefail; go test -timeout 45m ./... at this tree: 68 ok, no FAIL. Not tried: the Trae plugin itself. It declares nothing about search yet; marking Trae CN's search_agent there needs a Trae account to try it with, which this machine doesn't have. No GUI files changed. |
||
|
|
6fc532198f |
provider: a CLI's sign-in is asked again only when its files change (#3185)
magpie asked each agent CLI who is signed in once a minute, for as long
as it ran. cursor-agent is a Node program that asks Cursor's servers:
~0.5s of CPU and ~200 MB each time. devin auth status took ~1.9s wall.
On a laptop that is a process spawned every minute, all day.
cliIdentity now takes a mark: a cheap fingerprint of where the CLI keeps
its sign-in (Cursor: authInfo in ~/.cursor/cli-config.json; Devin: a hash
of its credentials file). While the mark reads as it did when the answer
was asked, nobody can have signed in or out, and the CLI is asked again
only after 30 minutes. A changed mark, or one that can't be read, is
asked at once as before. The mark is a file read, never the keychain, so
nothing that can block runs under the identity's lock.
Run:
- TestCLIIdentityAskedOnASignInChange: red with unchanged() forced false
("sign-in unchanged, a minute on: asked 2 times"), green with the fix.
- go test ./internal/provider -run 'CLIIdentity|Cursor|Devin': ok.
- Real use: magpie serve in a sandbox HOME holding copies of the owner's
Devin and Cursor CLI installs and sign-ins, Providers open in WebKit,
every child of serve logged every 0.3s for 5 minutes, caches warm:
origin/main
|
||
|
|
21fb17e4df |
gateway: a remote magpie's list carries only the decision models picked there (GokoShiki)
GokoShiki on Discord: the remote magpie's Gateway page showed the 24 models picked there, and this magpie, with it added as a Remote magpie, listed 51, the extra ones OpenRouter's. /v1/models, asked by another magpie with X-Magpie-Deciders, added provider.Deciders(): every decision model of OpenRouter (and of a plugin, a remote magpie, a Bailian plan), picked or not. This magpie read each one as a model of the remote's, and with no picks of its own exposed them all. It now adds OfferedDeciders, the ones the remote's own group pickers offer since coeo91's report: with picks saved, the picked ones; with none, every one, as before. TestRemoteMagpieListsThePicks runs two magpies: the remote under one HOME with OpenRouter (two chat models and one decision model picked of 40 + 27), DeepSeek (one picked) and a fake Grok plugin; this magpie under another HOME adds it through an httptest server serving the remote's real /v1/models reply, and must expose exactly the remote's picks, plugin and DeepSeek models included. Run at this tree (on origin/main |
||
|
|
a80b1f2208 |
Revert "redact: more file names that read as addresses stay as written (willz on Discord)"
This reverts commit
|
||
|
|
b35e6a8b57 |
redact: more file names that read as addresses stay as written (willz on Discord)
willz (#feedback) asked to tell image names like image@2x.png apart from emails. |
||
|
|
b1a2eec2c1 |
gui: the warm-up reads Codex's effort under the tight GC too
The warm-up's last step reads Codex's per-thread effort from the whole ledger right after the usage page's read, while that page still holds every row (~300 MB live on the owner's history). It ran at GOGC 100, so the heap was let grow to about twice that: a heap profile every 2 s of a cold start showed heapSys going 342 -> 622 MB while live stayed ~300, in the seconds after QueryPage returned. It now runs under underTightGC like the usage read. Footprint (phys_footprint, what Activity Monitor shows), cold start on a clone of the real history (15,176 files), alternating, two runs each: |
||
|
|
b3f5953495 |
routing: an open group's heading looks as every editor's does, not as the Models fold chip
The owner, 10-21: on an opened routing group the heading's space above
differed from below, and its line curved at the ends. The heading had
the class .fold to fold back into its row, and .fold is the Models
head's chip: padding 3px 6px 3px 4px, a 6px radius, the faint colour and
a pill background on hover. On the heading that gave 3px above against
8px below, rounded ends on its bottom line, a dimmed name and a box over
it on hover. It now has its own class (folds), which keeps the pointer
and adds a focus ring; the layout is .editor .ehead's, as on every
other editor.
Run on origin/main
|
||
|
|
083b1c8e7c |
gui: masking's flow draws whole curves in the middle's own pixels
The flow from agents through the shield to vendors drew its ribbons in a 0..100 viewBox stretched to fit, with a pathLength-1 dash left on each after the draw-in, so at most widths they showed as broken dashes, and the nodes stretched as wide as the card. Now the curves are drawn in the middle's real width (again as it is resized), wider and darker by their share, and a draw-in dashes them by their own length and clears it after. Dots run along each curve, grey on the way in and accent after the shield, unless motion is reduced. The nodes are at most 200px and the flow at most 760px, centred; the shield sits in two quiet rings. No gradient. Run: screenshots in Chromium at 1100 and 2000px (light, dark) and WebKit at 640 and 1100px: every curve whole, no page error. |
||
|
|
4042aa4d1d |
usage: a row keeps the strings its chunk shares once, in Shapes
The usage page holds every row of the period at once, and a packed row was 328 bytes, 140 of them 35 string ids. On the owner's real history (364,013 calls in 6,445 chunks) only five of those vary call by call: the error, the request id, the archive, the response id and the message id. The other 30 (agent, provider, model, session, endpoint, client...) repeat for most rows of a chunk: 364k rows have 7,300 distinct sets. So a row keeps those five ids and a Shape, an index into its chunk's Shapes table, which holds every other set once. packedRow is 216 bytes. A snapshot (process-private, nothing on disk) writes the table once after the strings and per row the shape and the five ids, so archives shrink too. block() renames and re-prices per shape, not per row. Same output: |
||
|
|
f5b0157420 |
gateway: a tool Claude Code's tool search loads goes to OpenAI's Responses API where it was loaded (#2660)
Through /v1/messages translated to a Responses provider, every deferred
tool ToolSearch loaded joined the top-level tools on the next request, so
the prompt changed from its first bytes and the cache missed on each load
(maximia's probe: cached tokens dropped on every request after a load).
Now, where Request.LoadedInPlace is set, a deferred tool (defer_loading,
Tool.Deferred) that a tool_result's tool_reference names (toolRefs,
Part.Loads) goes in an {"type":"additional_tools","role":"developer",
"tools":[...]} item right after the run of tool outputs that loaded it,
once, and not in tools (buildResponses). Parallel results and one result
naming several share one item; a tool named again isn't repeated; the
output's text is as before. A history whose loading result is gone
(compaction, edits) puts the tool back in tools: a new prefix, expected.
Scope (loadsInPlace): OpenAI's own API with a key (api.openai.com,
*.api.openai.com), whose tool search guide documents the item and says
its tools load at the end of the context so the cache is kept; and a
provider the user sets with `magpie provider set <id> additional-tools=on`
(Provider.AdditionalTools, kept by the GUI's save like codexAsSent).
Nothing else: xAI answers the item 422 (#350), the ChatGPT backend has
been seen taking it only for Codex's Responses Lite, Azure, plugins and
relays are untried. An upstream that refuses a request holding the item
with a 400/422 naming additional_tools is asked again with every tool in
tools, logged ("turned away additional_tools ... loaded tools go in tools
from now on") and not sent the item again while magpie runs.
Not handled: a tool a tool_addition block in a system message loads (MCP
late tools, the advisor) stays in tools. Not tried against a real
upstream: no OpenAI key or custom Responses relay was used; the item's
shape and position follow OpenAI's docs, and the fixtures follow
maximia's three-request probe (Claude Code 2.1.302) and the
tool_reference shape Claude Code 2.1.306's binary writes.
Tests: TestLoadedToolsKeepThePrefix (top-level tools and instructions
identical across the three requests, each input a prefix of the next),
TestLoadedToolsInOneItem (parallel, batch, repeat), TestLoadedToolsWhereNotTaken
(unsupported upstream unchanged; compacted; non-deferred),
TestLoadsInPlaceScope, TestLoadedToolsThroughTheGateway (off by default on
a relay, on with the flag, refusal retried without the item and not sent
again), TestAdditionalToolsPair (CLI). Broken by hand: with the
buildResponses placement disabled, the first two and the gateway test go
red; with the refusal retry disabled, TestLoadedToolsThroughTheGateway
goes red.
Run at cff7dc67d (this change on
|
||
|
|
52209522a0 |
gui: the masking card is flat and shows the lines the vendor got
The owner found Settings › Privacy's summary card unrefined: a glow behind it, a gradient on the number, a gradient banner for the local model, a gradient area chart and gradient ribbons. It is redrawn in flat colour, with one new part that shows what masking did. - The number is larger (52px, 600), and the days under it are a bar a day on a hairline. Today is in the accent, the other days are a quiet grey and a day with nothing is a dot. Pointing at a bar says its day, as the chart did. - What the vendor saw: the newest lines around masked values, from /api/masking/records?limit=12 (read again with the summary every 15s). Each placeholder is in its kind's colour and says what it stood for while pointed at. On first show a marker is drawn over each one and lifted to the placeholder. It is left out when no line is in memory, as after a restart. - What was kept and Found by are two columns of rows: a dot, a name, a count and a hairline meter of its share. Each row opens its records, as the chips did. The local model's banner is now its row under Found by, with the old sentence as its tooltip. - Agents to vendors are joined by hairlines whose weight and opacity follow their share, around an outlined shield with no glow. - maskSnipTexts and maskPlace are shared with the records view, which drew the same lines and placeholders. masking-records.test.cjs checks the bars (zero days as dots), the rows, the model row, the vendor's line with both placeholders, a placeholder's value on hover, a kind's row opening its records, and that nothing in the card has a gradient. Run at this head (origin/main |
||
|
|
62a3e79b7b |
redact: more file names that read as addresses stay as written (willz on Discord)
willz (#feedback) asked to tell image names like image@2x.png apart from emails. |
||
|
|
82fb0702fc |
gateway: a test run fails when any route writes a held request body in place
A held body is shared, not copied: decodeJSON's strings point into it, and factsOf reads it once for every later reader. Writing it in place would change what those readers see. Nothing guarded that. In the gateway's tests only, checkHeldBody records a held body's hash when it is listed and compares it at its release. TestMain fails the run, naming the body, when one changed (heldWrittenAfter). Production code pays one nil check per hold. No change in allocations (BenchmarkLargeRequest anthropic 45.58 MB/op before and after; the hook is nil outside tests). TestHeldBodyWrittenIsCaught writes one byte of a held body and expects the guard to catch it, and a body left alone not to be reported. Broken by hand (the comparison replaced with `_ = unchanged`): red, "a held body written in place was not caught at its release". The whole gateway package passes with the guard on, so no route writes a held body today. Run (darwin arm64, go1.26.8, sandbox HOME, load 40 to 90 from other sessions' suites): - go test ./... -count=1 -timeout 45m on the series' final tree at |
||
|
|
47ca891b1b |
gateway: a request's capture for Recent calls is copied once, not twice
captureRequestBody wrote the body's first 256 KiB into a bytes.Buffer and then copied the buffer into a string: 512 KiB allocated for every request of 256 KiB or more. It is now one string conversion of the same bytes, and the same truncated flag. BenchmarkLargeRequest, ~2 MB conversation, B/op before → after: anthropic 45.84 → 45.58 MB anthropic-group 57.30 → 57.03 MB chat 36.61 → 36.35 MB responses 46.04 → 45.78 MB In the 60-min soak before ( |
||
|
|
41147956d2 |
gateway: a conversation's turn count and folder come from one parse of it, not one each (yg6888 on X: ~1 GB)
turnOf (affinity), dirOf (the trace's folder) and tellWorkPlace (a plugin's work-place headers) each parsed the whole conversation for a number and a folder. A parse decodes every message and tool output into strings of its own, so a long conversation was decoded twice over on every request for them. In the 60-min soak before ( |
||
|
|
2481750d92 |
gateway: a request body is read once into a slice of its declared length, not grown and copied (yg6888 on X: ~1 GB)
readBoundedRequestBody read every body with io.ReadAll. In Go 1.26 that reads into growing chunks, then copies them into one final slice, so each body was allocated about twice. With a declared Content-Length (and no Content-Encoding to decode), readSized now reads into one slice of that length. The length is the client's word, so it is not trusted: - the first allocation is at most 1 MiB (sizedReadFirst); the slice doubles from there, up to the declared length; - a client that declares 512 MB and sends 5 bytes costs at most sizedReadFirst; - a body longer than declared is read whole, still under the body limit (the LimitReader around it); - with no length, or an encoded body, it is io.ReadAll as before. BenchmarkLargeRequest, ~2 MB conversation, B/op before → after: anthropic 55.37 → 53.81 MB anthropic-group 66.82 → 65.26 MB chat 44.83 → 43.27 MB responses 55.37 → 53.81 MB 1.56 MB less per request, about 0.8× the body. In the 60-min soak before ( |
||
|
|
5090f3215b |
gateway: a call dropped from Recent calls is let go, not kept in the ring's array (yg6888 on X: ~1 GB)
record kept the last 40 calls by re-slicing the oldest off. The dropped call stayed in the backing array, request and response captures and all (up to 256 KiB each), until an append outgrew the array and copied the ring to one about twice its size. So up to ~80 calls' bodies were kept for a page that shows 40. keepRecent now moves the last 39 down in place, clears the tail and appends, so the array holds exactly the calls shown. Every reader of s.recent copies what it needs under the lock, so moving the ring in place changes nothing they see. Measured, before ( |
||
|
|
20444bb05d |
gateway: the large-request benchmark ends each request's context, as a server does
BenchmarkLargeRequest served httptest.NewRequest's context.Background, which never ends. holdBody lists only a body whose context can end, so the benchmark measured a gateway that never held a body: decodeJSON copied every value, and nothing kept for a body's later readers was ever kept. A served request's context ends when it is answered; each request now gets one that does. Same tree, -benchmem, -benchtime=30x, ~2 MB conversation (B/op): anthropic 61.27 MB with Background, 55.37 MB with an ending context chat 52.64 MB 44.83 MB responses 75.28 MB 55.37 MB The rest of this series is measured with it. Run (darwin arm64, go1.26.8, sandbox HOME, load 40 to 90 from other sessions' suites): - go test ./... -count=1 -timeout 45m on the series' final tree at |
||
|
|
d3db461bbb |
redact: the local model's secrets leave UUIDs, digests and paths, and client_metadata goes as written
The owner's masking records showed Codex's turn metadata with every id as
{{SECRET_…}}: installation_id, session_id, turn_id, window_id,
context_window_id, root_turn_id, and a skill's file path in the
instructions. The local model (OpenAI's Privacy Filter) labels a UUID a
secret: run on Codex's x-codex-turn-metadata it took each id, and on a
log it took a request id and "sha256 9b74…". The vendor and magpie's own
sessions match a turn by those ids, so masking them can break what
depends on them, and hides nothing worth hiding.
- modelTakes: a secret the model finds is not taken when it names a
thing (namesThing): a UUID, with window_id's ":0" after it too; a
digest with its algorithm's name; a file's path. A password or a key
it finds is still masked, and the rules' secrets (sk-…, password=…,
API_KEY: …) are unchanged.
- client_metadata is in defKeys: the client's ids, which no model
reads, go as written, as tools and stream_options do.
docs/subsystems/gateway-routing.md says both.
TestModelSecretIsNoID uses what the real model labelled "secret" on these
texts (pf-serve with the q8 model, run here): the UUIDs, the request id,
the sha256 digest, plus the reporter's path; the password and the
32-hex key beside them are still masked. Broken by hand: without
namesThing 5 values are masked, without client_metadata in defKeys a
user word in it is.
Run:
- At 3fff6c011 (on origin/main
|
||
|
|
1414705159 |
gui: the warm-up's read of the whole usage history runs under GOGC 25, so a cold start peaks ~130 MB lower
The warm-up's last big read, the Usage page's QueryPage over all time,
holds every row of the history unpacked at once (129 MB of rows, 271 MB
live at that moment for this history), and at Go's default GOGC the heap
grows to twice what is live before collecting: Activity Monitor's
footprint peaked at 555-587 MB there, on a magpie that rests at ~200 MB
once it is done. underTightGC lets the heap grow by a quarter during that
read and puts back what was set; a GOGC the user set lower, or off, is
kept. Holding fewer rows at once needs the page built in passes over
packed chunks (rowRef points into unpacked ones), which is the next step.
The whole warm-up under GOGC 25 gave the same peak for ~11 s more CPU, so
only that read is.
Measured with startheap-runs/fp.sh: cold start (calls and sessions caches
deleted) of a 6,437-file history, phys_footprint sampled every 2 s and
footprint's own phys_footprint_peak at the end, run until the caches stop
growing for 30 s; every run wrote the same 6,437 files / 70,069,451 bytes.
Machine at load ~85-140 from other sessions.
before (
|
||
|
|
1bd99194ea |
provider: Claude Code stays listed, signed out, when every saved account's sign-in is gone
LeeHom on Discord: two Claude Pro accounts vanished from Providers, and
signing one in again showed the other as "needs sign in again". While
Claude Code is signed out, the claude provider is built on
claudeStandIn's account. claudeStandIn skips an account whose sign-in
Claude Code let go of (claudeLoggedOut's claudeLogoutLapse) or that is
still Held. With every saved account like that, it returned "", no claude
provider was made, and the subscription and both accounts left the GUI,
the TUI and `magpie providers` at once.
claudeStandInAccount and Logins now ask claudeListed: the stand-in, else
the signed-out account seen last. A Held account is never listed this way,
because the sign-in Claude Code left on disk would then be served
(TestClaudeSignedOut still holds). The listed account's token still fails
with the lapse reason (claudeSavedDir), so nothing is served on it.
claudeStandIn itself is unchanged, since addLogin and logins_on rely on
it.
The app's row already said "{user} is signed out" when every login in use
had lapsed. Provider.SignedOut is that rule in Go. With it, `magpie
providers` says "○ <user> is signed out · sign in again" and the TUI says
"○ <user> is signed out", instead of a green "signed in". The CLI's key
column moved into keyColumn so it can be tested. The providers-accounts
doc row says this.
Tests:
- TestClaudeAllSignedOutStaysListed: signed in, a second account
logout-lapsed, then Claude Code signed out. It fails on the old code
("Claude Code left the Providers list with every account signed out:
false") and with SignedOut returning false (both broken by hand).
- TestProvidersSaySignedOut, in cli and tui: a signed-out account reads
as signed out and a signed-in one still reads as signed in.
Run: gofmt -l clean; go vet ./... (darwin), GOOS=linux go vet -tags
nogui ./..., GOOS=windows go vet ./...; go build for all three.
Then go test -timeout 45m ./... under a sandbox HOME at base
|
||
|
|
d771138c41 |
provider: WorkBuddy's mover min is 0.1.29, which sends a refused system prompt again as the user's instructions
Wing on Discord (10-21) got 400 11128 "Illegal API invocation from an unapproved channel" from WorkBuddy with an agent whose lines the plugin didn't reword. WorkBuddy checks only system and assistant messages, against lines it knows. Since 0.1.29 (magpie-community/plugins af360a5), a chat it refuses that way is sent once more with its system prompt moved into the first user message, inside <instructions> tags, and WorkBuddy's default system prompt in its place. The refusal still rests no account, as since |