Files
magpie/docs
yetone 3300616492 gateway: a request being masked has the phase redact, and its row says masking
fremontdango on Discord: a Claude Code request to deepseek/deepseek-flash
sat on the Routing page as "routing…" for a long while that it was
actually being masked (Settings → Privacy). The placeholder route shows a
held request after 15s with nothing to say what holds it.

noteRedacting (redact_phase.go) wraps every masking, at the one place
each route masks through: redactedHits and maskTextHits in redact.go
(chat, Codex backend, search, images, video, System One, embeddings,
audio, count_tokens). It keeps noteMasking's exemption from the unrouted
limits, sets the request's phase to "redact" (notePhase, on
/v1/magpie/concurrency) and puts Route.Phase "redact" on the route that
shows it, its own or the unrouted placeholder, until the last masking at
once ends. A route that is done never carries it. It holds no text.

The Routing page says "masking…" for such a row, in the list and the
panel row, in every language (plugins/routing/i18n.js: 脱敏中…, 脫敏中…,
マスク中…, maskiert…).

Run, in a copy of this commit's tree:
- go test -race -count=2 -run 'TestMaskingIsAPhase|TestNoMaskingNoPhase|Unrouted' ./internal/gateway: ok
- routing-masking.test.cjs, chromium and webkit, en zh zh-TW ja de: 10/10
- gofmt -l, go vet ./internal/gateway: clean
The full suite is in the next commit's body, at the pushed head.

Broken by hand, each red: noteRedacting without notePhase (phase ""),
redact.go back to noteMasking (phase and route ""), showLocked without
the phase; waitWord back to "routing…" (5/5 GUI red per engine).

Not tried: a real local masking model (the Windows box, its GPU); a
masking that starts after a route is already shown (showRedacting at
the start) has no test that fails without it.
2026-10-27 08:08:23 +08:00
..