test(proxy): drop env-leaking runtime_proxy assertion in clear test#1362
test(proxy): drop env-leaking runtime_proxy assertion in clear test#1362obchain wants to merge 2 commits intotinyhumansai:mainfrom
Conversation
`runtime_proxy.http_proxy` resolves through HTTP_PROXY / http_proxy env
vars when the configured proxy is null, so CI runners with those vars
set fail the assertion despite `set { http_proxy: null }` working
correctly. Keep only the `proxy.http_proxy` check (configured state)
and document the env-resolution behavior so the dependency is not
re-introduced.
Fixes tinyhumansai#1356
📝 WalkthroughWalkthroughTest ChangesProxy Config Test Flakiness Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #1356.
openhuman::tools::implementations::system::proxy_config::tests::set_null_proxy_url_clears_existing_valuewas flaky in CI: it assertedruntime_proxy.http_proxywasnullafter clearing the configured value, butruntime_proxyreflects the resolved proxy and falls back to the process env (HTTP_PROXY/http_proxy). Runners with those vars set produced a non-null resolved value and failed the assertion despite theset { http_proxy: null }call working correctly.This PR keeps only the
proxy.http_proxy(configured-state) assertion and documents why the runtime field is not asserted, so the env dependency is not re-introduced. Took the simpler of the two options the issue suggested — no env-mutation, noserial_testgate.Repro
HTTP_PROXY=http://127.0.0.1:7890 cargo test --manifest-path Cargo.toml \ openhuman::tools::implementations::system::proxy_config::tests::set_null_proxy_url_clears_existing_valueparsed["runtime_proxy"]["http_proxy"].is_null()).Test plan
cargo test ... set_null_proxy_url_clears_existing_value— passes in clean env.HTTP_PROXY=http://127.0.0.1:7890 cargo test ... set_null_proxy_url_clears_existing_value— passes (was the failing repro).PR Submission Checklist