Summary
The staging promotion PR hit an intermittent failure in Tests (default) on March 16, 2026 / March 17, 2026 UTC:
failures:
llm::oauth_helpers::tests::bind_rejects_wildcard_ipv4
test result: FAILED. 3181 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 17.15s
error: test failed, to rerun pass `--lib`
Why this looks flaky
The exact failing test passes locally in isolation, and the related wildcard tests also pass locally when run together. The likely issue is that these tests mutate the process-global OAUTH_CALLBACK_HOST environment variable without synchronization:
src/llm/oauth_helpers.rs has tests bind_rejects_wildcard_ipv4 and bind_rejects_wildcard_ipv6 that call std::env::set_var / remove_var
- the repo already has an
ENV_MUTEX pattern in src/cli/oauth_defaults.rs for env-sensitive OAuth tests
That suggests a parallel test race rather than a real product regression or GitHub runner hiccup.
Suggested fix
Serialize the env-var-sensitive tests in src/llm/oauth_helpers.rs with the same mutex pattern already used in src/cli/oauth_defaults.rs, or otherwise refactor them to avoid mutating global process env during parallel test execution.
Notes
- The failed job reached the
Run Tests step successfully; this was not a setup/cache/download failure.
- Other test/build matrix jobs around it were green, which also points away from infra failure.
Summary
The staging promotion PR hit an intermittent failure in
Tests (default)on March 16, 2026 / March 17, 2026 UTC:Why this looks flaky
The exact failing test passes locally in isolation, and the related wildcard tests also pass locally when run together. The likely issue is that these tests mutate the process-global
OAUTH_CALLBACK_HOSTenvironment variable without synchronization:src/llm/oauth_helpers.rshas testsbind_rejects_wildcard_ipv4andbind_rejects_wildcard_ipv6that callstd::env::set_var/remove_varENV_MUTEXpattern insrc/cli/oauth_defaults.rsfor env-sensitive OAuth testsThat suggests a parallel test race rather than a real product regression or GitHub runner hiccup.
Suggested fix
Serialize the env-var-sensitive tests in
src/llm/oauth_helpers.rswith the same mutex pattern already used insrc/cli/oauth_defaults.rs, or otherwise refactor them to avoid mutating global process env during parallel test execution.Notes
Run Testsstep successfully; this was not a setup/cache/download failure.