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-03 XZ batch 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_sim_case_batch_s8_03
ROOT = Path(__file__).resolve().parents[1]
REPORT = ROOT / "coverage/sim-case-batch-s8-03.report.json"
class SimCaseBatchS803Tests(unittest.TestCase):
def test_contract(self) -> None:
report = json.loads(REPORT.read_text(encoding="utf-8"))
self.assertEqual(report["schema"], "sim-case-batch-s8-03-report.v1")
self.assertEqual(report["status"], "verified")
self.assertEqual(report["implementation_status"], "verified")
self.assertEqual(report["checks"]["three_case_batch"]["cases"], 3)
self.assertEqual(report["checks"]["task_ready"]["status"], "verified")
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_sim_case_batch_s8_03.canonical(unsigned).encode()).hexdigest())
if __name__ == "__main__":
unittest.main()