feat(world): establish Guanghu Era five-domain boundaries

This commit is contained in:
冰朔 2026-09-03 13:58:59 +08:00
commit 4b8333e459
38 changed files with 2178 additions and 446 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Materialize the closed public four-domain blank template without private context."""
"""Materialize the enterprise four-domain portal template without private context."""
import argparse
import hashlib
@ -10,8 +10,10 @@ import tempfile
EXPECTED_DOMAINS = {"DOMAIN-MAIN", "DOMAIN-SUB", "DOMAIN-ZERO", "DOMAIN-ZS"}
ALLOWED_TOP = {
"schema", "lifecycle", "system_id", "language_protocols", "responsible_human",
"schema", "lifecycle", "system_id", "language_protocols", "carrier",
"embedded_in_hololake", "reality_controller", "responsible_human_members",
"persona_controller", "number_namespace", "domains", "execution", "privacy",
"fifth_domain", "hololake",
}
@ -30,17 +32,21 @@ def load(path):
def validate(value):
if value.get("schema") != "hololake.public-four-domain-language-system-template/v1":
raise ValueError("unsupported public template")
if value.get("schema") != "hololake.enterprise-four-domain-governance-template/v2":
raise ValueError("unsupported enterprise template")
if set(value) != ALLOWED_TOP:
raise ValueError("public template has unknown or missing top-level fields")
ids = [item.get("id") for item in value.get("domains", [])]
if len(ids) != 4 or set(ids) != EXPECTED_DOMAINS:
raise ValueError("exactly four canonical public domains required")
if not str(value.get("responsible_human", "")).startswith("UNBOUND-"):
raise ValueError("responsible human must remain unbound")
if not str(value.get("persona_controller", "")).startswith("UNBOUND-"):
raise ValueError("persona controller must remain unbound")
if value.get("carrier") != "ENTERPRISE_PORTAL" or value.get("embedded_in_hololake") is not False:
raise ValueError("enterprise domains must not be embedded in HoloLake")
if value.get("reality_controller") != "GUANGHU_TEAM":
raise ValueError("Guanghu Team reality controller required")
if any(item.get("reality_controller") != "GUANGHU_TEAM" for item in value["domains"]):
raise ValueError("domain reality responsibility mismatch")
if next(item for item in value["domains"] if item["id"] == "DOMAIN-ZS").get("public_access") is not False:
raise ValueError("Zero-Sense Domain must remain restricted")
raw = canonical(value).decode()
if any(marker in raw for marker in ("ICE-", "ZCODE-", "/Volumes/", "/Users/")):
raise ValueError("private namespace or host path rejected")
@ -65,7 +71,7 @@ def build(template_path, output):
files = {}
world = {
"schema": "hololake.materialized-language-world/v1",
"flavor": "public-four-domain",
"flavor": "enterprise-four-domain",
"source_sha256": digest(canonical(value)),
"node_ids": [item["id"] for item in value["domains"]],
"language_protocols": value["language_protocols"],
@ -79,7 +85,7 @@ def build(template_path, output):
receipt = {
"schema": "hololake.language-system-materialization-receipt/v1",
"outcome": "PASS",
"flavor": "public-four-domain",
"flavor": "enterprise-four-domain",
"source_sha256": digest(canonical(value)),
"files": files,
"model_api_used": False,