fix: give the gaps page accepted hashes as data

Verify details now hold the values a refused hash check accepts, so the
gaps page no longer parses them out of the mismatch message.
This commit is contained in:
Abdessamad Derraz committed 2026-11-23 21:02:27 +01:00
1 parent ed73caf489
commit acdce07ea5
5 files changed
+90 -33

No files matched your search

+3
View File
@@ -32,6 +32,7 @@ from resolve.cores import platform_scope_systems, resolve_platform_cores
from resolve.launchers import launcher_unproven
from resolve.nativemode import digest_algorithm, platform_mode, reads_file_contents
from resolve.validation import (
accepted_hashes,
build_validation_index,
agnostic_substitute,
baseline_verdict,
@@ -478,6 +479,8 @@ class _PlatformTally:
)
if disagreement:
result["discrepancy"] = f"{self.platform} says OK but {disagreement}"
if accepted := accepted_hashes(disagreement):
result["accepted"] = accepted
return result, local_path
def _aggregate(
+5
View File
@@ -6,6 +6,7 @@ from core.hashing import compute_hashes, md5sum, parse_hash_list
from core.ziptools import check_inside_zip
from resolve.nativemode import SIZE_AND_ANY_HASH, reads_file_contents
from resolve.validation import (
accepted_hashes,
check_file_validation,
existence_discrepancy,
frontend_digest_matches,
@@ -79,11 +80,15 @@ def verify_entry_existence(
file_entry, local_path, db, validation_index, "bios", None,
destination, owners,
)
accepted = accepted_hashes(disagreement)
else:
check = check_file_validation(local_path, name, validation_index)
disagreement = f"{', '.join(check[1])} says {check[0]}" if check else None
accepted = accepted_hashes(check[0]) if check else {}
if disagreement:
result["discrepancy"] = f"file present (OK) but {disagreement}"
if accepted:
result["accepted"] = accepted
return result