fix: tell an offline cache miss from absence

Offline, fetch_file answered None for a path the cache never
stored, the same answer as a path known to be absent, and
profile_sync reported existing files as gone. A miss now raises
NotCachedError and the profile is reported unverified.
This commit is contained in:
Abdessamad Derraz committed 2026-10-18 02:46:57 +02:00
1 parent b91449590d
commit 9802804a9a
6 files changed
+59 -9

No files matched your search

+7 -3
View File
@@ -124,9 +124,13 @@ def main() -> None:
total = 0
for name in args.emulators:
findings, agreed, unjudged = audit(
name, args.emulators_dir, args.cache_dir, args.offline
)
try:
findings, agreed, unjudged = audit(
name, args.emulators_dir, args.cache_dir, args.offline
)
except upstream.UpstreamError as exc:
print(f"{name}: unreachable, {exc}", file=sys.stderr)
continue
total += len(findings)
print(
f"{name}: {agreed} agree, {len(findings)} point elsewhere, "