ac4af582301a4e8a29245dbba767eba31334ddf9
7089
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ba37e78b4c |
provider: a plugin model's test is told a queue at once and warms its host first
mingxia_16024 on Discord (v0.1.1862): testing models on Qoder (CN and
international) and WorkBuddy always failed with "qfmodel: context deadline
exceeded", even though agents got answers from the same models.
Cause, checked with the owner's real Qoder account in a sandbox HOME:
- The test already takes the gateway's route: p.Do, then the plugin's
fetch in the host.
- The Qoder plugin waits out Qoder's free-plan queue (plan queue p3) for
up to 4 minutes, unless X-Magpie-Fallback is "1". magpie never sent
that header.
- The probe gives up after 20s. A raw request with no deadline got its
head after 3m49s.
- The probe's 20s also had to cover the plugin host's cold start and the
account loader's first run, which can renew the sign-in. A first
WorkBuddy AI test took 8.4s.
Changes:
- For a plugin provider, probe sends X-Magpie-Fallback: 1, so a queued
model answers at once with the plugin's queue message.
- It starts the host and runs the account's loader (warmPlugin, through
the account's proxy) under the caller's deadline, not the probe's.
- A plugin probe waits up to pluginTestWait (60s). The GUI gives a model
test 3 minutes.
- host.js lists x-magpie-fallback in MAGPIE_ONLY, so no vendor receives
it.
"Recent calls" lists only the gateway's own calls, for every provider. A
test is written to the Requests page as magpie's own test, timed-out
tries included, so that is unchanged.
The gateway still never sends the header when another candidate follows,
which Qoder 0.2.40 and CodeArts 0.2.3 expect: #4049.
Run (mote-run):
- New tests TestPluginModelTestSaysQueued and TestPluginModelTestColdHost.
They use the fake plugin's new $FAKE_QUEUE and $FAKE_LOAD_WAIT, with a
cold host from plugin.Restart.
- go test -tags nogui -timeout 45m ./... at
|
||
|
|
e50d73aa36 |
agent: disconnect previews sweep sandboxes a killed magpie left (#3136)
DisconnectPreview builds its dry-run sandbox with os.MkdirTemp and cleans it with a bare `defer os.RemoveAll(tmp)` (internal/agent/preview.go). Two consequences reported by OldSuns: when the removal fails (on Windows the dry run's bun host still holds magpie-bun.exe after cmd.Run returns) the error is dropped and the sandbox - each with an 86 MB bun re-downloaded into it - stays in the temporary directory for good; 12 dirs / 985 MB in the report, 99 dirs in ggggggggggz's. And nothing ever reclaims sandboxes left by a killed magpie, unlike the cursor snapshots, whose sweepCursorSnaps removes stale magpie-cursor-* copies. The change: DisconnectPreview sweeps magpie-preview-* folders older than an hour (a live preview lasts seconds; the dry run is bounded at 20 s) before creating its own, the way the cursor snapshots do; cleanup goes through removePreview, which retries while processes are still letting go of files (5 tries, 0.1 s-0.5 s apart) and logs the error instead of dropping it when it still cannot remove the folder. Only the reported prefix is swept; the other magpie-* temp prefixes have their own lifecycles (#2321, cursor_snapshot.go). Each sandbox also holds a copy of magpie's config folder's files (logins.json, providers.json and the rest, copyTop), so a sandbox the removal left behind kept the user's sign-ins in the temporary folder for good. The sweep takes those too. Reported by OldSuns, ggggggggggz and track23; the fix is skygunner's branch fix/3136-agent-magpie-preview-86-mb (98e5e7bc7), ported as it is apart from the test: it now sweeps a temp dir of its own (TMPDIR, TMP and TEMP set to t.TempDir()) instead of the machine's, where it could take another magpie's stale sandboxes. What was run (on the ported tree): - TestDisconnectPreviewSweepsStaleSandboxes with sweepPreviews() taken out by hand: red ("a stale sandbox is still there after a preview"). - go vet ./internal/agent/ for linux, windows and darwin: ok. - go test ./internal/agent/ on mote: ok 170.4s. - Windows (xiaomi-gpu, win-run): go test -run 'TestDisconnectPreview|TestRemovePreview|TestPreview' ./internal/agent/: ok 7.8s. - On mote, the built binary's agent-disconnect-dry-run for opencode, claude and codex under an empty sandbox HOME, then with a plugins.json naming an OpenCode plugin: nothing downloaded, the sandbox stayed at 8-12K. Not reproduced: the 86 MB bun and the pnpm install inside a sandbox. The reports are from v0.1.1223; on main the dry run started no plugin host in the cases above, so nothing here changes where bun comes from. The sandboxes it left are what this removes. Refs #3136 |
||
|
|
4391ff0f56 |
provider: asking a plugin for its model id replaces just the model (#4004)
When a plugin's model has an API id other than the one asked for, withModel decoded the whole request into a map and marshalled it again, which allocated 469 MiB for a 45 MiB body, about ten times the body. Now a body with one top-level "model" string gets just that string replaced, in one buffer of the body's size. Every other byte goes as it came. A body that isn't JSON, has no string model, or names "model" twice takes the old path. A body of null goes as it came; it was a panic, writing into a nil map. The gateway's own withModel (Codex backend) and rewriteModel are left as they are. TestCodexRewritesAsBefore pins the Codex backend's sorted bytes, and TestUpstreamBodiesUnchanged pins rewriteModel's handling of a duplicate model. Both went red when the splice was tried there. Run on mote at 3aa36bbea (since rebased onto main, which changed nothing in internal/provider or internal/gateway): - TestWithModelAsksForTheModel: a nested "model" is kept, spacing is kept, an escaped model is replaced, and a missing, numeric or duplicate model, a cut-off body and null are covered. - TestWithModelCopiesOnce: a 45 MiB body is copied once (45 MiB allocated). Against the old withModel, the test is red: 469 MiB allocated, and the body's < was escaped. - go vet ./internal/provider for darwin, linux and windows: ok. - go test ./internal/provider ./internal/gateway -timeout 45m: ok (106s, 495s), the plugin parity tests included. Not tried with a real account: none of the plugins signed in here (WorkBuddy, Devin, Cursor and others) has a model whose API id differs, so this path isn't reached by them today. |
||
|
|
76218200af |
gui: a demo's made-up account is never blurred by Hide accounts (data-no-pii)
outloudvi on Discord (#feedback, 1564923315095732276): with Hide accounts on, the masking demo's letter on Insights › Masking had its account (yetone@example.com) blurred and its password (hunter2-prod) not. The blur is hideAccounts, which masks every address in the window's body. It isn't the demo's own masking. The demo's values are made up, and showing them is the point of it. An element marked data-no-pii, and everything inside it, is now skipped by the text walker and the tooltip pass. The demo's section carries the marker. The class: any illustration with made-up accounts takes the same attribute. A search of the GUI assets found no other drawn one. The only other fake address is ops@company.com, in input placeholders, which the blur never touches. Text added later in a marked element stays unmasked too: the observer's mask(e) passes through the same checks. New test masking-demo-unblurred: Hide accounts on, an address elsewhere on the page still masked, the demo played (reduced motion on and off), its account and password slots both readable, and no .pii in #maskDemo. A generic [data-no-pii] element with a title and text changed after masking stays unmasked. It runs en and zh, in both engines. Run on mote: - masking-demo-unblurred and masking-demo at this tree: green. - go test -tags nogui -run Budget ./internal/gui: ok (no budget raised). - The 124-file GUI run in the commit before, at this tree: none of its reds in masking files (masking-records zh-TW was green when rerun). Broken by hand: - Marker removed from client.js: red, account slot "ilottn@aamital.cmd" in webkit (the reporter's blur). - Walker and title checks removed from app.js: red. Not tried: Linux and Windows. |
||
|
|
a6f6e86e80 |
gui: an account's eye shows that provider's account, and a Kiro account's eye works
outloudvi on Discord (#feedback, 1564924864052207627): on Usage's overview
with Hide accounts on, Kiro's eye did nothing, and one username on two
platforms was shown or hidden by either card's eye.
- Kiro: the plugin names an account "email (Google)" (nameOf in
packages/kiro). The finder tried the address pattern first, so only the
address was hidden. The eye kept the whole name, which never matched
what was hidden. A name with an address in it is now found whole,
before the address pattern.
- One name on two providers: shown was keyed by the account alone, and
kin() gathered names from every provider. Each entry is now keyed
"provider\naccount". eye(u, p) takes the provider id at every call: the
provider editor, the account button, the panel's quota card and Usage's
quotaWho. Text by an eye (its row, or its card one level down) follows
that eye's provider. Text that is near no eye, like a sentence elsewhere
in the window, shows when the account is shown under any provider, as
before.
New test account-eye-provider: Usage cards for Kiro (one email, Google
and GitHub), Codex and ZCode (the same address) are rendered with Hide
accounts on. It runs en and zh, at 900 and 360px, in both engines.
Run on mote:
- account-eye-provider at this tree: 4/4.
- go test -tags nogui -run Budget ./internal/gui: ok (no budget raised).
- 124 GUI files the masking, Usage, panel and storage code reaches, both
engines, run with the next commit on top: 1761/1792. All 7 red top-level
tests are in quota-count-wrap (#3404, #2228), usage-agents-hide (#3414,
#2276) and usage-ledger (#3104), plus one masking-records zh-TW and one
quota-refresh-order. Those five files were run again at origin/main
|
||
|
|
3ebdc5df9e |
gui: what a page keeps in localStorage as JSON is read and written by two helpers
kept(k, d) reads magpie.<k> as JSON and gives d when nothing is stored, when the value is a different kind from d, or when it can't be read. keep(k, v) writes it, and a write that fails holds only for this time. They replace eleven try/JSON.parse/getItem and setItem copies: the discovery ignore list, model favourites, Usage's folds (usageOpen, usageAccounts, usageAcctsOpened, usageKeysAll, usageAcctsAll) and the panel's folded options. The three Usage fold reads, which were written out twice, are now one usageFolds(). The star's write had no try at all. This is the room for the next two commits (outloudvi's two masking reports), so the app.js budget doesn't go up. app.js shrinks by 1,062 bytes, to 1,308,386 at |
||
|
|
25df3187bf |
gateway: a model whose upstream says thinking.type must be "enabled" is asked again thinking
cybercaius on Discord (#help), v0.1.1862: Claude Desktop's connection
check failed with 'Gateway rejected model
"magpie-0958175816.anthropic.claude-haiku-5-5[1m]" (HTTP 400)', the body
'天翼云: {"error":{"message":"{\"code\":\"400\",\"message\":\"thinking.type
must be \\\"enabled\\\" …","type":"upstream_error",…}}'. 天翼云 is his own
provider, a relay whose message is its own upstream's whole body.
What was sent: Desktop's check ({"max_tokens":1,"messages":[{"role":
"user","content":"."}]}, raised to 16) asks for no thinking. Relayed to
a Messages provider, a vendor's model gets thinking {"type":"disabled"}
(thinkingOffUnlessAsked) and a Claude-named one none; translated to Chat
it gets no reasoning_effort. Nothing today changed that: no gateway
commit since yesterday touches what thinking is sent. What changed is
where the check goes:
|
||
|
|
e296211b8b |
masking: the default's local model is waited for 2s at most, then the rules mask alone
shensmart on Discord (10-28, magpie in Docker on Linux, web UI remote): Codex's requests sat "masking…" on the Requests page from about ten minutes into use. |
||
|
|
33af28ed6b |
gui: the add sheet's Partners heading lights once an opening
The owner asked for an elegant light on the Partners heading each time Add provider takes the view to the sheet, and picked the traced outline of three drafts. A 1px hairline (a conic gradient on an animated @property angle, masked to the border) runs once round the heading's words over 1.8s and fades, over a faint wash of the accent; it follows --accent, so it reads in both themes, and keeps to the heading's own padding box, inside the sheet. It plays when the heading is fully in view (an IntersectionObserver on the providers view), once per opening of the sheet: a search or a reload drawing the sheet again doesn't play it, closing and opening it does (partnersShone, reset where partnersCounted is). With the system's reduced motion or Settings' Reduce motion (#3813, calm() and holdStill) it isn't drawn. The outline's elements are <i>, so the heading's hint stays its only span, which the add-sheet and partners tests read. The core's scripts are 1,528,076 bytes, their budget raised to it with no room added; app.js stays under its own. Run at this head, on mote: TestCoreScriptBudget ok; the 59 GUI files that open the add sheet (grep addProvider|#addSheet) and reduce-motion and settings-general, chromium and webkit: 826 of 826 ok (at --test-concurrency=2; at 4, on mote at load ~230 from other runs, 8 chromium sign-in cases timed out at 5s and passed 28 of 28 alone). add-partners-shine.test.cjs: en zh ja de at 900 and 440px, lit once on open, not again after a search, again after close and reopen, the outline round the words and inside the sheet, none under either reduced motion. Broken by hand: without the partnersShone check every redraw lights it again, and the test is red in all 8 language/width cases. Not run: the whole GUI suite (the change adds no API call and its classes are scoped to the add sheet's heading); not seen on Windows' WebView2 or WebKitGTK, where @property and mask-composite are supported but the motion wasn't watched. |
||
|
|
51247a55b2 |
docs: one commit, one goal moves into the code standards (seen a third day)
LESSONS.md's "One commit, one goal" was seen on 10-05 and 10-06. On 10-28 |
||
|
|
0b99b8fbe5 |
gateway: a translated body is written a message at a time (#4004)
jihuayu's heap profile (#4004, v0.1.1707 on a 2 GiB server) had json.Marshal and its bytes.growSlice under buildChat as the largest holders, about 128 MiB together, on 45 MiB Codex requests. json.Marshal writes the whole body into one buffer that doubles as it fills and then copies it out, so each grown-out buffer is garbage until the next GC. marshalBody writes the same bytes: the keys sorted, every value through json.Marshal, but a list (messages, input items, contents) one item at a time, into one buffer sized to what they come to. buildChat, buildResponses, anthropicBody and buildGemini use it. Anything json.Marshal refuses gets json.Marshal's own answer. A slice's items are marshalled by address, as json.Marshal reaches them, so a MarshalJSON on the pointer is still called. Run on mote at this head: - TestMarshalBodyIsJSONMarshal: byte-equal to json.Marshal for lists of maps and of typed maps, one-item, empty and nil lists, nil, []byte, json.RawMessage and lists of it, pointer and value Marshalers, HTML characters, U+2028/2029, control characters, escaped keys; NaN, Inf and a chan are refused as json.Marshal refuses them. - TestMarshalBodyAllocatesTwoBodies: a 47 MiB, 170-message body. json.Marshal allocated 205 MiB, marshalBody 98 MiB. The bar is 2.5x the body (117 MiB), which json.Marshal's 205 fails. - go vet ./internal/gateway for darwin, linux and windows: ok. - go test ./internal/gateway -timeout 45m: ok (543s), and again after the rebase onto origin/main, at this head: ok (529s). Real account, on this Mac in a sandbox HOME with only the DeepSeek provider copied: a streamed Codex-style /v1/responses request with a function call and a ~100 KB tool output (translated, 36,343 tokens in) answered about the tool's output and completed. /v1/messages and /v1/chat/completions also answered 200. Not tried: a 45 MiB request against a real vendor; the plugin RPC copy and toolOutput's unquote, which the same profile lists, are separate changes. |
||
|
|
a5315c70d5 |
redact: the local model doesn't read an agent's tool definitions (niuniu_8964 on X)
码妞 on X: the official container on a 4-core, 8 GB server, AstrLink Guard on, Claude Code's requests sat at 脱敏中 for minutes and timed out, load 1.78, a short conversation. |
||
|
|
1feee38d17 |
sessions: Codex's skills are counted, from its reads of their SKILL.md (MaxMooreMy on X)
MaxMooreMy on X: "magpie的skill调用统计是不是坏了。用了一天,一个都没统计到".
The screenshot is Usage → Sessions, Codex (gpt-6-astra), 10 sessions,
Tool use "exec 488": Top skills says no skill was called up.
Cause: nothing ever counted a Codex skill. Codex has no tool for skills:
its <skills_instructions> list each skill's SKILL.md, and the model calls
one up by reading that file through a shell command, now from inside a
code-mode exec script (tools.exec_command({cmd:"cat '.../imagegen/
SKILL.md'"})), before that through exec_command, shell or a
local_shell_call. codexHead counted each call's tool and passed "" for
the skill, so only Claude Code (Skill tool), Alma and Pi/omp had skills.
Not a regression:
|
||
|
|
25fc92d59a |
fallback: a model unchecked in its provider's list is not a fallback to go to (#3911)
The sibling of the group fix before this: a provider's Fallback list
resolved each entry with Resolve, so a fallback the user unchecked in
its own provider's list was still sent to, while the fallback editor
says "No provider serves {id} now; it is skipped". plan's fallbacks,
and the places that read the same list (carefulOf, native compaction's
carrier check, unredactedRoute, codexFallsBack), now resolve through
provider.ResolveRoute, which skips it. ResolveRoute scans the entries
once for the one model rather than building a map per request.
Test: fallback_unpicked_test.go, plan/m answering 429 with fallbacks
a/x (unchecked) and b/x goes to b and never to a.
Run (mote): red on the previous commit's tree ("from ka", a tried
[ka]); green with this one. Full suite as recorded in the previous
commit, which ran at this tree: 76 packages ok, internal/plugin's
TestGatewayHookMixedPiPackage red at load ~134 (#2865), passing alone.
go vet darwin/linux/windows clean.
Not tried: a real provider with a fallback in the app.
Co-authored-by: timonwong <timon86.wang@gmail.com>
|
||
|
|
f561cc5d9b |
groups: a model unchecked in its provider's list is not a member to route to (#3911)
timonwong (#3911, also on Discord #feedback): with a group of a/x and
b/x, unchecking x in provider a's model list struck a/x on the Routing
page, but group/<id> still sent requests to a. membersOff resolved each
member through resolveIn, whose provider/model step takes any model of
a provider that is on, so that a request can name a model its list
lacks.
membersOff now skips a member whose provider has picks and whose served
models lack it (unpicked), as timonwong's fork did (38615ca9). A
provider with no picks still routes a model its list lacks (#2642), a
decision model (never in the catalog) is still a decision group's, and
a request naming a/x itself still reaches a. Every route mode goes
through membersOff (ordered, weighted, rotate, manual, nested groups,
found groups, count_tokens' group lookup), so all of them get it. The
entries map is built only when a member's provider has picks.
The Routing card's memberInfo (gui/groups.go) used Resolve too, so a
manual group's pick row showed an unchecked member as ready; it now
asks provider.ResolveRoute, the same check, and the group is not ready
when its picked member was unchecked.
Tests: group_model_pick_test.go (ordered, weight, rotate; nested; a/x
named directly still served; checked again comes back; a decision
group keeps a picked decider) and gui's
TestGroupMemberUncheckedInItsProvider.
Run (mote, at this tree plus the next commit):
- Red on
|
||
|
|
6b253dbb3f |
windows: magpie.com is written again only when the launcher changes, not on every update
lucky_eagle_38410 on Discord (#general, 10-28): every run of the command line wrote a new magpie.com. magpie.com is the console launcher from |
||
|
|
d6df72a2ba |
redact: a disassembly's symbols (system@plt, foo@@GLIBC_2.2.5, system@got) are no email
ch35tnut_ on X: reversing, symbols like system@plt were masked as
emails, so masking had to be turned off for reverse engineering.
The rule's regexp already needs a dot and a mail TLD (mailTLD), so
system@plt, puts@got.plt and memcpy@GLIBC_2.14 went as written by it at
origin/main. The local model's EMAIL spans pass realEmail too, which
never asked for a dot: .got is an ICANN top-level domain, so a model
span on system@got (IDA's "; system@got") was masked. And a
foo@plt.got ends in .got with a dot, so the rule masked that too.
realEmail now asks mailHost first, for the rule and the model alike: the
host has a dot, every label is letters, digits and hyphens (or non-ASCII,
an IDN's), no label empty, the local part does not end in @ (foo@@VER),
and the host is not made of linker table words alone (plt, got, sec,
iplt, igot: free@plt.got, memcpy@plt.sec). A version with an underscore
(@GLIBC_2_2_5) or no dot (@Base, @GLIBC_PRIVATE) is no host.
TestSymbolIsNoEmail has objdump, readelf, nm, gdb and IDA lines as they
print them, for the rule and for a fake model flagging each symbol as
private_email, and checks that rina.k@fastmail.com in code and
ops@build01.acme.io beside a symbol are still masked by both.
Run at this head (origin/main
|
||
|
|
62ce73250f |
gui tests: old-webkit knows webfonts.js is imported, not a page script
|
||
|
|
be0fbfe08d |
gui: a menu with nothing to tick keeps no tick column in Safari 15.0 too (#4020)
v0.1.1855's old-webkit check failed on app.css's `.proto-menu:not(:has(.on, [role=menuitemcheckbox])) .pm-tick` rule: :has() is Safari 15.4+, so on macOS 12's Safari 15.0 the whole rule is dropped and every plain menu kept an empty tick column. openProtoMenu and the sessions combo's draw() now set .pm-bare on the box when no item is on or a checkbox, and the CSS hides .pm-tick under it. The three commits before this one dedupe app.js to make the room; the core script budget is not raised. Run at the pushed head (this commit + the old-webkit test fix after it, on |
||
|
|
6e0bd5447d |
gui: capHeldNote writes the window's reset time once
Its three notes each built the same " · resets …" text; it is one const now, which makes room under the core script budget for #4020 without raising it. |
||
|
|
436fd03124 |
gui: one blurOnEnter for the four fields that commit on Enter
Four fields set the same keydown handler (keys kept from the page, Enter blurs to commit). It is one helper now, which makes room under the core script budget for #4020 without raising it. |
||
|
|
02630a5a14 |
gui: one stopSignIn for the sign-in sheet's four cancels
The same 'tell the server the sign-in under way is given up' line stood in four places; it is one helper now, which makes room under the core script budget for #4020 without raising it. |
||
|
|
6e080ca044 |
gateway: every model in /v1/models says it takes tools, a routing group too
psikent on Discord: an SSH client judges what a model can do from its
list entry, and a routing group, whose id is the user's own name, said
nothing of tools, so the client handed it none. /v1/models and
/v1/models/{id} now give every chat row models.dev's tool_call: true
(beside the reasoning it already had) and OpenRouter's
supported_parameters (tools, tool_choice, and reasoning when it thinks),
which Kilo's and Cline's list readers use (kilo.go reads the same field).
magpie has no model that takes no tools (a call written as text is read
back as one), so a group's members all take them and the group says so.
No `capabilities` key: Cursor Private Inference reads it as an object,
Ollama and LM Studio as arrays of their own words; magpie's Ollama
/api/show already says "tools". Desktop's, Science's and the decision
models' lists are unchanged.
windy on Discord: a 1M DeepSeek group with a 128K Trae member. A group's
window and output stay its largest member's, images any member's, as
#712, #756 and ARNO's truncation report decided: the gateway sends a
longer conversation only to members with room (roomy, withRoom), and
Context: Smallest model's tells agents the smallest. The editor's Context
hint now names the member a longer conversation skips when the windows
differ ("…longer than 128,000 skips Trae CN · DeepSeek-V4.1-Flash…"), in en, zh, zh-TW, ja, de.
Compaction written to agent configs follows the same window (CompactFor,
CompactSet takes the smallest threshold the user set); unchanged.
Run (mote unreachable all session, so on the other test boxes):
- TestGroupListedTakesTools on Linux (wsl-run): green; red on the old
gateway.go (a/m, b/m, group/g and /v1/models/group/g: tool_call false,
supported_parameters []).
- group-context.test.cjs on the Windows box, Playwright 1.62.0,
Chromium + WebKit, en and zh: 4/4 green; 4/4 red with the old
routing assets (the hint named neither 128,000 nor the member).
- Every GUI file that opens the group editor (56) plus i18n-keys, both
engines, on Windows: 816 tests, 792 pass, 24 red (793/23 on the run
before the hint named a member's provider). The red files with the old
assets: the same tests red (25). They are #3402, #3412, #3789, #3096 and name-suffix-saved's
WebKit provider editor, not this change.
- Full Go suite, -tags nogui -timeout 45m, on Linux: all ok but
internal/agent (7 install-detection tests), internal/proc TestTreeRSS
and internal/gateway TestUploadStillUnderwayIsNotCutByHealthPing; each
red at origin/main
|
||
|
|
aca0f0d8a1 |
guard: a long text's windows are read at once, one a core (niuniu_8964 on X)
码妞 on X: on a 4-core server in the Docker image, with AstrLink Guard,
Claude Code's requests sat at 脱敏中 for minutes, load 1.78. Guard read a
long text's 510-token windows one after another, and split only each
window's matmuls and attention over GOMAXPROCS-1 goroutines; the layer
norms, biases, GELU and quantizing between them ran on one core. A
2-CPU container got one thread for all of it.
Find now reads every window's logits first, min(GOMAXPROCS, windows) at
once, each with GOMAXPROCS/that many goroutines of its own, then merges
them in window order as before, so what it finds is the same. A window's
procs are passed down (logits, encode, matmul, attention, parallel) in
place of the package's threads. CoreML (a Mac) still reads one window at
a time.
Measured on magpie-desktop (WSL, Ryzen AI Max+ 395), 69,495 bytes of
docs, 22,488 tokens, ~59 windows:
GOMAXPROCS=4: 23.86s before, 17.90s now
GOMAXPROCS=2: 48.8s before, 30.50s now
GOMAXPROCS=1: 50.0s before, 57.0s now (the same code path; noise)
Run:
- wsl-run with MAGPIE_GUARD_DIR at the pinned model (rev 7216b6a3):
TestWindowsAtOnceReadAsOneByOne (new: 200 synthetic contact lines, over
4 windows, read at GOMAXPROCS 1 and 4, spans DeepEqual), TestModelFinds,
TestKernelsMatchGo, TestTokenizerMatchesHF, TestDecodeBIO: ok.
- mote-run: go vet ./internal/pii/..., GOOS=linux and GOOS=windows go vet
of it, go test -race ./internal/pii/..., go test ./internal/pii/...
./internal/redact/...: ok.
- win-run go test ./internal/pii/guard: ok.
Broken by hand: swapping the first two windows' logits after the wait
made the new test red ("windows at once found 800 spans, one by one
800": the same count, different spans).
Not tried: the reporter's own server, or a real Claude Code request
through the Docker image; TestCoreMLMatchesGo (needs the model on a
Mac) was only compiled. The full suite wasn't run: nothing outside
internal/pii/guard calls what changed but Find.
|
||
|
|
eb6d1d8d97 |
redact: a colour or an ordinary word is no personal name (黄绿色, 关键词)
hh05928822 on X after v0.1.1850: names were found in ordinary Chinese, "黄绿色" the worst, with 边••, 应••, 关••, 尚• in the screenshot. wangjunxiao128: "关键词" taken for a name. Both ways a Chinese name is found (the model's PERSON spans in modelSpans, and the cue rules in zhNameSpans) now go through one check, zhWordNotName: a span that is an ordinary word is no name, unless a role before it or a title after it says a person is meant (客户方圆, 江山老师). A word is (zhWordShaped): - a colour: Han colour characters alone, or anything ending in 色 (黄绿色, 红色, 金黄色, 浅蓝色); - a two-character word starting with a surname, from zhWords or the new zhDict (边界, 应该, 尚可, 关心); - such a word with a noun ending after it (关键词, 关键字, 应用层, 毛利率, 时间戳, 文件名). zhDict is zhdict.txt, embedded: ~1,550 two-character words from jieba v0.42.1's dict.txt (MIT, in THIRD_PARTY_NOTICES), the first character a surname, frequency >= 100, tag not nr/nrt/nrfg, and a list left out by hand (陆游, 关露, 欧阳, 司徒...) in its header. The surname list keeps 黄, 关, 边: they are real surnames, so 黄晓明, 关羽 and 毛利兰 are still masked. modelTakes' own zhWords check moved into the shared one. Run on mote at |
||
|
|
c30e2a6452 |
gateway: Claude Desktop's connection check asks no group classifier
CyberCaius on Discord, after v0.1.1847: with Desktop's default a routing
group, the first connection check as Desktop starts ends in 499 and the
second passes; with a model as the default it never does.
The check ({"max_tokens":1,"messages":[{"role":"user","content":"."}]})
is not streamed, and Desktop gives it 10 seconds as it starts
(AbortSignal.timeout(1e4) in its app.asar 2.7032, one retry when it is
"unreachable"; 8 seconds from Test connection). Through a group with
intent rules or Effort auto, magpie first asked the group's classifier
what "." is, up to the Classifier timeout (8s by default), then sent the
check on. A cold or slow classifier plus the member's answer is past 10
seconds, and Desktop cancels it (499). The second check doesn't wait:
the classifier failed and rests for 30s, or its verdict for "." is kept.
A model never classifies, so it never waits.
The check is no user's turn, so it now asks no classifier (as a
classifier's own call doesn't) and goes by the group's order. The rule's
trace says why. A user's turn from Desktop is still classified.
Measured (a fake classifier, group with one intent rule, Desktop's check
twice, on mote): before, a classifier slow past its timeout gave 8.01s
then 8ms; one taking 3s gave 3.02s then 9ms. After: 19ms and 9ms, 7ms
and 9ms, the classifier asked 0 times. Ruled out on the way: key-member
groups vs a model show no first-vs-second difference (instant, 3s slow,
429 and 503 on the first call); the held-stream keepalive (15s) is not
reached, the check isn't streamed.
Run: TestClaudeDesktopProbeAsksNoClassifier (new) with
TestClaudeDesktopProbe*, TestDesktopProbe, TestIntent* and
TestClassifier*; go test ./internal/gateway; gofmt -l; go vet for
darwin, linux and windows.
Broken by hand: the old condition (RouterAgent only) back, the new test
is red ("the check asked the classifier 1 times", asked of ".").
Not tried: a real Claude Desktop start against a group with a real
classifier; the allowance first read (provider.Allowances, up to 3s once
after magpie starts) is left as it is, as a model's check pays it too.
|
||
|
|
6aa04f6e6a |
provider: a keyless relay on the user's own network imports and saves, as one on 127.0.0.1 does
iSnow_999 on X: their company's internal Codex relay is at
http://<LAN IP>:8080; imported from CC Switch, Codex couldn't reach it
through magpie. A CC Switch Codex entry with no key (requires_openai_auth
= false, auth {}) at a LAN address was listed as "it has no API key"
and left out, and the same provider couldn't be saved by hand ("needs an
API key"), while the same server at 127.0.0.1 was taken keyless.
keyOptional now also takes a host on the user's own network, read from
the URL alone (ownNetwork, no lookup since Ready asks often): a private,
link-local, loopback or carrier-grade NAT (Tailscale) address, or a
.local name, as netproxy's onLAN sends around a proxy. A keyless address
on the internet still needs its key. Every importer (CC Switch, Alma,
Codex, OpenCode) goes through imported(), and the editor, CLI and TUI
through Save, so the one rule covers them.
Ruled out against the code and on mote, sandbox HOME, fake relay on
mote's LAN address 10.0.0.116 at a free port, `magpie serve --web` built
from this tree, import through POST /api/importapps:
- a CC Switch Codex entry at http://10.0.0.116:<port>/v1 with a key
imports with port, path, key and Responses kept, and /v1/responses
through the gateway reaches the relay (Bearer sk-corp); with
HTTP_PROXY/HTTPS_PROXY/ALL_PROXY at a dead 127.0.0.1:9 too (onLAN);
- a request with Codex's User-Agent, originator and
x-codex-turn-metadata reaches the relay with them (sub2api's
codex_cli_only gate reads these; port 8080 is sub2api's default).
After the fix, the same run with a keyless entry: imported, served, the
relay sees no Authorization header.
Tests: TestKeylessRelayOnOwnNetwork (import of a keyless LAN entry,
Save + Ready at 192.168/10/172.16/100.64/.local/[fd00::] addresses, a
keyless internet address still refused) is red on the old provider.go
and green now.
Run on mote at
|
||
|
|
761e0e0105 |
gui: a Settings option pressed through two redraws clicks its newest self (#3922)
Browser access draws twice per renderSettings: once at once, and once more when its /api/web-page answer comes. When that answer landed between the release and the click segs' pointerup sets off, the option the release found was gone by the click and nothing was sent, which segs-press-redraw's sweep saw on Network's web-page list. The click now goes to the control's newest self (same segsWho, same option), found again whether or not a draw came since; dragged off or gone still picks nothing. From Coffemon's patch on #3922 (JoeyWu-tech, fix/3922-segs-newest, c1b5575af and e8c831736): the test's new redrawn-twice case, reveal() waiting for each wheel's scroll to land, and the README entry, taken as is. The app.js change is his, shorter: his kept b when still there and looked up the newest self otherwise (+298 bytes); the lookup finds b itself when b is still there, so it is used alone (+129 bytes). Main's core had 18 bytes of room left when this landed; TestCoreScriptBudget is green and no budget is raised. What was run (mote, Playwright 1.62.0, Chromium and WebKit, en, zh, ja, de, 900 and 440px): - The new test on main's app.js: 22 of 42 red, both engines. - With this change: 42 of 42. - Broken by hand (the newest self's option taken as [0], not p.i): Chromium 17 red. - go test -run TestCoreScriptBudget ./internal/gui: ok. Not tried: the real app's webview, or a loaded Mac. Co-authored-by: JoeyWu-tech <joey110551567@gmail.com> |
||
|
|
ae03279458 |
masking: the local model is on by default; the rules mask alone until it is downloaded
The owner's plan (10-28, after the xuanwo/_kaichen reports under the
masking demo): with AstrLink Guard picked, the Chinese-name heuristic
is off and only nicknames like 小王/老李 stay a rule; with Privacy Filter
it is as before; every format rule stays; the model is on by default,
masks with the rules alone until its download finishes, and no longer
answers 503 for it.
- masking.ModelWanted(st): on when the user turned it on, off when the
user turned it off (new RedactModelOff, set by SetRedactModel(false),
remove, and cancelling the default's own download), on when the
default's download finished (RedactModelAuto). A settings file from
before this, with a model name picked or files on disk and the model
off, reads as the user's off: magpie's default doesn't override it.
- Until the picked model is installed, requests are masked by the rules
alone and fetch starts its download (one try per model per hour,
never under testing.Testing(), nothing where the model can't run).
When it finishes, settings.UseDefaultRedactModel records the default
(it refuses when the user has set anything) and the model warms.
- model(..., strict): a model that fails holds requests back (503)
only when the user turned it on; under the default the rules mask
alone. The Privacy page says which ("…the rules mask requests alone"
in en, zh, zh-TW, ja, de; /api/privacy-model has `chosen`).
- redact.Options.NamesByModel (AstrLink Guard picked): zhNameSpans
keeps only zhNick candidates (小/老 + a surname).
- KeepOwn and POST /api/settings keep both new fields.
- Docs: gateway-routing.md, site masking docs (en, zh, ja).
Run (mote, Go 1.26.8):
- gofmt clean; go vet of masking, settings, redact, gui; GOOS=linux go
vet of masking, settings, redact; GOOS=windows go vet of the four.
(GOOS=linux vet of internal/gui needs cgo, as on main.)
- go test -count=1 -timeout 45m ./... at base
|
||
|
|
a1f06bd780 |
gui: a browser tab offers the fonts of the computer it runs on (Norcleeh)
Norcleeh (Discord #general): magpie in Docker, used through the web GUI,
Settings' font menu doesn't list the fonts he installed on his own
computer; the app does. Cause, confirmed in the code: a tab's list is
/api/fonts, the server's families (none in a nogui build such as Docker)
plus commonFamilies, filtered by what the browser draws. A family that
is only on the browser's computer was never offered, and a choice the
server doesn't list was dropped by desktopFonts.available.
Now (webfonts.js, which only a browser tab loads; the app's windows are
unchanged):
- Where the Local Font Access API is (Chromium on https or localhost),
the press that opens a family menu calls queryLocalFonts() once a
page, and at load when the local-fonts permission is already given.
The families join the list with their real styles ("SemiBold
Condensed Italic" -> weight 600, 75%, italic).
- Elsewhere (Safari, Firefox, a plain-http LAN address, a refused
permission) the menu's search says "Search or type a font name…" and
offers Use "name" for a family the list lacks, enabled when the canvas
probe says this browser draws it, greyed with "This browser can't find
this font" when not; Enter takes it.
- A chosen family the server doesn't list stays in the tab's list on
later loads while the browser draws it, so it keeps being applied.
- The app's menu (openProtoMenu), never a <select>. Strings in zh,
zh-TW, ja and de. docs/subsystems/gui-shell.md says so.
Budget: no raise. here() moved out of fonts.js into webfonts.js, which
isn't a core script: loadFonts import()s it in a tab only (the page has
no CSP). The core is 106 bytes smaller than origin/main's.
Run (mote-run). At this head on
|
||
|
|
7fcf642eed |
gateway: the request archive doesn't put an unmasked route back on masking (#3973)
wangbinyq (#3973, Discord #feedback): after v0.1.1840, with the request archive on, a request to a provider set to go unmasked was still masked whole before it was sent. |
||
|
|
e23ddddd5b |
gateway: xAI's null-required walk goes through a schema's arrays too (#3392, kongkongklng)
The fourth round of #3392: after the null-required fix the reporter's claude calls still 400ed the same '/required: null is not of type "array"'. dropNullRequired walked a schema's objects but not its arrays — a null under a union's anyOf branch or a tuple items survived the shaping and reached xAI as before. The walk now takes arrays too; a real array of names stays as it came. Run on mote. At this head, rebased on origin/main |
||
|
|
aba11fc4de |
gateway: xAI's own API takes no null required in a tool's schema (#3392, kongkongklng)
The third round of #3392, after the reporter merged the system-turn fix: codex went through, but every Claude call still 400ed — xAI answers 'Invalid request content: Schema validation failed: [standard_violation] /required: null is not of type "array"'. A tool's schema said "required": null where none were (Claude Code's own tools, an MCP server's among them; Anthropic's API takes the null, xAI validates each schema as a JSON Schema). The relay forwarded it as sent. The key now goes wherever a tool schema leaves magpie for api.x.ai — input_schema (Anthropic), parameters (Responses) and function's parameters (the translated path), at the schema's root or nested; a real array of names stays as it came, and a body with no null required keeps its bytes. Replayed on a fake xAI by the reporter's wording: the claude call with a root and a nested null required goes through, Bash's real array and the schemas' contents beside them as they were; with the shaper off, both new tests go red. Full nogui gateway package: the four reds (TestClaudeClientCacheAbsentUnchanged, TestCodexFittedImagesPastTheBudget, TestMarshalRawIsEncodingJSON, FuzzMarshalRaw) match a clean-baseline run of the same branch in the same session; a fifth clean-baseline red (TestHandedOverGatewayFinishesItsStream, the known flake) passed here. gofmt / go vet clean, linux/windows/darwin nogui builds pass. Not tried against the real xAI API: no key here. From skygunner's branch fix/issue-batch-1024pm; kongkongklng confirmed it on 10-25. |
||
|
|
d8938d2f00 |
gateway: xAI's own API takes neither a sealed item's null content nor a system turn in messages (#3392, kongkongklng)
The follow-up to 8ecab590, after the reporter merged it: the first Codex turn through an xAI key went through and every one after it 400ed "Could not decode the compaction blob. Ensure it is unmodified from the compact response." — Codex hands the sealed reasoning item back with "content": null beside its encrypted_content, which xAI's backend can't read. The Grok subscription's plugin already drops that null (grokShaped), but the xai preset shapes nothing, and the custom-tool refusal had only now let a second turn reach the API. And every Claude call 400ed "Invalid request content: Invalid message role.": Claude Code sends a system turn mid-conversation (Anthropic made them GA), a role xAI's Messages takes only as the top-level system. xaiBody (api.x.ai, shaped in passthrough and on the built body in forwardTranslated alike — a custom-tool refusal puts a Codex request on the translated path from the next turn on) drops a reasoning item's null content and folds each system turn into the top-level system, its text and blocks as they came. Nothing is learned: xAI takes neither at all. TestXAITakesCodexsSealedReasoningBack, TestXAILearnsCustomToolsThenTakesTheReplay and TestXAIFoldsClaudesSystemTurn replay the reporter's session on a fake api.x.ai and are red with the shaping off; the wording comes from the report. gofmt clean, go vet and the builds (native, linux nogui, windows) clean; go test -tags nogui ./... in a sandbox HOME: 66 packages ok, the same 7 test failures as the clean branch head baselined the same session (TestWriteAtomicReadOnlyHardLink, TestClaudeClientCacheAbsentUnchanged, TestCodexFittedImagesPastTheBudget, TestMarshalRawIsEncodingJSON, FuzzMarshalRaw, TestPluginSOCKSProxy, TestProgram). Not tried against the real xAI API: no key here. From skygunner's branch fix/issue-batch-1024pm; kongkongklng confirmed it on 10-25. |
||
|
|
b630304322 |
gateway: an upstream naming the type an unknown variant custom turns custom tools to functions (#3392, kongkongklng)
xAI's Responses API answers a custom tool with 422 "Failed to deserialize the JSON body into the target type: tools[N].type: unknown variant `custom`, expected one of …" — Rust's own wording of a type it doesn't know, which customToolRefusal didn't match, so the request wasn't offered again with its custom tools as functions (the #2656 path) and Codex saw the 422. customToolRefusal now also takes "unknown variant `custom`". The refusal is tested with the reporter's wording, bare and in an error body, and a variant that isn't the custom type itself stays no refusal. Verified: go test ./internal/gateway -run Custom -count=1 (21 tests, green; the two new wordings red without the fix). gofmt, go vet clean. This is the #2656 path (321sssrt-bit) meeting a new wording. From skygunner's branch fix/issue-batch-1024pm; kongkongklng confirmed it on 10-25. Co-authored-by: 321sssrt-bit <298505031+321sssrt-bit@users.noreply.github.com> |
||
|
|
9e33962c05 |
gui: Settings has Reduce motion, stilling magpie as the system's does (#3813)
CupOfBread asked for a switch that turns magpie's motion off to save
resources on the desktop, and linull24 saw the Routing page keep a
phone's browser busy. magpie already stills its animations under the
system's Reduce Motion: 46 @media (prefers-reduced-motion: reduce)
rules across app.css and the plugins' styles, and calm() in the
scripts. Settings -> General now has "Reduce motion" (Off / On) that
does the same without the system setting.
- settings.json keeps reduceMotion; boot.js passes it; a POST that
leaves it out keeps it, as the other prefs.
- theme.js's holdStill(on) sets data-motion="reduce" on <html> and sets
the media of every stylesheet rule written for reduced motion to
"all" (and back when turned off), so the same rules apply and no CSS
is written twice. layout.js calls it before the first paint when the
saved setting is on; applyPrefs calls it on a change.
- calm() is true when data-motion is reduce too, so the scripts'
motion (Routing's stage, Library, Usage) holds still with it.
- routing.css: the reduced-motion rule for the live dot was
.rt-livedot, which lost to .rt-livedot.on's animation; it is now
.rt-livedot.on, so the dot stands still with either setting.
Measured on mote (Chromium 390x844, 4x CPU throttle, live Routing
traffic, CDP Performance over 10s, two runs each): main-thread task time
0.18 and 0.22 s/s with it off, 0.090 and 0.085 s/s on; style recalc
0.021/0.025 off, 0.008/0.011 on.
Tests: reduce-motion.test.cjs (new, both engines): saved on, the
reduced-motion rules apply from the start (a probe's live dot has no
animation, calm() is true); Off restores them and posts false; On again
posts true. TestSettingsReduceMotion: off by default, kept by a POST
that leaves it out, cleared by false, in settings.json and boot.js.
The Settings row is in settings-general's list of rows.
Run on mote at this head (rebased on
|
||
|
|
ceaebd6b0b |
gui: Codex's descriptions, predictions and titles pickers are one function
renderCodexDescriptions, renderCodexPredictions and renderCodexTitles were the same 20 lines three times, differing only in the setting's key, the button's label, the Off note and the API path. They now call one codexSidePick(s, key, aria, none, path). Each picker builds the same button, options and request as before, in the same #<key>Pick slot. It takes about 1.5KB out of the core scripts, room that the next commit (#3813's Reduce motion) needs under TestCoreScriptBudget, which stays where it is. Run on mote at the tree of this and the next commit (before the rebase onto origin/main; rerun after it is in the next commit's body): codex-descriptions, codex-predictions and codex-titles in every engine and language they cover, with reduce-motion, settings-general, i18n-keys and routing-live-calm: 56 pass, 0 fail. go test -run "TestCoreScriptBudget|TestAppScriptBudget|TestSettings|TestBoot|TestI18n" ./internal/gui ./internal/settings: ok. An earlier run of the same files on a mote at load 30 to 56 timed the browsers out at 180s (webkit zh passed there in 128s); the rerun after mote restarted passed whole. |
||
|
|
e8c7dddcb4 |
notices: the release carries the third-party licence notices
The owner asked for the licence notices in the release package (moejs alpha.11 compiles Intl's data in, which carries its own notices). THIRD_PARTY_NOTICES is embedded in the binary (main.go, //go:embed) and handed to internal/notices; `magpie licenses` prints it, GET /api/notices serves it, and Settings › About has an Open-source licenses row that opens it in a dialog, in every language. `make app` copies the file into the .app's Resources too. The core's scripts are 1,527,245 bytes, their budget raised to it with no room added; app.js stays under its own. Run at this head (rebased on origin/main): - win-run (Windows 11): go vet -tags nogui . ./internal/notices ./internal/cli; go test TestNoticesFollowMoejs (.), ./internal/cli, TestCoreScriptBudget (./internal/gui): ok. - wsl-run (Ubuntu 24.04): go vet -tags nogui ./..., go build -tags nogui: ok. Run at the pre-rebase head 14e2d13fb, on mote (macOS): - gofmt; make app's copy byte-identical to the file; `magpie licenses` output equal to the file; GOOS=linux/windows vet and build; go test . ./internal/cli: ok. ./internal/gui: only TestMainWindowCorners red, the same on origin/main (#3949). - about-notices.test.cjs: chromium and webkit, en zh zh-TW ja de, 1100 and 420px: all ok. Broken by hand: TestNoticesFollowMoejs red with the embedded file cut. Not run: the GUI suite at this head. The rebase met main's cancelAsk helper where showNotices sat, and the dialog's Done now uses it (the same stopPropagation + closeConfirmAsk). The whole GUI suite at 14e2d13fb was cut off when mote went down at load ~50: the files it reached outside About had reds, most of them 180s browser-launch timeouts, the rest passing in other languages or the other engine; they are run again once mote is back, and any that stay red are filed. |
||
|
|
1d7ca4c6b7 |
gui: every scroller in every stylesheet is held to keep the wheel; Safari 15 too
碳碳双键 (ysm119, Discord): a list scrolled to its top or foot by the wheel went on to scroll the page, "in many places". |
||
|
|
6bec526f7a |
gui: a key's rename saves once on Enter and never on Escape (#3944)
A provider's key name was edited in an input whose Escape drew the
editor again and whose blur saved. Chromium blurs the input as that
redraw takes it out, so Escape after typing saved the typed name, and
Enter, or Enter twice before the save answered, sent keys/rename twice.
The account rename already guarded this with a once flag. Both now go
through one helper, renameIn: Enter saves a changed name, Escape keeps
it, and whichever comes first ends it, so the blur that follows does
nothing. Taking the two copies into one makes app.js 93 bytes smaller;
no budget is raised.
From Coffemon's patch on #3944 (JoeyWu-tech, joey/fix/3944): the test
key-rename-once.test.cjs and its README entry taken as is. The app.js
change differs: the patch copied the account rename's guard into the
key rename; this shares it instead, to keep core script inside its
budget.
What was run (mote, Playwright 1.62.0, Chromium and WebKit, en and zh):
- origin/main
|
||
|
|
8c983ee7b2 |
gui tests: four update-* files leave WebKit's ResizeObserver notice out of page errors (#3942)
update-download-percent, update-hide, update-notes-ask and update-wait
counted every page error, and WebKit's "ResizeObserver loop completed
with undelivered notifications" (a layout that outran its observers,
no fault of the page) turned them red under load. They now leave that
one notice out, with the same filter update-release-page and eleven
other files use; any other page error still fails them.
Patch from Coffemon (JoeyWu-tech) on #3942, c5033248, reviewed line by
line and taken as is. Test only.
What was run (mote, Playwright 1.62.0, WebKit, at origin/main
|
||
|
|
63aca1802e |
gui: PenguinHarness's logo is a tile, and the app's own icons are no logos (#3858)
icon-tile was red on main: PenguinHarness's logo ( |
||
|
|
84ada9dc80 |
gui tests: phone-web's tap scrolls by code once, as view-wheel-unheard does (#3876)
phone-web's "a tap's click is no flick" scrolled by code 40px a frame for five frames after the click. Since |
||
|
|
03a8d981ea |
gui tests: quota-refresh-order runs again, with seven more orders (#3679)
|
||
|
|
67c8f562cd |
codex: a subagent named a model goes on it with "Same as the lead" (mengxiao on Discord)
mengxiao left Codex's subagent model at "Same as the lead" in magpie, asked the lead for a subagent on GPT-6.1 Terra, and magpie put the subagent on the lead's model anyway. The cause was codexFollowTo (internal/gateway/codex_follow.go): on the ChatGPT-sign-in path, a collab_spawn request asking for one of Codex's bare models, with nothing set in magpie or [agents] default_subagent_model, was moved onto the model the conversation's own turns go on ( |
||
|
|
a57c95513c |
LESSONS: a run record is written once the run has ended; a red assertion hides every one after it (10-28)
|
||
|
|
a8098a8862 |
gui tests: reach wheels the page over a point no inner box takes, and the routing editor is pressed once its motion has stopped (#3408, #3409)
Three Routing GUI files were red on main, bisected on mote from |
||
|
|
dfbd37eafc |
docs: a reporter's fix branch, patch or fixtures are credited in the commit
321sssrt-bit's analysis, fixtures and fix branch went into #3418, #1981 and #2033 with no co-author line. Now: a reporter's fork branch is merged with their commits as authored, anything else we use from them gets Co-authored-by, and a plain report is named in the body. Docs only; nothing reads this file's text. |
||
|
|
7fd77a9445 |
gateway tests: the 192 streams' dials stay within macOS's listen queue (#3946)
TestPluginStreamsPastTheBudgetWait (#3890) dialed all 192 connections to its httptest gateway at once. macOS queues at most 128 for a listener (kern.ipc.somaxconn) and resets the rest, so the test's own client got "connection reset by peer" and the vendor saw fewer than 192 requests. A dial now holds one of 64 places until the gateway accepts it (ConnState StateNew) or the dial fails; the 192 streams still go out and stay open together, and every assertion is as it was. Patch from Coffemon (JoeyWu-tech) on #3946, 862c6e54, reviewed line by line. Changed: giving a place back never blocks (select with default), on the accept side too. The accept runs in the server's accept loop under httptest's lock, so a blocking receive there could hang the listener and gw.Close if a connection were ever accepted without a place (a dial that failed after its handshake). What was run (mote, macOS, go1.26.8, at origin/main |
||
|
|
189db9ba5b |
redact: ids, digests and 毛利 go as written; the slider reaches known values; a user name goes as a made-up name
Reports on X under the masking demo (10-28):
_kaichen: "hash类型也会被过滤…长int,假如以1为开头的…会被当作电话被mask;
"毛利低"也会被当作人名被mask。即使把匹配拉到 0.95,也是一样行为".
- Hex digests: 16 to 31 hex digits in one case, with letters and digits
both (a cache key, a short commit), are ids now (digestShaped in
ids.go), like UUIDs and 32+ hex. The rules' SECRET keeps one only under
a credential's field or a CJK/prose key with no field word (密钥为…);
the model's SECRET is dropped under a field named for something else
(cache_key, commit, object, blob, file, content, revision, partition,
shard, bucket, dedup, lookup, row, sort) and on a JSON object's key
(nameOfField). A bare `key` after api/access/secret/private/signing/
license is still a credential (keyPhrase). The IBAN case kept its mask
through the letter/digit minimums.
- 11-digit 1x numbers (phone.go, phoneAt): a phone with +86/86, as the
value of a field whose name says phone (phone, mobile, tel, cell,
contact, 手机, 电话, `number`), or in prose with no id word right
before it (order, id, no., #, 订单号, 编号, 单号, 流水号…). Under
order_id/uid, after 订单号, or with a letter or digit against it, it
goes as written. PHONE and BANK_CARD are bounded by alnum, not digits,
in the rule and in known values.
- 毛利: zhWords gained 毛利, 毛重, 毛坯, 毛巾, 毛衣, so 毛利低 (a margin)
is no surname+name. The model still finds 毛利兰 (Guard). 毛利小五郎
(indekkusu141209) is masked by neither model nor the rules now.
- The slider: a value masked once was masked again as known whatever the
threshold. Each value now remembers the highest score it was found
with (rules count as sure, ruleFound), and knownSpans skips one under
Options.MinScore, which masking sets from pii.Threshold.
eerttreeeert: with mimo-v2.6-flash the home folder went as
C:\Users\{{USERNAME_…}}; the model took it for a temp folder and set out
to delete it. With the user name switch on, it now goes as a made-up name
of 8 lowercase letters (HMAC of the name, same every turn, standIn in
shape.go), restored in replies and tool calls like any placeholder;
Preview shows the same name.
Docs: docs/subsystems/gateway-routing.md masking bullets, and the site's
masking page (en, zh, ja) on mobile ids and the user name.
Run (mote, at this tree on base 6af83172d; rebased onto
|