aca0f0d8a1630923bf4e8a18b3a5a8ef508fc7bc
4966
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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
|
||
|
|
b01193ef97 |
provider: Cursor's plugin min is 0.2.29, whose HTTP/1.1 Run sends blobs 16 at once
ysm119 on Discord: Cursor 30 s+ to first token, 1-4 min a turn. 0.2.28's 16-at-once BidiAppends reached only the plugin's stateless fallback; every real request goes through its native session, which still sent each history message's blob one round trip at a time when the Run fell back to HTTP/1.1 (a proxy or network that blocks h2). 0.2.29 (plugins 8f81a8a) sends them 16 at a time there too. Real Cursor account, sandbox HOME, plugin driven directly, h2 forced to fail: a 30-step agent history went from 37-39 s to first token to 4.4-9.1 s; 100 steps from 117-130 s to 9.0-13.2 s, answers correct. Over HTTP/2 nothing changed and nothing was slow (2.9-7.3 s). Run: gofmt -l clean; go test -tags nogui ./internal/provider/ on mote, ok. npm view --prefer-online shows 0.2.29 as latest. Not tried: a sandbox magpie installing 0.2.29 through the mover; the reporter's network, so whether he is on HTTP/1.1 is not confirmed. |
||
|
|
f95121dd05 |
README: sponsors in two rows of three, each logo in an equal slot
Six logos wrapped onto a row of five and a lone AIGoCode. Now a <br> after the third, and every logo is width=144 height=36 so the columns line up (SVGs keep their ratio inside the box). AIGoCode's PNG is 640x170, which would stretch at 4:1, so the READMEs use a copy padded to 680x170 (light and dark); the home page keeps the original. Run: mote-run node --test site/*.test.mjs, 45/45 pass. Rendered the rows in headless Chrome on a dark background and checked the columns line up. Not tried: GitHub's own render (it goes live with the push). |
||
|
|
dfb73a04ef |
site, README: AIGoCode's dark logo in dark mode
AIGoCode sent the logo on a navy background; the navy is taken out to transparency (colours un-blended at the edges) and the logo is placed in the light PNG's 640x170 box, so the card doesn't move between themes. Checked by eye over a dark and a white background. Ran: node --test site/*.test.mjs on mote, 45/45 pass. |
||
|
|
18b17a50b9 |
site: AIGoCode's card takes the copy AIGoCode sent
The en and zh text is theirs word for word; ja and de are translated from it. Ran: node --test site/*.test.mjs on mote, 45/45 pass. |
||
|
|
3b2794cadd |
provider: a relay's 403 in markup says its words, not a bare "403 Forbidden"
maralica (Discord #help) sent WorkBuddy through a custom Chat relay,
"magpie-grok", that serves only some agents' clients, and WorkBuddy was
told only "magpie-grok: 403 Forbidden". apiError dropped any body that
starts with "<" and isn't a whole web page (a page's fragment such as
"<h1>Forbidden</h1><p>…</p>", an XML error), and WebPage said a page
with no <title> as "a web page, not an API reply" alone, so a relay's
reason in either never reached the agent.
Now such markup is said by its words (provider.MarkupText: scripts,
styles, comments and declarations out, tags out, entities read,
whitespace folded, 300 runes), and a page with no title by its words
(120 runes, as a title). Markup with no words still says the status
alone. JSON, plain text and empty bodies read as before. Every APIError
caller and WebPage's (Unsaid, errorSaid, vendorMessage, vendorSaid) get
it.
Checked on the way, unchanged: the relay is asked for "grok-4.7" by
model "magpie-grok/grok-4.7" and by a group of it, never a magpie-named
id; with "Send the agent's own User-Agent" on, it gets WorkBuddy's
User-Agent as sent, and none of the agent's X-Agent-*, Acp-Connection-Id
or Traceparent headers (only Codex's and Claude Code's own identity
headers are passed on to a relay).
Tests: TestChatRelayRefusalSaysWhy (custom Chat provider, WorkBuddy's
User-Agent, by provider/model and by group, streaming: the model and
User-Agent the relay got, and the message for plain text, JSON, an
untitled page, a fragment, XML and an empty body); TestAPIErrorShapes
updated (untitled page, script-only page, XML, a bare XML tag).
Broken by hand: MarkupText made to return "": TestAPIErrorShapes red,
and TestChatRelayRefusalSaysWhy red in untitled page, fragment and xml
(said "magpie-grok: 403 Forbidden", the reporter's words). Restored,
green.
Run (mote, go1.26.8, tree at origin/main
|
||
|
|
ee6f8866f3 |
gateway: Claude Desktop's connection check goes to its default model
CyberCaius on Discord, v0.1.1838, after restarting Claude Desktop: as it
starts and from Test connection (Configure third-party inference ->
Gateway), Desktop said "Gateway rejected model
magpie-0958175816.anthropic.claude-haiku-5-5[1m] (HTTP 400)", the body
"AnyRouter: bad response status code 400". His default model in Desktop
is his routing group 天翼云; Routing showed leee/claude-haiku-5-5 sent to
AnyRouter gpt-6.1-sol.
Why
|
||
|
|
6af83172d3 |
gui: the masking demo shows no video where WebKitGTK can't play one (avk458 on X)
On Omarchy (Arch + Hyprland) without gst-plugins-good, opening Masking's
"How masking works" aborted WebKitWebProcess about 3s later: WebKitGTK
2.52.6 gives every <video>, muted ones too, an autoaudiosink, which lives
in libgstautodetect.so ("no such element factory autoaudiosink", then a
SIGABRT). The window was left frozen on its last frame ("一点就崩溃再点
magpie就卡死了").
Cause: b90e81da1's noVideo was only in GET /api/settings. The page's
state.settings comes from /api/state, which never carried it, so a demo
opened before Settings was visited set the webm src. The GUI fixture put
noVideo into /api/state's settings and hid it.
Now boot.js says noVideo (app only, not a browser tab) before the page
paints, and demo.js reads window.bootPrefs.noVideo; the poster shows
instead. Also, for BoyC338's memory question: folded, or with the page
left, the video lets go of its source (removeAttribute src + load), so
no decoder or buffer is held; opened again it goes on from where it was.
Run:
- mote: GUI masking-demo, masking-records, i18n-keys in Chromium and
WebKit: 116 pass, 0 fail.
- mote: go test -run 'TestBootSaysNoVideo|TestBoot|TestSettings|
TestFontSettingsAPIAndBoot|Budget' ./internal/gui ok; gofmt -l none;
vet for darwin, GOOS=windows, GOOS=linux -tags nogui ok.
- WSL magpie-desktop: go test -tags gtk3 -run 'TestBootSaysNoVideo|
TestGstAutodetect|TestWebkitDefaults|TestSettings' ./internal/gui ok.
- Real app on omarchy, v0.1.1840 release: Masking > demo row aborted
WebKitWebProcess (coredump 07:10:10 UTC), window frozen. Built this
tree with make release-linux in WSL and ran it there: demo opens with
the poster and animates, fold/reopen, Agents and back to Masking all
respond; no coredump, no autoaudiosink line, both web processes alive.
These ran at base ea53eb126; rebased onto
|
||
|
|
05ed578bdc |
gateway: a large body whose h2 ping was lost goes again unpinged (#3909)
yxd-ym, on a 2-10KB/s uplink: every large turn to a Google upstream (Antigravity, Vertex, AI Studio) failed with "http2: client connection lost" after 35-45s while its body was still uploading, and the group's failover uploaded the same ~680KB again to every member. A small turn on the same uplink was answered in 14s. Cause (skygunner's diagnosis): the vendor transport's HTTP/2 health check (netproxy.HTTP2Health, #2843) pings a connection with no frame received for 20s and drops it when no answer comes in 10s. The ping is written behind the body's own DATA, so on a slow uplink its answer can only come after the last byte, and the check closed a working connection. skygunner's branch (8eaf63866) sent every body of 64KB or more, or of no stated length, to a transport without the ping. That is most agent traffic, and it takes #2843's protection away from it: a silent connection whose kernel takes a body that fits the send buffer then waits the 10-minute header wait (TestLargeBodyOnSilentConnectionIsSentAgain below hangs to its 10s bound on that branch). The change keeps the ping on every request by default. A large body (uploading) whose try fails with Go's lost-ping error (lostPing, closeForLostPing's "http2: client connection lost") is sent once more, through GetBody (provider.SetBody keeps it until LetGo), through uploadTransport: a new connection, no ping, given up on when a write moves no bytes for a minute (WriteByteTimeout); the response header wait still ends a vendor that never answers. For 30 minutes after (slowFor, drawsApart.slow, per transport), large bodies go there at once, so a slow uplink loses one try per half hour, not one per turn. A connection that really was dead costs nothing more: the retry dials a new one either way. Small bodies and drawings are unchanged. Co-authored-by: vincent <vincent@users.noreply.github.com> Reported-by: yxd-ym What was run, on mote at origin/main |
||
|
|
f02d92c7be |
redact: a file's lines, a path, a skill and a name in code after token: are no secret
Three reports on X (10-28), each a value the SECRET rule took (Insights >
Masking: 机密, 规则). The rule takes a name with token, secret, password
or api_key in it, then : or =, then 8 characters or more with a letter and
a digit. Prompts and code have that shape where nothing is secret:
- AlpsNowX: L643-669. was masked, in two requests. A file whose name has
one of those words, then :L643-669. (internal/auth/token.go:L643-669.)
read as a field token.go and its value, and once masked the lines went
as {{SECRET_…}} wherever they came again (by known). Now a name that is
a source file's (.go, .ts, .py, .md, .json …, not .txt/.env/.key) or a
path's last part is no field, and a line or range (L643, L643-669,
L12-L40, 643:12) is no value. Siblings: token.go:643-669 and #L643-L669
were never masked (no letter / no colon); file.go:L12-40 was, and isn't.
- binary4cat: function names masked. access_token = get_access_token_v2,
max_tokens=max_tokens_v3, secret: env.SECRET_V2, refreshToken2;,
fn(token=token_v2), secretKey:=base64Encode(raw) all masked the name.
A value written as code writes a name (lower-case start, or _ or .
between words) of two words or more, one of them token/secret/password/
key/credential, is a name now; a value starting with = is Go's :=.
- AkinoNya: folders and skills with a random string replaced. Found two
routes: a path after such a name (PRIVATE_KEY_PATH=~/.ssh/id_ed25519,
token_dir=/private/tmp/claude-501/x7k2p9q1-skill,
GOOGLE_APPLICATION_CREDENTIALS=/Users/…/legacy_credentials/x7k2p9q1/…,
私钥 ~/.ssh/…), and Claude Code's plugin:skill when the plugin's name
has one of the words (design-tokens:generate-v2, secret-scan:
audit-x7k2p9q1). A path from ~/, ./, ../ or a root folder (/Users,
/tmp, /private …) with no + or = goes as written, in the CJK key rules
too; slug:slug with no space is a skill. The ~1100 real folder and skill
names on this machine (~/.claude, ~/.codex, $TMPDIR, Claude's
claude-501 dirs) in five contexts masked nothing before or after, so
the reporter's exact names are not reproduced.
Still masked (TestSecretsBesideLinesAndNames): password=hunter2pass9,
API_KEY=AbC123dEf456GhI789, token=t0k3nValue2, Passw0rd123, password123,
SuperSecret2024 (PascalCase stays a password), token: Lk8x9QmP2vR4,
secret.txt:hunter2pass9, x-api-key:k9x2mp4qr7st1vw3 and :ab12cd34ef56,
Password=Abc12345; in a connection string, 密钥为12231241, 私钥 ab12…,
django-insecure-…; vendorchecks and the existing code tests unchanged.
Run (mote): go vet ./internal/redact for darwin, linux, windows; go test
-count=1 ./internal/redact ./internal/masking ./internal/pii/...
./internal/otlp ./internal/sessions ./internal/settings ./internal/gateway
at base
|
||
|
|
f79817f572 |
gateway: tests that a mixed, fallback or stood-in route is masked (#3973)
|
||
|
|
bc3ddc661a |
redact: 文案 and words like it are no Chinese names (zeewell on X)
zeewell on X: tasks kept going wrong because 文案 was masked as a name,
so they turned names (and birthdays) off. 文 is a surname, and zhName
took a cue around 文案 that says nothing about a person. Probing words
that start with a surname (文档, 方案, 关键, 项目, 成本, 段落, 颜色, 查询,
时区, 简历, 林间, …, ~130 of them) in the places a prompt has 文案, about
110 were masked, through two cues:
- 一下 before it (改一下文案, 检查一下文案,) counted as "a person comes
next". 一下 follows any verb, so it now counts only after one that asks
a person (zhAskVerbs: 问, 找, 联系, 通知, 提醒, 回复, …): 问一下张伟
still is one, 改一下文案 is not.
- At a sentence's start, a word after it that any subject takes (已经,
明天, 今天, 昨天, 他, 她, 提交, 负责, 回复) counted alone: 文案已经改好了,
文案明天给你, 文案他们说. Those (zhAnyAfter) now count only with a
person's cue before (客户张伟已经到了). 说明, 说法, 讲解, 讲座, 讲义, 讲究
are words, not 说 (文案说明), but for 说明天 (张伟说明天来).
- zhWords gets ~150 more common words (文案, 文风, 关键, 项目, 段落, 林间,
…) for where a real cue is before a word (发给文案, 请文案), and is a
set looked up by a candidate's first two characters rather than a scan.
- The model's own PERSON span that is such a word whole (文案) is
dropped too (modelTakes), the other route a word reaches a name.
Old data: masked values are remembered in memory only, and 文案 (6
bytes) is under minKnown, so nothing stays masked after the update.
Fixtures are prompts with 文案 where the report gives no sentence (帮我
改一下这段文案, 文案:…, 把首页文案换成英文, ### 文案, 文案和图片, 文案已经改好了,
文案说明要简短, 这张图发给文案。), beside names in the same places that
still mask (问一下张伟,, 张伟说明天来, 客户张伟已经到了, 发给张伟。);
TestChineseWordsAreNoNames runs 25 listed words in 10 shapes plus the
model's label, and 5 unlisted ones (文创, 方位, 高铁, 安防, 林荫) through the
cue shapes alone. Every TestChineseNames case stays green.
Run (mote, mote-run, at this tree): go vet ./internal/redact for darwin,
linux and windows ok; gofmt clean; go test -timeout 45m of
internal/redact, masking, pii/..., otlp, sessions, settings, gateway
ok; internal/gui red on TestMainWindowCorners/macOS_26_SDK only, the
macOS 27 red filed as #3949 (no redact in it).
After rebasing onto
|
||
|
|
8edb9dbb75 |
gateway: a compaction a model answers with a tool call is asked again as text
Lucy on Discord (v0.1.1676, Codex, group/auto-deepseek-v4-1-flash): "compaction: group/auto-deepseek-v4-1-flash failed to summarise this conversation 3 times in a row (last: the model wrote no summary (it answered with reasoning, function_call exec_command))", so Codex could not compact at all with that group. Cause: the summary request offers no tools (tools [], |
||
|
|
a57ec01683 |
provider: Cursor's plugin min is 0.2.28, which doesn't wait on a failed model list or send HTTP/1.1 appends one at a time
ysm119 on Discord: claude-opus-5-5 through the Cursor plugin takes 33-36 s to its first token and 83-253 s in all. Two waits on our side, both fixed in the plugin (magpie-community/plugins fc14571, d9c858c, 944610f): - A chat request picked its variant from AvailableModels (up to 30 s) before its Run, and a list Cursor couldn't give was asked again, and waited for, by every request. Now a stale list is used while a new one is asked for, requests at once share one ask, and after a failed ask requests go without it for 5 minutes. - Over HTTP/1.1 each history message's BidiAppend waited for the one before it. Now up to 16 go at once, as cursor-agent 2026.10.01 sends them; a native session's Run stays one at a time. 0.2.28 is on npm (npm view --prefer-online). 0.2.27 never reached npm on its own: its publish run went red on a test token collision, fixed in 944610f. Run: gofmt -l (clean); on mote go build -tags nogui ./... and go test -tags nogui ./internal/provider/ (ok). Plugin side: bun test packages/cursor 314 pass on mote and on Linux; the whole plugins suite 2997 pass; the publish run's test job green. Broken by hand (plugin): the old index.mjs turns all three listwait.test.mjs tests red; openH1 back to one at a time turns the new http1 test red. Not tried: a real Cursor account (its token is in the Keychain), so whether these are the time ysm119 sees, or Cursor's own, is not measured; not the full go suite (a one-string min change). |
||
|
|
ea53eb1262 |
gateway: a request to an unmasked route isn't masked first (#3973)
wangbinyq (#3973): with masking on, a request to a provider set to go unmasked was still masked whole before routing, then sent as the agent wrote it, so the masking was thrown away. In their log that was 97.9% of magpie's own time: median 560ms, p99 16s, max 219s. serve now masks after Resolve/FindGroup. When unredactedRoute holds and no body goes anywhere else (bodiesKeptAway: no observer wanting bodies, no request archive), masking is skipped. The redact writer goes under capture, an order that commutes with the old one. A turned-away request is logged masked (maskedCopy). count_tokens masks only when its route isn't unmasked. The context card's text stays masked: the kept body is masked when PromptText first reads it (keptBody.plain), not on the request's way. The log and recent calls keep the body as it went. Run on mote at this tree (base |
||
|
|
d74ef5e04c |
gui: an inner list wheeled to its end keeps the wheel; the page stays put
碳碳双键 (ysm119, Discord): wheeling the Usage page's request list to its top or bottom carried on into the whole page, and "this happens in many places". It is the class: every box that scrolls inside a scrolling page. app.js marks such a box `.holds` while it overflows vertically, on pointerover and on each wheel (the box under the pointer and its ancestors up to the .view), and app.css gives `:where(.holds)` overscroll-behavior-y: contain, which keeps the Mac's bounce on the box. Not one CSS rule for every overflow:auto box: in Chromium `contain` holds the wheel even in a box that doesn't overflow, or is overflow:hidden, or only scrolls sideways, so short lists and the heatmap's and ledger's sideways scrollers would have stopped the page. The .view itself is never marked. :where() weighs nothing, so .mchips in a short window (@media max-height 640px, #833) still passes the wheel on. The new test, inner-scroll-contain.test.cjs, wheels the Routing page's requests list past each end (en and zh, 900x560 and 1300x600, under "By session" / 未提供会话标识), and ten kinds of inner box, and asserts the page's scrollTop didn't move. A short list, heat-scroll, led-wrap and snip must still pass the wheel to the page. routing-scroll-end now wheels over the page's gutter: at its view centre the pointer sat on the requests' list, which now keeps the wheel at its end (600 of 1066). Run (mote, Playwright 1.62, Chromium and WebKit): - inner-scroll-contain 40/40. - 17 files: inner-scroll-contain, click-scroll, routing-scroll-end, routing-sessions, view-wheel-after-click/-after-redraw/-unheard, heatmap-scrollbar, ledger-hscroll, ledger-hscroll-foot, context-scroll-end, menu-scroll, provider-levels-scroll, panel-usage, panel-routing, qoder-cn-tile, agent-disconnect: 268/287. Reds were routing-scroll-end (this change, fixed above) and panel-usage webkit zh (#3311, commented). Rerun of routing-scroll-end, panel-usage and inner-scroll-contain: 66/66. - go test -tags nogui ./internal/gui ok (TestCoreScriptBudget passes at the rebased head: core under 1,526,556, app.js under 1,310,460; no budget raised). Broken by hand: the old app.js and app.css: the requests list and every held box red in both engines (mchips aside, it had contain already). Only the CSS rule removed: red, "the page didn't move" x8 plus each held box x2. Only the overflow check removed: a short rt-reqs red (Chromium), led-wrap and snip red in both engines. Not run: full GUI suite (mote was busy with another session's suite). Not tried: WebKitGTK on Linux, WebView2 on Windows, a real Mac's trackpad rubber band and momentum in the app, older macOS WKWebView, touch; zh-TW/ja/de (no strings changed). |
||
|
|
f0d42fbe32 |
gui: one cancelAsk for a confirmation's dismiss-only buttons, one Qoder risk note
Twelve buttons in app.js (eight Cancels, three OKs and a Later) each had
their own copy of `(e) => { e.stopPropagation(); closeConfirmAsk(); }`;
they now share cancelAsk. The Qoder and Qoder CN rows carried the same
risk note twice; it is QODER_RISK now. Behaviour is unchanged. This
makes room under TestCoreScriptBudget for the next commit, without
raising the budget (core 1,526,515 of 1,526,556 before).
Run (mote): go test -tags nogui -count=1 ./internal/gui ok (budget and
asset tests). The GUI suite ran on the next commit, which holds this one.
Not tried: nothing by hand beyond the suite; the buttons' code is the
same function moved.
|
||
|
|
a41d0d5098 |
redact: the demo's notebook has a square icon and its entries under the header
The owner's screenshot of the masking demo's "小鹊的小本本" box: the notebook icon was stretched tall, and the two entries overlapped the subtitle and each other. - The icon carried the class "acc", which app.css already styles as an accounts row (flex, min-height 38px, padding), so the 22px tile came out 38px tall. It is xq-acc now; none of the demo's other short class names (on, done, hot, ok, hl, far) has an app.css rule of its own. - The entries were placed at fixed tops (40 and 81) under a header that is ~41px tall in CJK fonts. They are a flowing list now, after the header: each entry is its placeholder pill over its value, 5px apart, and a highlighted entry gets a soft background instead of colliding. The flyers already land on the values' measured positions, so the animation follows. - German's title "Notizbuch der kleinen Elster" wrapped to two lines in the 220px box and pushed the last entry 14px out of it (the existing no-clip check caught it). It is "Notizbuch der Elster". Test: masking-demo's layout test checks every box icon is 22×22 and that each notebook entry starts at least 4px below what is above it. Run at this tree ( |
||
|
|
60520ddb3b |
moejs: v0.1.0-alpha.11, at its new module path github.com/MoeForge/moejs
Gateway middleware and agent plugins run on moejs. alpha.11 moves the
module to github.com/MoeForge/moejs; every other API change since
alpha.4 is an addition. What magpie gets: faster calls, loops, property
lookups and JSON.parse, allocation-free await, a bytecode verifier, a
correct default.pgo, and Intl / toLocaleString in plugin code.
Checked against both tags' source: every name magpie uses (NewRuntime,
Options, Compile, Link, Hook, Value, Arg, Undefined, NativeFunc,
Referrer, the Promise results, Exception) has the same signature, and
Options' defaults (shared frozen builtins, no timers) are unchanged.
fetch, Streams, URL, node:fs and node:buffer live in the separate
webapi and node packages, installed only on request; magpie installs
neither, so a plugin still reaches no network or file.
Intl's CLDR, Unicode, ICU and V8 material is compiled into every build,
and moejs asks a program that includes it to carry sections 1 to 4 of
its notices. THIRD_PARTY_NOTICES holds them verbatim. Release archives
ship no LICENSE today either; that is not changed here.
Doc and site links (docs/, site/public/docs/{,zh/,ja/}plugins.html)
point at the new repo.
Run on mote at this tree: gofmt; go build -trimpath -s -w (60,670,658
bytes on origin/main
|
||
|
|
58fb3a7786 |
redact: 关键发现, 易触发 and 和边界 are words, not Chinese names
xuanwo on X: with the model on, a report's words were masked as names, 关键 in "### 关键发现", 易触 in "`gh pr view` 易触发" and 边界 in "判断和边界,". Each starts with a surname (关, 易, 边), and zhName took a cue around it that was too weak alone: - 发 and 打 after it counted as the verb a person does. They now count only when no Han character follows, or one of 了个给过一 (发了个消息, 打给他); 发现, 打开 begin a word. - 和 and 与 before it counted as "a person comes next". They join like to like, so they now count only when a pronoun or what may be a name (a surname and 1-3 characters, no zhWords word) is before them: 吴敏和郑浩, 我和张伟, not 判断和边界. - A sentence started after any space or symbol. A space after a word or code is inside a sentence, so the start is now after punctuation (with spaces after it or none) or at the text's start; a backtick no longer counts. The fixtures are the reporter's literal lines, beside names around the same cues that still mask (### 张伟发了个消息, 我和张伟,, 这件事。 李娜说过). Run (mote, mote-run): go test ./internal/redact (TestChineseNames, TestMaskEval and the rest) ok; gofmt clean. Broken by hand, each red on its own case: the 和/与 rule off (边界), wordAfter off (关键发现), sentenceStart always true (易触发). Running as this is pushed: vet (darwin, windows, linux) of internal/redact and go test of redact, masking, pii, otlp, sessions, settings, gui and gateway. Not tried: the real model on the reporter's whole session; a name that starts after a space following a Chinese word (这件事 李娜说过) is now left, as one inside a sentence. |
||
|
|
a3ee00c05c |
codex: its own GPT models stay in Codex's list when kept for routing groups
士奇 (Discord, 10-28): with a routing group on, the Agents page's Codex list lost its Codex provider section and models, the model dropdown still offered GPT, but the Codex app had none; with the group off they came back. Cause: the codex provider's "Only through routing groups" (Provider.Unlisted, 只通过路由分组使用), or a group that lists itself alone (Group.Unlists), took the ChatGPT account's own models out of Catalog(), so out of Codex's own list too. With no Codex section, the own options were not magpie's, so the own-models switch showed and the picker kept offering GPT; meanwhile #1602 ( |
||
|
|
7323255b4e |
gui: the Windows app's confirmation backdrop goes without blur too (#3980)
Henry-916's change (the commit before) took the blur off the provider editor's full-window backdrop in the Windows app, where WebView2 on an Intel UHD D3D11 GPU stalled under it. The Remove/Sign out confirmation (.action-confirm, a <dialog>) blurs the whole window behind it the same way through ::backdrop, so it is scoped out by the same win/web rule. modal-backdrop.test.cjs now shows that dialog and checks its ::backdrop. Not changed: .pop, the panel's open profile chips and Settings' sticky header blur too, but over a popover's or a header strip's area, not the window's; nothing measured them as slow. Run at this head (mote): - node --test modal-backdrop: 24 of 24 ok. Broken by hand (the ::backdrop selector dropped): both Win32 desktop cases fail "nor the confirmation's". - chromium: modal-backdrop, dialog-backdrop-drag, segment-press-dialog, gui-zh-tw, gui-ja, gui-de, i18n-keys, codex-signout, account-discovery: 93 ok, 0 fail. The same less modal-backdrop and i18n-keys with BROWSER=webkit: 37 ok, 0 fail. - go test ./internal/gui: one red, TestMainWindowCorners/macOS_26_SDK on macOS 27, filed as #3949; nothing in it reads CSS. Not tried: the real Windows app; the reporter measured the modal's blur there (67 → 165 rAF callbacks a second). |
||
|
|
824100f30f |
gui: keep Windows modal backdrops responsive without blur
Disable full-window modal backdrop filtering in Windows desktop windows and tray panels, retaining the dimming veil. Browser pages and other platforms keep their existing blur through the existing win/web markers. Document the platform behavior in the GUI shell reference. On an affected 0.1.1805 installation with WebView2 155.0.4283.62 and Intel UHD D3D11, disabling the filter made provider tests visibly responsive. The reporter confirmed the improvement. Scripted scrolling measured roughly 67 to 165 rAF callbacks/s, not presented FPS. Verification: modal-backdrop.test.cjs fails on the original CSS in both Windows desktop Chromium cases (blur instead of none), with the other 10 cases passing. After the fix, 45 targeted tests pass across Chromium and WebKit: modal-backdrop, dialog-backdrop-drag, segment-press-dialog, gui-zh-tw, gui-ja and gui-de. node --check and git diff --check pass. The full GUI suite, Go vet/build/test matrix and native macOS/Linux tests were not run. |
||
|
|
a463b3ede2 |
gateway: the Codex app's page state is metadata, not the user's words (#3418)
What: <external_codex_apps_open_page> joins the injected leads in
prompt.go, beside the Codex app's <in-app-browser-context …>: a user
text that begins with it is what the agent put in as the user, not
words of theirs. Codex sends the open page's state as a user message
(<external_codex_apps_open_page>{"page_id":null}</external_codex_apps_open_page>),
and userWords took it for the user's. With pasted files and an empty
"My request" — which keeps only what follows the heading — it was the
only text left, so the classifier was asked about the page state alone
and an order group fell to its first member for the whole turn.
Everything that goes by userWords skips it alike now: no turn of its
own (turnIn, the prompt breakdown's turns), no words for the classifier
(userText, firstWords), nothing for a plugin's query or Copilot's Auto
to pick on, and — through agentNotice — a page state after a tool
result closes the result without being marked as the user's. The title
digest already skipped the marker (title_link.go); the two lists say
the same again. Whatever the marker wraps goes with it, JSON or not
(the check is the prefix); a "My request" that holds the user's words
still classifies on those alone.
Run: user_said_test.go grows the page state (three rows in
TestUserTextSkipsWhatTheAgentPutIn, codexPage in
TestUserSaysPastAReminderWithASource) and
TestIntentSkipsWhatTheCodexAppPutIn asks the group end to end. All
three are red on the parent (the classifier is asked once, with the
page state alone, and a rule matches on it) and green here, beside the
#1826 tests they extend; with prompt.go alone put back they are red
again. go test -tags nogui ./internal/gateway -count=1 green (357s);
gofmt -l clean; go vet ./... on darwin, GOOS=linux -tags nogui and
GOOS=windows clean; go build ./... on darwin and the nogui CLI on
linux and windows.
Generated-by: GLM-5.3-Flash (ZCode)
Ported from ggbdpq's fork (hunt75-b-page-metadata, f8347ce50), as
written, onto origin/main
|