fix: a refused file is held, not present

On a hash platform the builder leaves out a file whose declared hash the local copy contradicts, but the README coverage added every UNTESTED file to the present count. RetroDECK read 2,008/2,008 for a pack carrying 2,007. verify now lists the destinations the builder refuses, and the coverage subtracts them.
This commit is contained in:
Abdessamad Derraz committed 2026-10-19 23:00:31 +02:00
1 parent 16f6ef8cbf
commit 1ea6b9d070
4 files changed
+65 -3

No files matched your search

+3 -1
View File
@@ -60,7 +60,9 @@ def compute_coverage(
untested = sc.get("untested", 0)
missing = sc.get("missing", 0)
total = result["total_files"]
present = ok + untested
# An UNTESTED file the builder refuses (its declared hash contradicted on
# a hash platform) is held, not packed.
present = ok + untested - len(result.get("excluded_files", []))
pct = (present / total * 100) if total > 0 else 0
undeclared = result.get("undeclared_files", [])
# Held is not packed: a file the platform has no folder for, or one below