feat: summarize official validation results

Fixes #5
This commit is contained in:
2026-07-13 01:06:37 +08:00
parent e5fcf26e19
commit 1bcb9c828a
5 changed files with 201 additions and 2 deletions
@@ -200,6 +200,26 @@ fn official_update_first_run_pulls_without_pre_audit() {
assert_eq!(report.downloaded_count, 19);
assert_eq!(report.skipped_count, 0);
assert_eq!(report.local_manifest_repair_needed_count, 0);
assert_eq!(
report
.verification_summary
.local_manifest_blake3_verified_count,
19
);
assert_eq!(report.verification_summary.official_hash_verified_count, 5);
assert_eq!(report.verification_summary.zip_structure_verified_count, 6);
assert!(report
.verification_summary
.official_hash_scope
.contains("xxHash32"));
assert!(report
.verification_summary
.local_manifest_blake3_scope
.contains("BLAKE3"));
assert!(report
.verification_summary
.zip_structure_scope
.contains("central directory"));
assert!(events.iter().any(|event| {
event.stage == "local-state" && event.message.contains("是否已有本地资源=false")
}));
@@ -226,6 +246,13 @@ fn official_update_second_run_audits_existing_resources_before_reuse() {
assert_eq!(report.downloaded_count, 0);
assert_eq!(report.local_manifest_verified_count, 19);
assert_eq!(report.local_manifest_repair_needed_count, 0);
assert_eq!(
report
.verification_summary
.local_manifest_blake3_verified_count,
19
);
assert_eq!(report.verification_summary.zip_structure_verified_count, 6);
assert!(events.iter().any(|event| {
event.stage == "local-state" && event.message.contains("是否已有本地资源=true")
}));