docs(playbook): §2.7 HTTP_PROXY breaks flutter test on proxied machines — NO_PROXY workaround - #233
Open
KerroKapple wants to merge 1 commit into
Open
docs(playbook): §2.7 HTTP_PROXY breaks flutter test on proxied machines — NO_PROXY workaround#233KerroKapple wants to merge 1 commit into
KerroKapple wants to merge 1 commit into
Conversation
挂代理(Clash 一类,HTTP_PROXY=http://127.0.0.1:7890)又没设 NO_PROXY 的机器上, `flutter test` 一个用例都跑不起来——每个 suite 报「Connection closed before test suite loaded」。根因是 flutter_tester 用 Dart HttpClient 拉编译产物,而 HttpClient 读 HTTP_PROXY,把自己那条 http://127.0.0.1:<随机端口> 也送进了代理。与被测代码无关, analyze 照常 0 issue,极易误判成"改坏了"。 规避:`NO_PROXY=127.0.0.1,localhost no_proxy=127.0.0.1,localhost flutter test ...` (大小写各一份);排查手法先跑一个没碰过的纯函数测试。原 §2.7「其他」顺延为 §2.8。 本条原随 CH-2 本地分支写下,CH-2 以另一实现(#230)合入时未带上,单独落档。 纯文档改动,不触及任何 Dart 文件。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/EXECUTION-PLAYBOOK.md§2.7: on a machine withHTTP_PROXYset (Clash-stylehttp://127.0.0.1:7890) and noNO_PROXY,flutter testfails to load every suite with "Connection closed before test suite loaded" whileflutter analyzestays clean — which reads exactly like "I broke the code".flutter_testerfetches the compiled test bundle over a local HTTP server using Dart'sHttpClient, which honoursHTTP_PROXY; the loopback request gets routed into the proxy and dropped.NO_PROXY=127.0.0.1,localhost no_proxy=127.0.0.1,localhost flutter test …(both cases — implementations differ on which key they read), or setNO_PROXYsystem-wide.core/net/proxy_env.dart), which is the app's runtime proxy handling; this entry is about the dev machine running tests.The former §2.7 "其他" becomes §2.8.
Why a separate PR
This section was written on the local CH-2 branch on the Windows machine; CH-2 landed from elsewhere as #230 in a different form and the playbook entry never made it to
main. It is the note that made the 2026-09-02 verification of #232 possible on this machine, so it is worth landing on its own rather than being lost with the superseded local branch.Test plan
Docs-only — no Dart file touched. Gate run anyway on the branch:
flutter analyze lib test→ No issues found!flutter test --exclude-tags golden→ 1951 passing / 66 skipped / 0 failing (matchesmain)🤖 Generated with Claude Code