eiyuuzaki2333 on X: the Gateway page showed Pi's calls, the Masking page
records from dsh alone, and nothing said whether Pi's requests were
masked. They were: a Pi turn goes through the same masking as every
agent's, on each API Pi uses (chat completions, responses, messages),
with no agent or protocol scoping. But a record is made only for a
request masking changed (noteMasked: hits or held values), and the
page's agents came from records alone, so an agent whose requests
carried nothing to mask didn't appear at all, the same as one never
masked.
Now, while masking is on for a request (redactionWantedFor, a key's own
switch included), the gateway counts it under its agent
(maskrec.Checked): looked over, and whether masking changed something,
or sent as written to a model the user set to go unmasked. The counts
hold no text: a small checked-<day>.json beside the day's records,
written over through temp and rename at most every 5 s, read back after
a restart, pruned at 30 days with the records and removed by Clear
records. /api/masking/summary returns them as checked.
Counted where a turn's masking is decided: serve (every routed chat
turn, plugins and groups included), Codex's own sign-in's /responses
turn, and the native API passthroughs (nativeArk, nativeAny). Not
counted: searches, images, video, embeddings, System One's decisions and
Codex's compactions, which are not an agent's turn; they keep their
records as before.
The Masking page's card lists each agent under the flow: "Pi · 128
checked · none to mask · 3 sent as written". A click narrows the list
to it; the agent picker lists checked agents too; and a list with no
records says "128 requests from Pi checked, and none carried anything to
mask" instead of "Nothing masked matches these filters". Strings in zh,
zh-TW, ja and de.
Run (code at this head; first at base c41fa8e47 on mica, then rebased
on origin/main d987cc7d5 on mote):
- c41fa8e47, mica: go test ./internal/maskrec ./internal/gateway
(-timeout 45m, 986s) ./internal/gui: ok.
- d987cc7d5, mote: go test ./internal/maskrec ./internal/gui: ok;
go test -run "Checked|Masked|Mask|Codex|Native" ./internal/gateway: ok.
- GUI on mote, Chromium + WebKit: masking-records 124/124 (every
language at 640px, en at 1100px), i18n-keys 4/4, i18n-en-no-cjk 4/4,
mask-actions, mask-alert, mask-emails, mask-value-menu, masking-demo,
masking-demo-unblurred, routing-masking, gateway-key-redact,
group-redact, redact-route, window-mask: all pass. Screenshots checked
in WebKit, en 1100 and zh 640.
- GOOS=linux and GOOS=windows go vet ./internal/maskrec ./internal/gateway:
ok (internal/gui's cross vet stops in wails' cgo, as on main); gofmt -l
clean.
Broken by hand: without the noteChecked line in serve,
TestPiTurnsCountedAsChecked fails ("three turns with nothing to mask:
{Looked:0}"); without the one in codex_backend.go,
TestCodexOwnSignInKeepsItsMaskingTime fails (Looked 0).
Not tried: a real Pi binary against a built magpie (the test sends Pi's
own headers: magpie's token, User-Agent pi/…, X-Session-Affinity, on
each of its three protocols); the counts across a real restart of the
app (the unit test reads the day's file back after a reset).