This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
"""Guardrails for the post-CZ differential record."""
|
||||
from __future__ import annotations
|
||||
import argparse, json
|
||||
from pathlib import Path
|
||||
import unittest
|
||||
|
||||
P=argparse.ArgumentParser();P.add_argument("--root",type=Path,required=True);ROOT=P.parse_args().root
|
||||
|
||||
class Phase10DB(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.record=json.loads((ROOT/"manifests/retroarch/phase-1.0db-post-cz-differential-analysis.json").read_text())
|
||||
def test_exact_run_facts(self):
|
||||
runs=self.record["raw_runs"]
|
||||
self.assertEqual(runs["phase10cz"]["videoout_open_raw_hex"],"0x80290009")
|
||||
self.assertFalse(runs["phase10cz"]["flip_submit_reached"])
|
||||
self.assertEqual(runs["phase10o"]["flip_submit_raw"],-1)
|
||||
def test_no_causal_overclaim(self):
|
||||
evidence=self.record["evidence_classification"]
|
||||
self.assertFalse(evidence["o_to_cz_difference_is_causal_evidence"])
|
||||
self.assertFalse(evidence["bigapp_context_root_cause_proven"])
|
||||
def test_gate_remains_closed(self):
|
||||
self.assertFalse(any(self.record["authorizations"].values()))
|
||||
self.assertFalse(self.record["bigapp_gate"]["existing_hbldr_direct_use_allowed"])
|
||||
self.assertFalse(self.record["decision"]["device_action_allowed"])
|
||||
|
||||
if __name__=="__main__":unittest.main(argv=[__file__])
|
||||
Reference in New Issue
Block a user