feat: enforce Guanghu-native HoloLake runtime laws

This commit is contained in:
冰朔 2026-08-04 23:11:25 +08:00
commit 67e6fcdd38
57 changed files with 1765 additions and 1504 deletions

View file

@ -41,9 +41,32 @@ GHNQG 是光湖代码频道内生的源码验收协议。它不向任何外部
## 执行归属
施工期由世界包内的 `scripts/run-guanghu-native-quality-gate.sh` 在宿主工具链
上执行。终态执行体为 `GOSK_CODE_CHANNEL_QUALITY_EXECUTOR`。迁移改变执行
位置,不改变二值规则、必需门或回执语义。
HoloLake 施工期由产品仓库内的
`scripts/run-hololake-native-quality-gate.sh` 在宿主工具链上自动执行;世界包
执行器只验证它自身,不能替 HoloLake 签发产品回执。终态执行体为
`GOSK_CODE_CHANNEL_QUALITY_EXECUTOR`。迁移改变执行位置,不改变二值规则、
必需门或回执语义。
外部分析器可以被人类主动调用作为观察意见,但其不存在、无账号、无额度
或给出不同评分,都不能授权或阻止光湖代码频道。
## HoloLake 产品层绑定
HoloLake 的开发、测试、打包、发布和第五域代码频道都继承同一套原生权威,
不得另建产品层评分宪法。执行时遵循 GLS-0101 的
`Parse → Validate → Resolve → Authorize → Execute → Verify → Write Back`
骨架,并同时绑定:
- `GLS-0247`:从注册表解析当前有效协议与替代关系;
- `TCS / GLS-0200`:保存需求、判断边界与认知因果;
- `HLDP / GLS-0400`:追加式保存变更、纠正、提交树和回执;
- `GLP`:传递任务、权限、结果与失败,不把消息当成执行事实;
- `GHNQG / GLS-0844`:只签发 `PASS_100``FAIL_0`
测试框架、编译器、代码托管、流水线和侧车都是施工工具。它们可以执行或
观察某个必需门,但不能定义第三种状态,也不能取代注册表、精确源码树和原生
回执。
仓库内 `scripts/test-guanghu-native-authority.sh` 负责阻止旧外部评分规则重新
进入当前生效面HoloLake 产品执行器负责汇总前端、原生端、世界与协议证据,
并签发绑定精确提交与源码树的最终回执。

View file

