Implement AXIS parity UI and execution baseline

This commit is contained in:
2026-08-23 07:28:37 +08:00
parent 1325504544
commit 06f96f85e5
463 changed files with 84893 additions and 692 deletions

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env python3
"""Contract tests for the S8-04 minimal XYZ vertical report."""
from __future__ import annotations
import hashlib
import json
import sys
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
import generate_minimal_xyz_vertical_s8_04
ROOT = Path(__file__).resolve().parents[1]
REPORT = ROOT / "coverage/minimal-xyz-vertical-s8-04.report.json"
class MinimalXYZVerticalS804Tests(unittest.TestCase):
def test_contract(self) -> None:
report = json.loads(REPORT.read_text(encoding="utf-8"))
self.assertEqual(report["schema"], "minimal-xyz-vertical-s8-04-report.v1")
self.assertEqual(report["status"], "verified")
self.assertEqual(report["checks"]["startup_task_ready"]["status"], "verified")
self.assertTrue(report["checks"]["checkpoint_recovery_parity"]["endpoint_equal"])
self.assertEqual(report["checks"]["estop_recover"]["blocked_code"], "sim_io_estop")
def test_self_hash(self) -> None:
report = json.loads(REPORT.read_text(encoding="utf-8"))
unsigned = {key: value for key, value in report.items() if key != "report_sha256"}
self.assertEqual(report["report_sha256"], hashlib.sha256(generate_minimal_xyz_vertical_s8_04.canonical(unsigned).encode()).hexdigest())
if __name__ == "__main__":
unittest.main()