AskaEth
28762ec268
fix(m182): 判据断言一律显式传 HostOs,ubuntu 门禁在容器里前后对照为绿(复审 P1-1 / P2-1)
复审 P1-1 实测:`corner/tests.rs` 里三条用例走宿主绑定的 `plan_corner()` 却断言 Windows
的结果——本机(Windows)绿,合进 main 后 `ubuntu-latest` 的 test job 会当场红。已修:
- 三条改为 `on_windows(...)` → `plan_corner_for(policy, HostOs::Windows, …)`:
`the_win11_boundary_is_inclusive`、`the_log_line_carries_every_field`、
`the_log_line_shape_is_pinned_with_the_measured_readings`;
去重那条(`the_same_policy_is_dispatched_only_once`)也一并显式传 Windows。
- 宿主绑定的 `plan_corner()` 现在只剩**产品路径**(`app/update/appearance.rs:51`)与
**一条**用例 `the_production_entry_forwards_to_the_pure_judgement`——后者两边都用同一个
`HostOs::current()`,所以任何宿主都成立,它证明的是「入口确实转发」,不是某个平台的结果。
- m116 探针(`cfg(windows)` + `#[ignore]`)也改成显式 `HostOs::Windows`:那是真窗口实验,
不该让「这台机器是 Windows」成为隐式前提。产物那一行逐字不变。
复审 P2-1:`unknown-os` 此前没有任何断言。新增表测试
`every_exclusion_code_is_a_stable_non_empty_string`,把七个原因码逐个钉住(含 `unknown-os`),
并断言非空、无空白、两两不重复、总数 7。另在 `the_log_line_carries_every_field` 里补
`host=windows` + `os=unknown` + `excluded_reason=unknown-os` 同现。
证据(`packaging/linux-check-docker.sh`,容器内 ubuntu 真实复跑,非推理):
- 修前(把 tests.rs 回退到 0451b3f):`test -p unlucky-app-iced --lib` → **3 failed**
(正好是复审点名的三条),exit=1;
- 修后同一命令:**685 passed / 0 failed**,exit=0;
- 最终树跑完整两条 CI 门禁:`cargo clippy --workspace --all-targets -- -D warnings` exit=0、
`cargo test --workspace --all-targets --no-fail-fast` exit=0(53 个测试二进制,合计
passed=2672 / failed=0)。
本机(Windows)同树:clippy exit=0、`test -p unlucky-app-iced --lib` 686 passed、fmt exit=0。
`decorations` 取值未动(分支 vs 基点仅新增注释行);非 Windows 的 `os=` 仍为 `n/a`,
Windows 上「真的读不到版本」仍叫 `os=unknown`,但同一行有 `host=windows` +
`excluded_reason=unknown-os` 自解释。
2026-11-08 15:18:23 +08:00
..
2026-11-07 18:56:01 +08:00
2026-11-05 14:08:37 +08:00
2026-11-08 15:18:23 +08:00
2026-11-08 13:34:29 +08:00
2026-11-08 13:34:29 +08:00
2026-11-08 14:50:15 +08:00
2026-11-07 17:37:13 +08:00
2026-11-07 18:56:01 +08:00
2026-11-08 11:12:11 +08:00