test(core,presenter): 夹具口径跟随 M240 收窄(长类名不再被抹)
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

M240 让词形长路径不再被当成不透明串,而 M241 的两份夹具仍断言「必须被抹成
<redacted:opaque>」——两条各自的 pre-rebase 门禁都绿,合并 tip 上才互相矛盾,
维护主线短暂变红。

- core:raw_evidence_hits_... 改成断言「脱敏文本也保留类名、两边都能命中」,
  并改名 ..._and_m240_keeps_it_visible_after_scrubbing;保留一条守卫:若将来
  又把词形长路径抹掉,这条会红并提示改用 raw 窗口的用例说明其必要性。
- presenter:展示面与盘上的断言从「不许出现类名」翻成「应保留类名、且不许
  出现凭据」——类名不是凭据,留着才看得懂崩溃原因。
This commit is contained in:
AskaEth committed 2026-11-11 10:48:16 +08:00
1 parent 8a65562595
commit 0b40e1dfe2
2 files changed
+26 -14

No files matched your search

+11 -7
View File
@@ -68,18 +68,19 @@ fn raw_evidence_hits_the_rule_while_the_export_surface_stays_redacted() {
Some("fabric.loader_0_12".to_string())
);
// ② 展示面(日志行 DTO)仍是被脱敏的。
// ② 展示面(日志行 DTO):M240 收窄之后词形长路径不再被抹,所以类名会**原样出现**——
// 这是有意的(它不是凭据,留着才看得懂崩溃原因)。凭据仍然必须被抹。
assert!(
opened
.iter()
.any(|line| line.text.contains("<redacted:opaque>")),
"长类名必须被抹成占位符:{opened:?}"
.any(|line| line.text.contains("FabricMixinTransformerProxy")),
"M240 之后展示行应保留类路径:{opened:?}"
);
assert!(
!opened
.iter()
.any(|line| line.text.contains("FabricMixinTransformerProxy")),
"展示行不许出现原始类路径:{opened:?}"
.any(|line| line.text.contains("<redacted:opaque>")),
"类路径不该再被当成不透明串:{opened:?}"
);
assert!(
!opened.iter().any(|line| line.text.contains(TOKEN)),
@@ -88,8 +89,11 @@ fn raw_evidence_hits_the_rule_while_the_export_surface_stays_redacted() {
// ②' 盘上那份(= 导出包收进去的同一份文件)也没有原文——修 bug 不等于把密钥写进盘。
let disk = std::fs::read_to_string(event_path(&env, &entry)).expect("读会话文件");
assert!(!disk.contains("FabricMixinTransformerProxy"), "{disk}");
assert!(!disk.contains(TOKEN), "{disk}");
assert!(
disk.contains("FabricMixinTransformerProxy"),
"M240 之后盘上应保留类路径(它不是凭据):{disk}"
);
assert!(!disk.contains(TOKEN), "盘上不许出现凭据:{disk}");
std::fs::remove_dir_all(&root).ok();
}