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。
This commit is contained in:
AskaEth committed 2026-11-09 21:12:02 +08:00
1 parent 7521c47944
commit f8acb50156
7 files changed
+225 -165

No files matched your search

@@ -71,7 +71,12 @@ impl App {
match std::env::current_exe() {
Ok(exe) => {
let args: Vec<std::ffi::OsString> = std::env::args_os().skip(1).collect();
match std::process::Command::new(&exe).args(&args).spawn() {
// 子进程是本 GUI exe 自己(Subsystem=2,不会分到控制台);走 `quiet` 是为了让
// 「app-iced 里除 opener 外不留裸构造」这条规则整体可被守卫钉住(M217)。
let spawned = unlucky_core::platform::child::quiet(&exe)
.args(&args)
.spawn();
match spawned {
Ok(child) => diag!(
"[update] 已拉起新进程 pid={}:{}",
child.id(),