proc: the login shell's variables count only when exported, and Codex's proxy detail names the variable it read (#2627)

ReneXiong: Codex showed the "proxied" drift, "through the proxy at
http://127.0.0.1:7890, set in HTTP_PROXY", while Codex went direct. The
value was fish's universal http_proxy from an old Clash setup, never
exported (`set -S` says "unexported"), so no program fish starts has it.
shellEnv asks fish beside the login shell (zsh), and shellProbe printed
"$http_proxy" in the shell itself, which expands unexported variables too;
mergeShellEnv then filled zsh's empty value with fish's.

Fix at the shared reader: every shell is now asked to run
/bin/sh -c 'printf ... "$PATH" "$CODEX_HOME" ...', the form nushell already
used (still with its ^). A child sees only exported variables, so each
value is what an agent started from that shell gets. This covers every
reader of the probe: Codex's proxy (codexEnv), Claude Code's provider
switches (claudeShellEnv), and agentenv.Vars such as CODEX_HOME and
CLAUDE_CONFIG_DIR that magpie takes into its own environment; an
unexported zsh or bash variable no longer counts either, which matches what
an agent run from that terminal sees. Proxy variables are still merged from
fish when the login shell has none: a fish user who exports one runs Codex
with it from fish, so taking proxies from the login shell only (the
report's other suggestion) would miss that case.

codexProxyFor named HTTP_PROXY (or HTTPS_PROXY, ALL_PROXY) for a value in
the lowercase variable. It now names the one it read, in both the reqwest
and respect_system_proxy paths, and the detail's NO_PROXY advice matches a
lowercase name too (and not "the system's proxy settings").

Other proxy readers checked: the daemon's carried env, wslrun's proxyVars,
netproxy and the plugin host read magpie's own environment, not a shell;
the WSL probe scripts ask for no proxy variable.

Tests: TestLoginEnvUnexportedNotCounted, a login shell with the reporter's
literal values unexported beside an exported NO_PROXY; TestShellEnvRealFish
now writes the reporter's literal fish_variables lines and checks that
http_proxy, https_proxy and all_proxy read empty;
TestCodexProxyNamesItsVariable. Broken by hand, each went red: the old
in-shell printf (unexported values read back, in the fake shell and in real
fish 3.7.1), and env() naming keys[0].

Run: go test ./internal/proc and the codex proxy tests on darwin;
TestShellEnvRealFish, TestShellEnvFishLogin and
TestLoginEnvUnexportedNotCounted on real fish 3.7.1 in an alpine container
(linux/arm64), green with the fix and red without it; gofmt -l clean; go vet
-tags nogui ./... for darwin, linux and windows; the full go test -tags
nogui -timeout 45m ./... under pipefail, both fixes together on
origin/main ec6454395: exit 0, 66 packages ok, no FAIL.

Not tried: the reporter's Mac with fish itself, and nushell (not installed
here; TestShellEnvNushell's real-nu part skipped, its probe-shape check
passes).
This commit is contained in:
yetone
2026-10-17 05:35:45 +08:00
parent 742d6c06e0
commit df3734b959
5 changed files with 119 additions and 27 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ something else shows up as drift.
- The other way round, a value that names one of magpie's models the agent isn't shown (kept from it by `magpie visible` or a model not ticked for it), a model of one of magpie's providers that isn't on its list (a remote magpie's group added there since the list was fetched), or a `group/…` magpie has no group for, is refused by `Spell` (`notOffered`), and nothing changes. It used to be written as the agent's own: Pi read `remote/group/smart` as its own provider `remote` and model `group/smart`, and was taken out of magpie (#2376). A model shown the agent that a field offers fewer of (Claude Desktop's tiers) is still taken, and so is a value whose provider part one of the agent's own models goes by (`openai/…` in Pi) ([`agent.go`](../../internal/agent/agent.go), `TestSpellRefusesMagpieModelNotOffered`).
- `Reapply` on `unwired` sets again every field on one of magpie's models and every field set to magpie itself (`magpieID`, as `Wired` takes it): Claude Desktop's drift shows on a tier, and its `provider` field is what writes the gateway back (dumplings on Discord). Claude Desktop's `Check` judges only the set of folders whose Claude-3p it ran in last (`desktopRead`, by `desktopdir.LastRun`), every set when it ran in none: magpie writes both of an MSIX install's sets, and 2.31226 reads the real `%LOCALAPPDATA%\Claude-3p`, so the package's copy being emptied is not Desktop off magpie.
- `unreachable` never sets anything: the config is right, and the page's pill only says what has to listen. The exception is an address a WSL distro reached Windows at before (`distro.Was`, kept in `wsl.json`) while it reaches Windows at another now: the pill offers that one, and `Reapply` moves the config there (`Agent.move`, Codex's `codexMoveGateway`). An address no distro was seen at is the user's own and is never moved. An unknown answer (no probe yet) and a gateway down on loopback too are not drift. Tests stub `reachProbe` in `TestMain`.
- `proxied` (Muma102kMichael on X: every project and every new chat 502 after magpie took Codex over) is this machine's Codex sending its requests for the gateway through a proxy that doesn't pass them on, while the gateway answers here ([`codex_proxy.go`](../../internal/agent/codex_proxy.go)). Codex's reqwest takes `HTTP_PROXY`, else the system's proxy for `http://` (macOS' HTTP entry alone, never its HTTPS or SOCKS one; Windows' `ProxyServer` only when it is one address for every protocol), else `ALL_PROXY`, and lets only an exact IP or a CIDR in `NO_PROXY` (on Windows, with no `NO_PROXY`, the bypass list with `*.` taken out) keep 127.0.0.1 off it: `127.*` and `localhost` don't, and macOS' exceptions aren't read. With `[features] respect_system_proxy` it asks the system alone, matching its list itself, wildcards and `<local>` included, and goes direct when no proxy is set there; a macOS SOCKS entry alone it can't use, and takes `HTTP_PROXY`/`ALL_PROXY` then (codex-rs `outbound_proxy`; tried with codex-cli 0.162.1). Its reqwest has no SOCKS, so a `socks5://` proxy is spoken to as an HTTP one, and the probe does the same. The environment is Codex's: the login shell's `*_PROXY` (`proc.LoginEnv`, which a terminal's Codex and the ChatGPT app's both have) over magpie's own, which a magpie opened from the Dock lacks (liu_dyj on X: a `NO_PROXY=127.0.0.1` in the profile, or a macOS proxy with no HTTP entry, warned while Codex went direct). `codexProxyFor` works out that proxy the same way, and a `GET /` through it must come back as magpie's (`proxyProbe`), tried as `reachable` is. Its pill says how to fix it, as `unreachable`'s does, naming the proxy (`Addr`, `Detail`) through `netproxy.Redact`, without its user and password (#1886), while the probe goes through it whole, and the dialog has Disconnect from magpie. Account failover, which magpie writes uninvited, waits for that probe (`codexProxyOK`) and isn't written while the proxy doesn't pass Codex on, and one it wrote goes again. Tests stub the env, the system proxy and `proxyProbe` in `TestMain`.
- `proxied` (Muma102kMichael on X: every project and every new chat 502 after magpie took Codex over) is this machine's Codex sending its requests for the gateway through a proxy that doesn't pass them on, while the gateway answers here ([`codex_proxy.go`](../../internal/agent/codex_proxy.go)). Codex's reqwest takes `HTTP_PROXY`, else the system's proxy for `http://` (macOS' HTTP entry alone, never its HTTPS or SOCKS one; Windows' `ProxyServer` only when it is one address for every protocol), else `ALL_PROXY`, and lets only an exact IP or a CIDR in `NO_PROXY` (on Windows, with no `NO_PROXY`, the bypass list with `*.` taken out) keep 127.0.0.1 off it: `127.*` and `localhost` don't, and macOS' exceptions aren't read. With `[features] respect_system_proxy` it asks the system alone, matching its list itself, wildcards and `<local>` included, and goes direct when no proxy is set there; a macOS SOCKS entry alone it can't use, and takes `HTTP_PROXY`/`ALL_PROXY` then (codex-rs `outbound_proxy`; tried with codex-cli 0.162.1). Its reqwest has no SOCKS, so a `socks5://` proxy is spoken to as an HTTP one, and the probe does the same. The environment is Codex's: the login shell's `*_PROXY` (`proc.LoginEnv`, which a terminal's Codex and the ChatGPT app's both have; only exported ones, as the probe asks a child `/bin/sh` for them, so fish's unexported universal `http_proxy` doesn't count, #2627) over magpie's own, which a magpie opened from the Dock lacks (liu_dyj on X: a `NO_PROXY=127.0.0.1` in the profile, or a macOS proxy with no HTTP entry, warned while Codex went direct). `codexProxyFor` works out that proxy the same way, and a `GET /` through it must come back as magpie's (`proxyProbe`), tried as `reachable` is. Its pill says how to fix it, as `unreachable`'s does, naming the proxy and the variable it was read from, `http_proxy` or `HTTP_PROXY` as it is (`Addr`, `Detail`), through `netproxy.Redact`, without its user and password (#1886), while the probe goes through it whole, and the dialog has Disconnect from magpie. Account failover, which magpie writes uninvited, waits for that probe (`codexProxyOK`) and isn't written while the proxy doesn't pass Codex on, and one it wrote goes again. Tests stub the env, the system proxy and `proxyProbe` in `TestMain`.
- Listing never starts a stopped WSL distro. A stopped distro's agent shows what was last seen there (`asleep`, `wsl.json`); setting one of its fields writes its files, which starts the distro.
- Codex's sign-in (`login`) is ChatGPT (`""`, the default), Always ChatGPT (`chatgpt`) or magpie API (`api`). With ChatGPT, magpie's models join Codex's own beside the sign-in (`openai_base_url`), and while the Codex app holds the ChatGPT account Codex is signed in to (`codexUsedUp`, `provider.CodexUsedUp`: OpenAI no longer allows the account and it has no credits left, a workspace still within its overage excepted), magpie is made Codex's provider (`codex.out`): the Codex app sends nothing at all on an account it holds, a magpie model's turn included (#540), and as a provider of its own magpie is past that. A window at 100% with credits left doesn't count, and Codex stays signed in. Sync puts it back beside the sign-in once the account has room. Always ChatGPT never does that: Codex stays in its ChatGPT state, and the Codex app may send nothing till the account has room, while Codex CLI's turns still reach magpie by the base URL, and its routing and other accounts serve them. With magpie API, Codex's `getAuthStatus` returns no token (its provider has no `requires_openai_auth`), so its Chrome control turns away; the option's note says to pick ChatGPT to keep it (#1824). While magpie is Codex's provider (magpie API, or `codex.out`), `Joined` reports false although the `codex.joined` mark stays for Sync's way back: the Agents row said Codex's own models stay in `/model` beside magpie's, the ChatGPT state the Codex app blocks sending in, and the app only leaves that state once it is restarted (#2267, `TestCodexProviderIsNotJoined`). A Codex that reaches the gateway from another machine (a WSL distro under NAT, or `MAGPIE_ADDR` pinned beyond loopback, `onAnotherMachine(at.gw())`) is wired as one with no ChatGPT sign-in (`chatGPT()` is false there): never joined or beside, since beside its sign-in it would send its ChatGPT token to `/backend-api/codex`, and from there the gateway takes a named key alone, so every request was a 401 (#2145, `TestCodexBeyondLoopbackNotJoined`). magpie is its provider and it sends `gwKey()`, the LAN sharing key; one of its own models picked goes straight to OpenAI on its sign-in.
- Codex signed in to ChatGPT and not connected still gets `openai_base_url` while more of its ChatGPT accounts are on in magpie (`failover`, stash `codex.failover`; with a CC Switch mirror as its provider, the mirror's `base_url` and `codex.mirror_failover`), so a turn its own account has no allowance for goes on to the next — never for a Codex that reaches the gateway from another machine, where that path takes a named key alone and the failed-over turn came back a 401 (#2145, `TestCodexFailoverBeyondLoopbackNotWritten`); Sync takes one it wrote before off again. That Codex is `FailingOver`: not `Wired`, yet its requests go through magpie. The Agents row says so and what turns it off (`FailoverSaid` in the CLI and TUI, `failover` in `/api/state`, a button to Providers › Codex in the GUI), and the gateway hands it only its own models from `/backend-api/codex/models` (`CodexOwnOnly`, set on `gateway.CodexOwnOnly` by main; its ETag carries `provider.CodexOwnListTag`, and Sync ages a `models_cache.json` without it). A connected WSL Codex shares the gateway path, so while one is connected every Codex gets magpie's models (#1385). A base URL the user wrote by hand (#856) isn't failover's and stays a plain not-connected row. A Codex the user disconnected gets no failover till they connect it again. The app serving the gateway takes failover out as it quits (`EndFailover`, `EndCodexFailover` in `OnShutdown`), so a Codex left on its own goes straight to OpenAI rather than retrying a gateway that's gone (Leon920717 on X); the next start's Sync writes it again. Codex's app-server read the old base URL as it started and keeps it, and `KeepCodexDaemonCurrent` ends with magpie, so `EndCodexFailover` restarts it there when no codex session is on it (`codexDaemonCheck`); with one on it, it stays on the gone gateway until the user restarts it (thisisvainxx on X: "several restarts"). A connected Codex keeps magpie as it quits: its model is one of magpie's, and Disconnect is what puts its own config back. A magpie that ends without quitting (killed, a crash, `magpie serve`) leaves failover in place.
+12 -10
View File
@@ -75,13 +75,15 @@ func codexProxyFor(cfg, base string) (proxy, from string) {
return "", ""
}
host := u.Hostname()
env := func(keys ...string) string {
// env is the first of keys set, and which one it is: the detail names
// the variable the value is in, http_proxy or HTTP_PROXY (#2627)
env := func(keys ...string) (string, string) {
for _, k := range keys {
if v := strings.TrimSpace(codexProxyEnv(k)); v != "" {
return v
return v, k
}
}
return ""
return "", ""
}
httpKeys := []string{"HTTP_PROXY", "http_proxy"}
if u.Scheme == "https" {
@@ -109,11 +111,11 @@ func codexProxyFor(cfg, base string) (proxy, from string) {
case sys.SOCKS == "":
return "", ""
}
p, k := env(httpKeys...), httpKeys[0]
p, k := env(httpKeys...)
if p == "" {
p, k = env("ALL_PROXY", "all_proxy"), "ALL_PROXY"
p, k = env("ALL_PROXY", "all_proxy")
}
if p == "" || reqwestNoProxy(host, env("NO_PROXY", "no_proxy")) {
if no, _ := env("NO_PROXY", "no_proxy"); p == "" || reqwestNoProxy(host, no) {
return "", ""
}
return p, k
@@ -121,14 +123,14 @@ func codexProxyFor(cfg, base string) (proxy, from string) {
// reqwest's: each of the environment's first, the system's for
// http:// where it names none, then ALL_PROXY; NO_PROXY, or Windows'
// bypass list without it, goes around them
p, k := env(httpKeys...), httpKeys[0]
no := env("NO_PROXY", "no_proxy")
p, k := env(httpKeys...)
no, _ := env("NO_PROXY", "no_proxy")
sys := codexSystemProxy()
if p == "" && sys.HTTP != "" {
p, k = sys.HTTP, systemProxyName()
}
if p == "" {
p, k = env("ALL_PROXY", "all_proxy"), "ALL_PROXY"
p, k = env("ALL_PROXY", "all_proxy")
}
if no == "" && codexProxyOS == "windows" && sys.URL != "" {
no = strings.ReplaceAll(strings.Join(sys.Bypass, ","), "*.", "")
@@ -257,7 +259,7 @@ func codexProxiedDetail(base, proxy, from string) string {
d := "Codex sends its requests for magpie (" + host + ") through the proxy at " + netproxy.Redact(proxy) + ", set in " + from + ", and that proxy doesn't pass them on to magpie: every turn fails, with 502 Bad Gateway, whichever model it is on. " +
"Have the proxy send 127.0.0.1 direct (a DIRECT rule for 127.0.0.0/8, or rule mode rather than global), "
switch {
case strings.Contains(from, "PROXY"):
case strings.Contains(strings.ToUpper(from), "_PROXY"):
d += "or add 127.0.0.1 to NO_PROXY where " + from + " is set (your shell profile, such as ~/.zshrc, if it's there), "
case codexProxyOS == "windows":
d += "or add 127.0.0.1 to \"Don't use the proxy server for addresses beginning with\" in Windows' proxy settings (127.* there is not enough for Codex), "
+38
View File
@@ -106,6 +106,44 @@ func TestCodexProxyFor(t *testing.T) {
}
}
// ReneXiong (#2627): the detail named HTTP_PROXY for a value in
// http_proxy, and ALL_PROXY for one in all_proxy, which sent the reader
// looking for a variable that wasn't there. It names the one read.
func TestCodexProxyNamesItsVariable(t *testing.T) {
const base = "http://127.0.0.1:3425/v1"
clash := "http://127.0.0.1:7890"
plain := filepath.Join(t.TempDir(), "config.toml")
os.WriteFile(plain, []byte("model = \"gpt-5.5\"\n"), 0o600)
respect := filepath.Join(t.TempDir(), "config.toml")
os.WriteFile(respect, []byte("model = \"gpt-5.5\"\n\n[features]\nrespect_system_proxy = true\n"), 0o600)
macSOCKS := netproxy.Proxy{URL: "socks5://127.0.0.1:7891", SOCKS: "socks5://127.0.0.1:7891"}
cases := []struct {
name string
cfg string
env map[string]string
sys netproxy.Proxy
from string
}{
{"http_proxy", plain, map[string]string{"http_proxy": clash}, netproxy.Proxy{}, "http_proxy"},
{"HTTP_PROXY first", plain, map[string]string{"HTTP_PROXY": clash, "http_proxy": clash}, netproxy.Proxy{}, "HTTP_PROXY"},
{"all_proxy", plain, map[string]string{"all_proxy": "socks5://127.0.0.1:7890"}, netproxy.Proxy{}, "all_proxy"},
{"respect: http_proxy", respect, map[string]string{"http_proxy": clash}, macSOCKS, "http_proxy"},
{"respect: all_proxy", respect, map[string]string{"all_proxy": clash}, macSOCKS, "all_proxy"},
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
proxyAs(t, c.env, c.sys, "darwin", nil)
p, from := codexProxyFor(c.cfg, base)
if p == "" || from != c.from {
t.Fatalf("got %q from %q, want it from %s", p, from, c.from)
}
if d := codexProxiedDetail(base, p, from); !strings.Contains(d, "set in "+c.from+",") || !strings.Contains(d, "NO_PROXY where "+c.from+" is set") {
t.Fatalf("detail: %s", d)
}
})
}
}
// liu_dyj on X: magpie opened from the Dock lacks the NO_PROXY a shell
// profile sets, which the Codex a terminal or the ChatGPT app runs has.
// The login shell's value is Codex's; magpie's own only where the shell
+19 -16
View File
@@ -391,30 +391,33 @@ const shellMark = "__magpie_path__"
// no variable can hold) parts the values: PATH first, then each of
// shellVars in order.
//
// A POSIX shell (zsh, bash) expands "$PATH" itself, and so does fish:
// PATH, as each variable whose name ends in PATH, is a path variable there,
// joined with ':' in double quotes, not with the spaces another list gets. nushell
// doesn't: a double-quoted string is literal there, so it printed "$PATH",
// "$CLAUDE_CONFIG_DIR", ... and magpie set each variable to its own name
// (#738: then Claude sign-in failed with "mkdir $CLAUDE_CONFIG_DIR:
// read-only file system", and the account lapsed minutes later, Claude
// Code's sign-in looked for under that folder). nushell has no POSIX
// quoting to ask with, and its PATH is a list, so it is asked to run
// /bin/sh with the same printf: nushell hands it the environment as a
// child sees it, PATH joined back into one string, and sh expands the
// references. The outer command is in nushell's single quotes, where a
// backslash is a backslash, and the printf format in sh's double quotes,
// where \0 reaches printf as it is.
// Every shell is asked to run /bin/sh with the printf, and sh expands the
// references, so a value is what the shell exports: what an agent started
// from it gets. A shell's own expansion saw unexported variables too: fish's
// universal http_proxy, set with `set -U` and never exported, reached no
// program, yet magpie took it for Codex's proxy and showed the "proxied"
// drift (#2627); an unexported zsh or bash variable is the same.
//
// nushell needs it most: a double-quoted string is literal there, so it
// printed "$PATH", "$CLAUDE_CONFIG_DIR", ... and magpie set each variable
// to its own name (#738: then Claude sign-in failed with "mkdir
// $CLAUDE_CONFIG_DIR: read-only file system"). Its ^ runs /bin/sh as an
// external command rather than a nushell one. nushell, as fish (PATH is a
// path variable there), hands a child PATH joined with ':'. The outer
// command is in single quotes, where a backslash is a backslash in every
// one of these shells, and the printf format in sh's double quotes, where
// \0 reaches printf as it is.
func shellProbe(sh string) string {
format, args := shellMark+"%s", ` "$PATH"`
for _, v := range shellVars {
format += `\0%s`
args += ` "$` + v + `"`
}
cmd := `/bin/sh -c 'printf "` + format + shellMark + `"` + args + `'`
if filepath.Base(sh) == "nu" {
return `^/bin/sh -c 'printf "` + format + shellMark + `"` + args + `'`
return "^" + cmd
}
return "printf '" + format + shellMark + "'" + args
return cmd
}
// parseShellEnv reads shellEnv's answer out of what the shell printed. The
+49
View File
@@ -135,6 +135,43 @@ func TestLoginEnvProxyVarsNotSet(t *testing.T) {
}
}
// ReneXiong (#2627): a variable the shell has but doesn't export reaches
// no program started from it, so it is not the agent's. The reporter's
// were fish universals from an old Clash setup; here a profile sets the
// same values without export, beside an exported NO_PROXY.
func TestLoginEnvUnexportedNotCounted(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
sh := filepath.Join(home, "sh")
testenv.Program(t, sh, "#!/bin/sh\n"+
"http_proxy=http://127.0.0.1:7890 https_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890\n"+
"CLAUDE_CONFIG_DIR=/not/exported\n"+
"export NO_PROXY=127.0.0.1\neval \"$2\"\n")
t.Setenv("SHELL", sh)
t.Setenv("XDG_CONFIG_HOME", "")
t.Setenv("PATH", "/usr/bin:/bin")
for _, v := range append([]string{"CLAUDE_CONFIG_DIR"}, ProxyVars...) {
t.Setenv(v, "")
os.Unsetenv(v)
}
old := shellDirs
shellDirs = func() []string { return nil }
t.Cleanup(func() { shellDirs = old })
p, vars := shellEnv()
if p == "" {
t.Fatal("no PATH from the shell")
}
for _, v := range []string{"http_proxy", "https_proxy", "all_proxy", "CLAUDE_CONFIG_DIR"} {
if got := vars[v]; got != "" {
t.Errorf("%s = %q, but the shell never exports it", v, got)
}
}
if got := vars["NO_PROXY"]; got != "127.0.0.1" {
t.Errorf("NO_PROXY = %q, want the exported one", got)
}
}
// jw1dev on X: CLAUDE_CODE_USE_BEDROCK=1 sends Claude Code to Bedrock past
// magpie. One in the profile is read (LoginEnv), for magpie to say so, but
// never set in magpie's own environment, where every agent magpie starts
@@ -378,6 +415,13 @@ func TestShellEnvRealFish(t *testing.T) {
os.MkdirAll(filepath.Join(home, ".config", "fish"), 0o755)
os.WriteFile(filepath.Join(home, ".config", "fish", "config.fish"),
[]byte("echo hi from fish\nfish_add_path -g '"+bin+"'\nset -gx CODEX_HOME "+home+"/codex\n"), 0o644)
// the reporter's universal variables (#2627), never exported: no
// program fish starts has them
os.WriteFile(filepath.Join(home, ".config", "fish", "fish_variables"),
[]byte("# This file contains fish universal variable definitions.\n# VERSION: 3.0\n"+
"SETUVAR all_proxy:socks5\\x3a//127\\x2e0\\x2e0\\x2e1\\x3a7890\n"+
"SETUVAR http_proxy:http\\x3a//127\\x2e0\\x2e0\\x2e1\\x3a7890\n"+
"SETUVAR https_proxy:http\\x3a//127\\x2e0\\x2e0\\x2e1\\x3a7890\n"), 0o644)
login := filepath.Join(home, "zsh")
testenv.Program(t, login, "#!/bin/sh\neval \"$2\"\n")
t.Setenv("SHELL", login)
@@ -395,6 +439,11 @@ func TestShellEnvRealFish(t *testing.T) {
if got := vars["CLAUDE_CONFIG_DIR"]; got != "" {
t.Fatalf("CLAUDE_CONFIG_DIR = %q, want none", got)
}
for _, v := range []string{"http_proxy", "https_proxy", "all_proxy"} {
if got := vars[v]; got != "" {
t.Errorf("%s = %q, from a universal fish never exports", v, got)
}
}
if !slices.Contains(ShellPath(fish), bin) {
t.Fatalf("ShellPath(fish) lacks %q", bin)
}