Skip to content

test(tui): fifteen more loopback fixtures stay out of an ambient proxy - #6975

Merged
Hmbown merged 1 commit into
codewhale-hq:mainfrom
Lstarsky0:test/loopback-fixtures-name-their-no-proxy
Oct 13, 2026
Merged

Hmbown merged 1 commit into
codewhale-hq:mainfrom
Lstarsky0:test/loopback-fixtures-name-their-no-proxy

Conversation

@Lstarsky0

Copy link
Copy Markdown
Contributor

What and why

Follow-up to #6971. That one fixed the two tests that fail behind a local proxy which forwards to loopback. This one covers the rest of the same guard, which only shows up behind a proxy that does not.

The setup: HTTP_PROXY and HTTPS_PROXY point at a proxy that will not reach loopback (I used a closed port), and the environment already has NO_PROXY=localhost,127.0.0.1,::1. On main, 20 tests fail there that pass without the proxy variables. Each of them sets NO_PROXY=*, which replaces a value that exempted its 127.0.0.1 fixture with one that does not: the matcher applies * to host names only.

15 of the 20 now set *,127.0.0.1. The wildcard stays for host names, and the fixture's address is added, so nothing that * exempted before is proxied now.

  • mcp/http_client.rs: 6
  • mcp/tests.rs: 3
  • mcp/sse.rs: 2
  • runtime_api/tests.rs: 2
  • tui/ui/tests.rs: 2

Left alone:

  • The other 5 are in mcp/oauth.rs. They need the same one-value change, but that file is auth code, so I did not touch it.
  • Two more guards in mcp/http_client.rs (shared_mcp_send_revalidates_after_client_selection_before_first_write and private_dns_requires_an_explicit_operator_opt_in) keep *. Both tests pass behind the same proxy.

Issue

No-Issue: follow-up to #6971, no issue filed for it

How I tested it

  • Full cargo nextest run -p codewhale-tui --lib behind the strict proxy described above: main (39f0733) fails 62 tests, this branch 47. The 15 that moved are the ones changed here, and nothing new fails. Of the 47, 42 also fail without any proxy on my machine (most need an extension-host Node version I don't have) and 5 are the mcp/oauth.rs ones.
  • The 15 also pass one at a time in three other setups: a running local proxy with no NO_PROXY, only the lowercase proxy variables set (closed port), and no proxy variables at all.
  • cargo fmt --all -- --check, cargo clippy -p codewhale-tui --all-targets --all-features with CI's flags, and cargo check -p codewhale-tui --all-targets: clean. Clippy also on 1.99, plus cargo +1.89.0 check -p codewhale-tui.
  • cargo nextest run -p codewhale-tui --lib in my normal shell: 15244 passed, 42 failed, the same 42 as main.

No new tests; this changes one value in fifteen existing ones.

Checklist

  • One focused change, rebased on current main
  • cargo fmt --all passes, and tests cover new or changed behavior
  • If this adds or changes a user-facing feature, I updated its docs and its row in docs/features.toml (cargo test -p codewhale-tui --test feature_registry checks it) — n/a

codewhale-hq#6971 fixed two tests whose NO_PROXY=* guard did not cover their
127.0.0.1 fixture: the proxy matcher applies `*` to host names only and
checks an IP literal against the address entries alone.

The same guard is in other tests. Behind a local proxy that forwards to
loopback they still pass, which is why only two showed up there. Behind
one that does not (HTTP_PROXY and HTTPS_PROXY pointing at a closed port,
NO_PROXY=localhost,127.0.0.1,::1 in the environment) twenty tests fail on
main that pass without the proxy variables. Each replaces a NO_PROXY that
already exempted its fixture with one that does not.

Fifteen of them now set `*,127.0.0.1`: the wildcard stays for host names
and the fixture's address is added. The other five are in mcp/oauth.rs,
which this change leaves alone. Two guards in mcp/http_client.rs also
stay as they are; their tests pass behind the same proxy.

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
@Lstarsky0
Lstarsky0 requested a review from Hmbown as a code owner October 13, 2026 16:08

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 13, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T16:11:19.838761Z d2ae9a8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Hmbown

Hmbown commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Thank you @Lstarsky0 for finding fifteen more loopback fixtures where the proxy matcher needs an explicit127.0.0.1 bypass. Your PR is now merged as your own work at 8aeeff6d, with your original commit and source branch retained, for0.10.2. The release has not shipped. The assertions, deadlines, locks and environment restoration remain unchanged.

All fifteen changed fixtures and owner recovery passed on macOS, Ubuntu and Windows. Actual summaries: macOS retry19,035passed/0failed/33skipped; original Ubuntu19,032/0/34; original Windows18,301passed(including the existing browser-launcher leak)/0failed/27skipped. Ubuntu/Windows/Lint were not rerun in the retry. The first macOS job hit its165-minute deadline with only partial output; that cancelled record is retained. Final combined-candidate and packaged acceptance still need their own proof.

@Hmbown
Hmbown merged commit 8aeeff6 into codewhale-hq:main Oct 13, 2026
47 of 48 checks passed
Hmbown pushed a commit that referenced this pull request Oct 14, 2026
Integrate main3929bcee after own-PR merges #6967, #6974, #6975 and #6966. Preserve stronger matching steer receipt, HTTP projection and identity assertions; retain one contributor provider-table auth marker in the atomic save. Keep all15 loopback guards and three independent/event watchdog corrections. Credit @Lstarsky0 and @gaord in release notes; original authored commits and source branches are preserved.

Actual frozen macOS default-feature result:
     Summary [   1.439s] 23 tests run: 23 passed, 15288 skipped
All23 unique result ordinals are PASS. npm:540 Node +772 Vitest passed;0 failed;7 skipped. npm run check:web, versions, changelog sync, fmt and diff passed. Source hashes unchanged throughout. Existing __eh_frame linker warning retained.

No new product test functions/comments or gate waivers. Old failed/cancelled CI evidence remains; complete new-head hosted CI/Windows owner recovery and final packages are pending. No provider inference or release/publication.

Refs #6968
Refs #6972
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants