fix(ci): Rust clippy 恒红——proxy.rs:155 ErrorKind::Other 触发 -D warnings,阻塞 main 与全部 14 个 PR
维护者通常 7 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 rust/src/proxy.rs:155-158 开始,这里 issue 指出了 clippy 警告;然后检查 .github/workflows/test.yml:84 中的 Lint 命令。运行 cd rust && cargo clippy --all-targets -- -D warnings 和 cd rust && cargo test;两者都通过且 Rust CI job 变为绿色即表示完成。
由索引模型根据 Issue 内容生成。
描述
场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无
基线 HEAD = d35ed884。
Summary
-
rust/src/proxy.rs:155-158:CONNECT 出站代理代码用std::io::Error::new(std::io::ErrorKind::Other, e),被 clippy 判clippy::io_other_error(style 组,warn 级):parse_connect_response(&head).map_err(|e| std::io::Error::new( std::io::ErrorKind::Other, e, ))?; -
.github/workflows/test.yml:84的 Lint 步是cargo clippy --all-targets -- -D warnings,warn 升 error → 退出码 101 → Rust job 必红(同 job 的cargo test步:81本身是绿的,红只出在 Lint)。 -
引入点 =
13d917a(2026-10-01 13:49Z,feat(rust): 客户端出站支持 HTTP CONNECT 代理(0.6.0);git blame -L 155,158 rust/src/proxy.rs四行全部指向该提交)。 -
时间线(main 上的 test workflow):最后一次绿 =
0846ed19(2026-09-30T11:41Z);此后逐次全红 =020dec36(2026-10-04T14:22Z,首个红灯)→cb74c8b4(10-07T17:59Z)→9711b1a6(10-08T11:17Z)→eab5b1a6(10-08T11:50Z)→d35ed884(10-08T11:53Z,run 37773047527)。首红滞后到 10-04 只是因为 09-30 与 10-04 之间 main 上没有触发 test workflow(13d917a已领先上一个绿点 29 个提交、且已是020dec36的祖先),不是当时绿过。各次失败点逐字相同:--> src/proxy.rs:155:47+Process completed with exit code 101。 -
不是工具链 1.99 新增 lint:本机 rustc/clippy
1.98.1复现同一条 —— 在仓内cd rust && cargo clippy --all-targets -- -D warnings得到error: this can bestd::io::Error::other(_)``(clippy 1.98.0 文档链接)→ 101。CI 侧 toolchain 为 rustc 1.99.0(dtolnay/rust-toolchain@stable日志:`stable-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0 (b940084d7 2026-09-28)`)。即新代码踩了既存 lint,1.99 只是同为命中版本。 -
影响面不止 main:全部 14 个 open PR(dependabot #5-#19、#25 等,含只改
typescript/lockfile 的)都因同一个 Rust job 红而卡住合入,例:run 37773298226(PR #18,仅/typescriptundici 升级)失败日志同样是src/proxy.rs:155:47。 -
命中处唯一:
grep -rn 'ErrorKind::Other' rust/src→ 只有rust/src/proxy.rs:156。
影响
main 与所有 PR 的 CI 门禁确定性恒红(非 flaky):dependabot 依赖升级全部积压,人工改动的 PR 也无法区分「自己的问题」与「既存红」,等于交付管线被一行 lint 卡死。
建议
改为 std::io::Error::other:
parse_connect_response(&head).map_err(std::io::Error::other)?;
验收条件(可执行、可断言):
cd rust && cargo clippy --all-targets -- -D warnings退出码 0 —— 已在临时副本(/tmp/tunely-verify,仅改此行)用本机 clippy 1.98.1 实跑:Finished dev profile,无任何告警;cd rust && cargo test全绿 —— 同一临时副本实跑通过:lib 单测 86、embed_handler6、integration10、proxy_integration4(含 CONNECT 代理路径)、wire_conformance8、doc-test 1,合计 115 passed / 0 failed;- 改动推上 main 后,test workflow 的 Rust job 转绿(
Lint步通过)。
边界
- 本单只修这一处 lint 命中,不处理「
dtolnay/rust-toolchain@stable浮动 → 未来新 lint 再次打红 CI」的根因(建议另单:加rust-toolchain.toml固定版本,或把-D warnings收敛为定向 lint)。历史同类:143ddb71「折叠嵌套 if let——修 CI clippy --all-target」也是被浮动 stable 打到。 - 不处理 Python job 的非致命噪声:
##[error] RuntimeError: Event loop is closed(aiosqlite_connection_worker_thread在事件循环关闭后回调,pytestPytestUnhandledThreadExceptionWarning;该 job 结论仍是 success,run 37663404002)。与本单无因果关系,如需要另行提报。
- 主要语言
- Python
- 星标
- 0
- 派生
- 0
- 平均合并
- 6 天 2 小时
- 30 天内合并 PR
- 2
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jeffkit/tunely 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 87/100
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 7 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 7 天内回复
-
难度 4/5 3-5 天 新手友好度 34/100
维护者通常 7 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 7 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
slavakurilyak/awesome-ai-agents#845 ·
维护者通常 1 天内回复
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directory可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭difficulty:2 enhancement good first issue
难度 1/5 1-3 小时 新手友好度 92/100
MakazhanAlpamys/Soup#2178 ·
维护者通常 1 天内回复
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-values未关闭
难度 2/5 1-3 小时 新手友好度 75/100
scverse/rapids-singlecell#854 ·
维护者通常 1 天内回复
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGL可能已有人在做 @ninglinLiu 今天认领。 未关闭area:frontend backend:slang bug direction:input
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
random_elements(unique=True) on an OrderedDict: ZeroDivisionError once only zero weights remain, AssertionError with use_weighting=False可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 13 天内回复