no-mistakes(review): Reject report-only exclusion entries lacking identity keys

This commit is contained in:
root
2026-09-12 18:51:42 +00:00
parent 6d65cba064
commit 4bd6132cf5
2 changed files with 28 additions and 0 deletions
+6
View File
@@ -59,6 +59,12 @@ def load_report_only_guests(contract_path: pathlib.Path) -> list[dict]:
guests = data.get("report_only_guests") or []
if not isinstance(guests, list):
raise SystemExit("report_only_guests must be a list")
for guest in guests:
if not isinstance(guest, dict) or not _keys(guest):
raise SystemExit(
"report_only_guests entry has no recognizable identity key "
f"(expected one of: {', '.join(IDENTITY_FIELDS)}): {guest!r}"
)
return guests
raise SystemExit(
f"no authoritative report_only_guests block found in {contract_path}"