You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(args): regression coverage for BoolishValueParser on env bools
Two new tests in cli_global_args.rs:
- bool_env_vars_accept_one_and_yes: SOCKET_OFFLINE=1, SOCKET_GLOBAL=yes,
SOCKET_JSON=on, etc. all parse as `true`. Pins the BoolishValueParser
wiring we just added — without it clap fails with
`error: invalid value '1' for '--offline'` (the bug that prompted
the fix).
- bool_env_vars_reject_zero_and_falsey: SOCKET_OFFLINE=0,
SOCKET_DEBUG=false, SOCKET_TELEMETRY_DISABLED=no, SOCKET_JSON=off
all parse as `false`. Guards against an over-eager parser flipping
a bool on any non-empty string.
Both new tests + the existing env_vars_populate_global_args are now
`#[serial]` — env-var state is process-global, so parallel test
runs race the cleanup. Without serialization the negative-case test
flakes by inheriting `SOCKET_OFFLINE=1` from the positive case.
Assisted-by: Claude Code:opus-4-7
0 commit comments