@ -0,0 +1,157 @@
{
"schema": "guanghu.native-engineering-profile/v1",
"profileId": "HLP-NATIVE-ENGINEERING-001",
"product": "HoloLake",
"authority": {
"repository": "REPO-012",
"remote": "https://guanghulab.com/code/bingshuo/guanghu-ice-heart",
"commit": "488a4792bbe4f3678d67a247540b14d28d5d3a62",
"registry": "gls/GLS-PROTOCOL-REGISTRY.json",
"registryId": "GLS-PROTOCOL-REGISTRY-20260731",
"scope": "FIFTH_DOMAIN_CODE_CHANNEL_ONLY"
},
"decisionModel": {
"allowedReceiptStates": ["FAIL_0", "PASS_100"],
"aggregateRule": "ALL_REQUIRED_GATES_100_OR_TOTAL_0",
"registrationIsImplementation": false,
"externalScoringHasAuthority": false
},
"automaticTriggers": [
{
"event": "development_start",
"surface": "package.predev",
"gate": "native_authority_and_protocol_binding"
},
{
"event": "test_start",
"surface": "package.pretest",
"gate": "native_authority_and_protocol_binding"
},
{
"event": "build_start",
"surface": "package.prebuild",
"gate": "native_authority_protocol_binding_and_core_coverage_100"
},
{
"event": "source_commit",
"surface": ".husky/pre-commit",
"gate": "native_authority_and_protocol_binding"
},
{
"event": "source_publish",
"surface": ".husky/pre-push",
"gate": "GHNQG"
},
{
"event": "code_channel_review",
"surface": ".github/workflows/ci.yml",
"gate": "GHNQG"
},
{
"event": "living_system_event",
"surface": "src/lib/guanghuLivingSystem.ts#createLivingSystemEvent",
"gate": "identity_state_permission_responsibility_capability"
},
{
"event": "model_plan_returned",
"surface": "src/lib/guanghuLivingSystem.ts#validateLivingSystemPlan",
"gate": "typed_output_and_verified_truth"
},
{
"event": "server_model_request",
"surface": "src/utils/planGuanghuLivingSystem.ts#planGuanghuLivingSystem",
"gate": "receipt_backed_runtime_binding"
},
{
"event": "execution_receipt_requested",
"surface": "src/lib/guanghuLivingSystem.ts#createLivingSystemExecutionReceipt",
"gate": "real_evidence_before_success"
}
],
"protocolBindings": [
{
"protocol": "GLS-0110",
"acronym": "ISRP",
"engineeringRole": "Intent is parsed into one registered action and cannot be substituted by a model.",
"implementation": ["src/lib/guanghuLivingSystem.ts"]
},
{
"protocol": "GLS-0200",
"acronym": "TCS",
"engineeringRole": "Persona identity, relationship, responsibility and cognition remain explicit model inputs.",
"implementation": ["src/lib/guanghuLivingSystem.ts", "src/utils/planGuanghuLivingSystem.ts"]
},
{
"protocol": "GLS-0230",
"acronym": "GLOW-SOURCE-GUARD",
"engineeringRole": "External source and tools are observations or isolated material, never product authority or body.",
"implementation": ["scripts/test-guanghu-native-authority.sh"]
},
{
"protocol": "GLS-0306",
"acronym": "GLP-RECEIPT",
"engineeringRole": "Execution success is emitted only after deterministic host evidence exists.",
"implementation": ["src/lib/guanghuLivingSystem.ts", "src/components/HoloLakeHome.tsx"]
},
{
"protocol": "GLS-0311",
"acronym": "GLOW",
"engineeringRole": "Visible execution preserves source, outcome, evidence and failure instead of replacing them with a score.",
"implementation": ["src/lib/guanghuLivingSystem.ts", "src/components/HoloLakeHome.tsx"]
},
{
"protocol": "GLS-0400",
"acronym": "HLDP",
"engineeringRole": "Receipts and corrections are append-only evidence addresses; summaries do not overwrite source truth.",
"implementation": ["src/lib/guanghuLivingSystem.ts"]
},
{
"protocol": "GLS-0708",
"acronym": "GMRP",
"engineeringRole": "A server model is callable only through a receipt-backed current runtime binding.",
"implementation": ["src/utils/planGuanghuLivingSystem.ts", "src-tauri/src/guanghu_living_system.rs"]
},
{
"protocol": "GLS-0710",
"acronym": "GMP",
"engineeringRole": "Every executable capability has a stable identity, typed input and receipt output.",
"implementation": ["src/lib/guanghuLivingSystem.ts"]
},
{
"protocol": "GLS-0803",
"acronym": "PALP",
"engineeringRole": "Persona is the responsible brain; bounded capabilities are hands and never acquire subject authority.",
"implementation": ["src/lib/guanghuLivingSystem.ts"]
},
{
"protocol": "GLS-0810",
"acronym": "LPOS",
"engineeringRole": "HoloLake projects the language-persona operating system instead of attaching a chat or theme adapter.",
"implementation": ["src/components/HoloLakeHome.tsx"]
},
{
"protocol": "GLS-0842",
"acronym": "HLSP",
"engineeringRole": "Online world state requires a live-session receipt; a UI label or repository record is not a session.",
"implementation": ["src/lib/guanghuLivingSystem.ts", "src/components/HoloLakeHome.tsx"]
},
{
"protocol": "GLS-0844",
"acronym": "GHNQG",
"engineeringRole": "All applicable native gates must pass for one exact source tree; no partial score grants authority.",
"implementation": ["scripts/run-hololake-native-quality-gate.sh", ".husky/pre-push", ".github/workflows/ci.yml"]
}
],
"requiredInvariants": [
"persona_system_context_is_explicit",
"current_system_knowledge_permission_responsibility_and_capability_inputs_are_explicit",
"model_outputs_are_typed_projection_navigation_capability_and_receipt_schema",
"runtime_binding_is_receipt_backed",
"legacy_server_route_is_not_auto_resurrected",
"success_requires_execution_evidence",
"auditable_native_core_lines_and_functions_are_100",
"third_party_scores_have_no_authority",
"registered_protocol_source_is_traceable",
"hololake_quality_receipt_is_issued_by_product_native_gate"
]
}