TestCodexOwnModelUnreached went red on ubuntu CI at 0ddcf28a1 (run
39742463965, shard 2): it closed an httptest server and pointed
codexAPIBase at its URL, Linux handed that port to another test's server
at once, and its fake answered "pong" with 200 instead of the dial error
the test is about. The same class as 9a852ae9d and d0ccbbebc.
Both tests that took a dead URL from a closed server now use
http://127.0.0.1:1: refused at once on every OS, and no test can listen
on it (privileged on Linux and macOS, unused on Windows). The sibling is
TestMirrorFailuresAreTheMirrors in internal/update, whose "gone" mirror
had the same race.
Run at this tree: go test -count=3 -run
'TestCodexOwnModelUnreached|TestMirrorFailuresAreTheMirrors'
./internal/gateway ./internal/update: ok; go test ./internal/update: ok;
gofmt -l none; go vet for darwin, linux, windows: ok. The reuse itself
wasn't injected; the CI log's 200 "pong" body is the evidence.
What: netproxy.Redact is the one place a proxy address is made fit to
show. It is the rule 708ae4144 (#852) gave the Settings status
(proxyAddress, now Redact): the userinfo is left out, the rest kept as
written (no scheme added to one written without), a malformed address
"". Every place a proxy value reached text now goes through it:
- provider/logins.go: the switch's "Claude Code sessions ... go through
<user>'s proxy" log line (#1886's first).
- provider/claude_proxy_env.go: "<user>'s proxy is SOCKS" (#1886's
second).
- agent/codex_proxy.go + reach.go: the proxied drift's Detail and Addr,
shown in the GUI's pill and dialog; Codex's proxy comes from
HTTP_PROXY/ALL_PROXY/the system, which can carry a user:password.
- update/mirror.go: CheckProxy's error echoed the raw --proxy value
("not %q"); it now names it redacted, or not at all when malformed.
- netproxy.Describe already went through it.
Why: an account proxy like http://alice:s3cret@10.0.0.2:8080 landed in
magpie's log, which users paste into issues and Discord.
Swept and left alone: settings.CheckProxy's error names no value;
netproxy.DialSOCKS's error names the host only; Go's transport errors
(proxyconnect, socks connect) name host:port, not userinfo; the GUI's
provider editor and Settings field return the proxy whole as the
user's own editable value; env injection (EnvWith, ForBun, wslrun)
must carry it whole.
Tests place the credential where the user writes it: http, https,
socks5, socks5h, with and without a scheme, percent-encoded user and
password, user alone, malformed. TestRedactLeavesOutUserAndPassword,
TestClaudeAccountProxyLogsNoCredentials (captures the log over real
switches; Claude Code's HTTPS_PROXY still gets the proxy whole),
TestCodexProxiedDriftShowsNoCredentials (the probe still goes through
the whole proxy), TestCheckProxyErrorShowsNoCredentials.
Run: each site reverted alone turns its test red (logins.go,
claude_proxy_env.go, reach.go, codex_proxy.go, mirror.go; Redact
keeping the userinfo turns Redact and Describe's tests red). gofmt -l
clean; go vet ./... on darwin, GOOS=linux -tags nogui, GOOS=windows.
go test ./... at 0dd821c13 + this, sandbox HOME: 47 packages ok;
agent, gateway and library timed out at 10m on a machine at load ~20,
then on rerun hit ENOSPC (the disk filled from other sessions). Rerun
with space: library ok in full; agent's TestClaudeOutputTokens and
gateway's TestGroupFirstTokenFailsOver (the ENOSPC ones) ok, with
every Proxy/Proxied test in both. Not tried in the GUI by hand.