Просмотр исходного кода

test(mse): Round-8 pre-audit summary and tip→delivery unit gates

Record five-pre-audit PASS/fix notes and lock mse-a1 naming plus closure classification with unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
root 3 месяцев назад
Родитель
Сommit
802dab5802

+ 33 - 0
receipts/mse-r8-preaudit/five-pre-audit-summary.json

@@ -0,0 +1,33 @@
+{
+  "schema": "prod2u-mse-r8-five-pre-audit-v1",
+  "generated_utc": "2026-08-12T15:06:32.647740+00:00",
+  "base_dev_commit": "d4f3df2549efeb1e9227f62d1d71c6179c9f9160",
+  "starting_preview_head": "c18fec98c06192d2d70ce1a603c043963af12887",
+  "prior_matrix_tip": "21ed755ad2ddb6689bca88a9a037b391372a060e",
+  "td_bound_commit": "ff44128a540b7ffd9d82314093b242ac3aee92d7",
+  "audits": {
+    "1_source_closure": {
+      "status": "pass",
+      "note": "37/37 match ff44128 vs 21ed755 vs HEAD; no production RTL P0"
+    },
+    "2_unified_matrix": {
+      "status": "pass",
+      "note": "R7 lanes all pass bound to 21ed755 / mse-r7-20260812T132652Z"
+    },
+    "3_git_provenance": {
+      "status": "pass",
+      "note": "c0c6ef3\u2192e73bb8b\u219249a1678\u2192c18fec9 docs/receipts only; package-time actual-HEAD closure designed"
+    },
+    "4_evidence_current_historical": {
+      "status": "pass_with_fix",
+      "note": "parked stale R6 FAIL basename; promote current Formal PASS after R8 matrix"
+    },
+    "5_packaging_reference": {
+      "status": "pass_with_fix",
+      "note": "topic\u2192mse-a1; package-time closure helper; no physical mapping change; bitstream bytes missing on disk for b4b0eda4"
+    }
+  },
+  "new_production_rtl_p0": 0,
+  "hardware_validation": "NOT RUN",
+  "dev_merge": "FORBIDDEN"
+}

+ 49 - 0
tests/unit/test_mse_r8_release_closure.py

@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+"""Unit tests for package-time verification→delivery closure and topic naming."""
+
+from __future__ import annotations
+
+import os
+import unittest
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[2]
+import sys
+
+sys.path.insert(0, str(ROOT / "tools"))
+
+import package_provenance as pkg_prov  # noqa: E402
+import verification_to_delivery_closure as v2d  # noqa: E402
+
+
+class TopicNamingTests(unittest.TestCase):
+    def test_default_topic_is_mse_a1(self) -> None:
+        os.environ.pop("PRODU2_RELEASE_TASK_SLUG", None)
+        os.environ.pop("PRODU2_PACKAGE_TOPIC", None)
+        self.assertEqual(pkg_prov.release_task_slug(), "mse-a1")
+        name = pkg_prov.release_sibling_filename("review-compact", "abcdef12deadbeef")
+        self.assertIn("mse-a1", name)
+        self.assertNotIn("door-percent", name)
+
+    def test_deprecated_alias_keeps_door_percent(self) -> None:
+        alias = pkg_prov.deprecated_door_percent_alias(
+            "review-selftest", "abcdef12deadbeef"
+        )
+        self.assertIn("door-percent", alias)
+
+
+class ClosureClassifyTests(unittest.TestCase):
+    def test_production_rtl_forbidden(self) -> None:
+        self.assertEqual(v2d._classify("src/modules/door_shared_dda_scheduler.v"), "forbidden")
+        self.assertEqual(v2d._classify("constraints/prod2u_p4_normal_v3.adc"), "forbidden")
+        self.assertEqual(v2d._classify("td/syn/prod2u_p4_normal_v3.tcl"), "forbidden")
+
+    def test_receipts_and_docs_allowed(self) -> None:
+        self.assertEqual(v2d._classify("receipts/mse-r8/x.json"), "allowed")
+        self.assertEqual(v2d._classify("evidence/formal/formal-receipt.json"), "allowed")
+        self.assertEqual(v2d._classify("README.zh-CN.md"), "allowed")
+        self.assertEqual(v2d._classify("tools/package_provenance.py"), "allowed")
+
+
+if __name__ == "__main__":
+    unittest.main()