Guard diagnostic assessment in parity check

This commit is contained in:
Dandaedre 2026-09-16 19:28:57 +02:00
parent 02af5e9a55
commit fa196cc595
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
2 changed files with 9 additions and 1 deletions

@ -1 +1 @@
Subproject commit e8eb3e381305da0b97cc241e95c33a14c211a01d
Subproject commit 16578288b267792bbdd2ca8bcb9dc38d15cbf954

View File

@ -53,6 +53,14 @@ def main():
"--output", str(Path(directory) / "latest.pdf"), "--emit-ir", str(ir)],
check=True, stdout=subprocess.DEVNULL)
report = json.loads(ir.read_text(encoding="utf-8"))
assessment = report["sections"][0]["content"][0]
if assessment["title"] != "Diagnostic assessment" or "leading finding" not in assessment["text"]:
print("Latest capture: diagnostic assessment is missing", file=sys.stderr)
return 1
if not report["sections"][0]["content"][3]["content"][0]["items"][0]["title"].startswith(
"Microsoft-Windows-WER-SystemErrorReporting · Event 1001"):
print("Latest capture: reliability event identity was lost", file=sys.stderr)
return 1
score = report["sections"][0]["content"][1]["value"]
if score != 62:
print(f"Latest capture: expected pre-plugin signal score 62, got {score}", file=sys.stderr)