feat(enterprise): add device-bound responsibility gate

This commit is contained in:
冰朔 2026-09-03 21:48:04 +08:00
commit be31c4136b
7 changed files with 392 additions and 3 deletions

View file

@ -41,6 +41,10 @@ for required_file in (
"contracts/clean-v1-execution-baseline.json",
"contracts/enterprise-responsibility-entrance-v1.json",
"language/HOLOLAKE-CLEAN-V1-DIRECT-LANGUAGE-EXECUTION-BASELINE.tcs",
"server/enterprise-responsibility-gate/service.py",
"server/enterprise-responsibility-gate/test_service.py",
"server/enterprise-responsibility-gate/guanghu-hololake-enterprise-gate.service",
"server/enterprise-responsibility-gate/nginx.conf",
):
if not (ROOT / required_file).exists():
errors.append(f"public runtime file missing: {required_file}")
@ -67,7 +71,7 @@ if enterprise.get("device_proof", {}).get("fingerprint_is_sole_credential") is n
errors.append("machine fingerprint incorrectly used as sole credential")
if enterprise.get("session", {}).get("scope") != "ONE_DOMAIN_ONE_REPOSITORY":
errors.append("enterprise session is not responsibility scoped")
if enterprise.get("state") != "LOCAL_DEVICE_PROOF_INSTALLED_KEYCHAIN_VERIFIED_SERVER_CHALLENGE_PENDING":
if enterprise.get("state") != "LOCAL_DEVICE_PROOF_INSTALLED_KEYCHAIN_VERIFIED_SERVER_GATE_SOURCE_TESTED_DEPLOYMENT_PENDING":
errors.append("enterprise local device proof implementation state drift")
time_source = (ROOT / "src/time.ts").read_text()
app_source = (ROOT / "src/App.tsx").read_text()