Files
chimera-gfx-Public/tests/test_retroarch_phase10ae.py
Chimera GFX release export a6037502d7
phase0-ci / build-and-audit (push) Successful in 2m14s
Publish Chimera GFX source
2026-09-03 03:27:14 +02:00

42 lines
1.5 KiB
Python

#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tracked guardrails for Phase-1.0AE."""
from __future__ import annotations
import argparse
import json
from pathlib import Path
import unittest
PARSER = argparse.ArgumentParser()
PARSER.add_argument("--root", type=Path, required=True)
ROOT = PARSER.parse_args().root
class Phase10AEGuardrails(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.data = json.loads((ROOT / "manifests/retroarch/phase-1.0ae-launcher-architecture.json").read_text(encoding="utf-8"))
def test_no_authority_or_target_implementation(self) -> None:
self.assertFalse(any(self.data["authorizations"].values()))
self.assertFalse(self.data["decision"]["target_implementation_allowed"])
self.assertFalse(self.data["decision"]["device_action_allowed"])
def test_persistent_and_destructive_behavior_is_forbidden(self) -> None:
policy = self.data["mandatory_policy"]
for key in ("kill_existing_bigapp", "automatic_retry", "fallback_title",
"persistent_write", "system_remount", "installation", "autoload"):
self.assertFalse(policy[key])
def test_hard_blockers_remain_explicit(self) -> None:
self.assertGreaterEqual(len(self.data["hard_blockers"]), 8)
self.assertFalse(self.data["lineage_decision"]["root_cause_proven"])
self.assertFalse(self.data["lineage_decision"]["videoout_ownership_proven"])
if __name__ == "__main__":
unittest.main(argv=[__file__])