Commit Graph
2 Commits
Author SHA1 Message Date
AskaEth f8acb50156 fix(app-iced): 子进程统一走 platform::child::quiet(消灭启动闪窗)+ 守卫射程扩到整棵 crates/(M217)
用户报「CI 构建版启动时底下闪一个控制台」:M213 统一了 crates/core/src 的 20 处
Command::new,但守卫射程只有 core/src,app-iced 的 reg.exe(每次 GUI 启动都跑)漏网。

- crates/core/tests/child_quiet_guard.rs:扫描根 crates/core/src → crates/(1219 个 .rs),
  角色清单改成相对 crates/ 的路径(文件角色钉精确处数,目录角色至少一处);
  「扫不到文件」兜底断言保留,另加角色文件锚点兜底;顺带修掉全树扫描会撞上的
  「纯 //! 结论页没有代码行」误判
- app-iced:platform/locale.rs 的 reg.exe、app/update/update_action.rs、
  app/boot/fallback.rs、app/boot/termux_window.rs 的 xdpyinfo、
  renderer/acceptance/locale.rs 的 defaults 全部改走 quiet(后三处是同一 exe /
  POSIX 上的 pass-through,为的是规则整体可被守卫钉住)
- app/dialog/export.rs 的 explorer / open / xdg-open 保持裸构造并写清「窗口就是产品」,
  presenter/src/host/opener.rs 同理登记成角色(不在本 mission 改动范围)

门禁:fmt/check --workspace --all-targets/test --workspace -j 4/clippy --workspace
--all-targets -D warnings/全仓 400 行 + <2 字节 .rs 扫描,六步退出码全 0,CHAIN_EXIT=0。
2026-11-09 21:12:02 +08:00
AskaEth 5959a27add fix(core): child_quiet.rs 446 行越 400 红线,按职责拆成两个测试文件
Guards / 依赖许可与来源(cargo-deny) (push) Canceled after 0s
Guards / 文件行数 ≤400 守门 (push) Canceled after 0s
Guards / unsafe 落点守门(集合必须恰好等于期望) (push) Canceled after 0s
Guards / design 零第三方依赖守门 (push) Canceled after 0s
Guards / presenter 零 UI 守门 (push) Canceled after 0s
Guards / core 零 UI 守门 (push) Canceled after 0s
Dev Guards / 架构与合规守门(同 main 口径) (push) Canceled after 0s
Dev Guards / fmt (rustfmt --check) (push) Canceled after 0s
Dev Guards / clippy (ubuntu) (push) Canceled after 0s
M213 r2 把守卫的剥注释+两条新用例都塞进同一个文件,涨到 446 行。tower 的合并门里
400 行扫描算出了 OVER=1,但 push 写在扫描之后没有用它拦住自己,所以 dev 上先红了一次。

- child_quiet.rs(85):quiet 的**行为**测试(管道/退出码/env/错误语义)
- child_quiet_guard.rs(370):源码扫描型守卫(角色表 + 4 条变异对应的用例 + 解析 helper)

拆分后复验:两文件 5+4=9 条全绿;变异 D(discover.rs:156 改裸构造)仍 exit 101 并点名该行
——守卫的牙没在拆分中丢掉。
2026-11-09 15:14:23 +08:00