feat(guanghu-os): add authenticated native public projection

This commit is contained in:
冰朔 2026-08-15 20:02:58 +08:00
commit 2e076c4d5e
14 changed files with 780 additions and 4 deletions

View file

@ -1,7 +1,7 @@
{
"schema": "guanghu.os-control-architecture/v1",
"record_id": "HLP-GUANGHU-OS-CONTROL-001",
"version": "2026-08-15.5",
"version": "2026-08-15.6",
"state": "CURRENT_CANONICAL",
"final_topology": "GUANGHU_MASTER_WITH_ON_DEMAND_LINUX_SUBCONTROL_AND_RESCUE",
"control_ownership": {
@ -39,7 +39,7 @@
"linux_on_demand_subcontrol": 0,
"linux_rescue_preserved": 100,
"final_guanghu_os_master": 0,
"next_engineering_gate": "IMPLEMENT_AUTHENTICATED_NATIVE_TO_BS_GZ_006_TRANSPORT_AND_PUBLIC_READBACK_BEFORE_ANY_BOOT_CUTOVER"
"next_engineering_gate": "DEPLOY_AND_VERIFY_BS_GZ_006_LOOPBACK_SHADOW_RECEIVER_WITHOUT_NGINX_OR_BOOT_CHANGES"
},
"implementation": {
"guanghu_supervisor_lifecycle_contract_source": 100,
@ -54,6 +54,12 @@
"native_anchor_http_qemu_capability": 100,
"native_code_channel_read_only_qemu_capability": 100,
"jd_physical_host_isolated_qemu_capability": 100,
"native_public_projection_contract_source": 100,
"native_public_projection_isolated_end_to_end_test": 100,
"bs_gz_shadow_projection_receiver": 0,
"bs_sg_authenticated_projection_sender": 0,
"live_native_projection_freshness": 0,
"nginx_native_projection_route_switch": 0,
"public_native_anchor_equivalence": 0,
"public_native_code_channel_equivalence": 0,
"full_forgejo_equivalence": 0,
@ -84,6 +90,7 @@
"adr_0172_linux_hosted_control_is_transition_not_final_topology": true
},
"native_service_equivalence_contract": "product-source/hololake-platform/guanghu-os/standards/jd-native-service-equivalence-contract.json",
"native_public_projection_contract": "product-source/hololake-platform/guanghu-os/standards/jd-native-public-projection-contract.json",
"architecture_page": "product-source/hololake-platform/architecture/HOLOLAKE-GUANGHU-OS-MASTER-AND-ON-DEMAND-LINUX-SUBCONTROL-20260810.md",
"adr": "product-source/hololake-platform/docs/adr/0175-guanghu-os-master-and-on-demand-linux-subcontrol.md",
"development_id": "DEV-20260810-012"

View file

@ -12,6 +12,9 @@ const rules = readJson("routing/hololake-engineering-rules.json");
const serviceContract = readJson(
"product-source/hololake-platform/guanghu-os/standards/jd-native-service-equivalence-contract.json",
);
const projectionContract = readJson(
"product-source/hololake-platform/guanghu-os/standards/jd-native-public-projection-contract.json",
);
test("final topology makes Guanghu the master while preserving Linux as on-demand subcontrol and rescue", () => {
assert.equal(contract.final_topology, "GUANGHU_MASTER_WITH_ON_DEMAND_LINUX_SUBCONTROL_AND_RESCUE");
@ -35,7 +38,7 @@ test("current JD state stays transitional and cannot impersonate final master co
});
test("the physical shadow and host QEMU cycles are registered without impersonating Guanghu-owned boot control", () => {
assert.equal(contract.version, "2026-08-15.5");
assert.equal(contract.version, "2026-08-15.6");
assert.equal(contract.implementation.guanghu_supervisor_lifecycle_contract_source, 100);
assert.equal(contract.implementation.target_readback_and_mandatory_reclaim_state_machine, 100);
assert.equal(contract.implementation.declared_supervisor_core_line_and_function_coverage, 100);
@ -47,6 +50,12 @@ test("the physical shadow and host QEMU cycles are registered without impersonat
assert.equal(contract.implementation.native_anchor_http_qemu_capability, 100);
assert.equal(contract.implementation.native_code_channel_read_only_qemu_capability, 100);
assert.equal(contract.implementation.jd_physical_host_isolated_qemu_capability, 100);
assert.equal(contract.implementation.native_public_projection_contract_source, 100);
assert.equal(contract.implementation.native_public_projection_isolated_end_to_end_test, 100);
assert.equal(contract.implementation.bs_gz_shadow_projection_receiver, 0);
assert.equal(contract.implementation.bs_sg_authenticated_projection_sender, 0);
assert.equal(contract.implementation.live_native_projection_freshness, 0);
assert.equal(contract.implementation.nginx_native_projection_route_switch, 0);
assert.equal(contract.implementation.public_native_anchor_equivalence, 0);
assert.equal(contract.implementation.public_native_code_channel_equivalence, 0);
assert.equal(contract.implementation.full_forgejo_equivalence, 0);
@ -59,6 +68,26 @@ test("the physical shadow and host QEMU cycles are registered without impersonat
assert.match(contract.native_service_qemu_evidence.server_receipt_sha256, /^[0-9a-f]{64}$/);
});
test("native public projection separates liveness, authenticated state, and pinned public bytes", () => {
assert.deepEqual(projectionContract.causal_route, ["JD-FD-PRIMARY", "BS-SG-003", "BS-GZ-006"]);
assert.equal(projectionContract.authentication.native_to_relay.may_supply_public_content, false);
assert.equal(projectionContract.public_bytes.provenance, "PINNED_REPO_012_SNAPSHOT");
assert.equal(projectionContract.public_bytes.relay_may_supply_or_mutate_bytes, false);
assert.equal(projectionContract.public_bytes.full_forgejo_equivalence, false);
assert.equal(projectionContract.front_door_projection.listen_scope, "LOOPBACK_ONLY");
assert.equal(projectionContract.front_door_projection.nginx_route_switch_authorized, false);
assert.equal(projectionContract.acceptance_gates.contract_source, 100);
assert.equal(projectionContract.acceptance_gates.isolated_end_to_end_test, 100);
assert.equal(projectionContract.acceptance_gates.bs_gz_shadow_receiver_deployed, 0);
assert.equal(projectionContract.acceptance_gates.bs_sg_authenticated_projector_deployed, 0);
assert.equal(projectionContract.acceptance_gates.live_native_freshness_readback, 0);
assert.equal(projectionContract.acceptance_gates.nginx_public_route_switched, 0);
assert.equal(projectionContract.acceptance_gates.public_native_anchor_equivalence, 0);
assert.equal(projectionContract.acceptance_gates.public_native_code_channel_equivalence, 0);
assert.equal(projectionContract.acceptance_gates.full_forgejo_equivalence, 0);
assert.equal(projectionContract.acceptance_gates.production_native_cutover, 0);
});
test("current architecture and global engineering rules project the same control contract", () => {
assert.equal(architecture.version, "2026-08-14.1");
assert.equal(architecture.server_os_control.machine_projection, "routing/guanghu-os-control-architecture.json");