feat(guanghu-os): stage independent Forgejo continuity

This commit is contained in:
冰朔 2026-08-15 20:54:53 +08:00
commit e4750c57a7
10 changed files with 467 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{
"schema": "guanghu.os-control-architecture/v1",
"record_id": "HLP-GUANGHU-OS-CONTROL-001",
"version": "2026-08-15.7",
"version": "2026-08-15.8",
"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": "DESIGN_AND_TEST_FAIL_CLOSED_LINUX_FALLBACK_BEFORE_ANY_NGINX_ROUTE_SWITCH_OR_NATIVE_BOOT"
"next_engineering_gate": "DEPLOY_AND_VERIFY_BS_SG_003_FULL_FORGEJO_SHADOW_WITHOUT_PUBLIC_ROUTE_OR_NATIVE_BOOT_CHANGES"
},
"implementation": {
"guanghu_supervisor_lifecycle_contract_source": 100,
@ -60,6 +60,11 @@
"bs_sg_authenticated_projection_sender": 100,
"live_native_projection_freshness": 0,
"nginx_native_projection_route_switch": 0,
"independent_forgejo_continuity_contract_source": 100,
"independent_forgejo_shadow_verifier_test": 100,
"bs_sg_full_forgejo_shadow": 0,
"bs_gz_to_bs_sg_forgejo_tunnel": 0,
"nginx_code_route_switch": 0,
"public_native_anchor_equivalence": 0,
"public_native_code_channel_equivalence": 0,
"full_forgejo_equivalence": 0,
@ -96,6 +101,14 @@
"live_native_freshness_readback": 0,
"nginx_public_route_switched": 0
},
"guard_cleanup_evidence": {
"bs_gz_duplicate_forgejo_guard_removed": 100,
"server_receipt": "/var/lib/guanghu-os/receipts/BS-GZ-006-DUPLICATE-FORGEJO-GUARD-REMOVAL-RECEIPT.hldp",
"server_receipt_sha256": "186075da7629c289705e31d580df1f5a77c590a3214392a382459030207c8214",
"preserved_live_forgejo_http": 200,
"public_code_http_after": 200,
"data_deleted": false
},
"historical_evidence_policy": {
"bare_metal_gosk_ghal_receipts_remain_valid_for_observed_capabilities": true,
"historical_linux_free_completion_formula_is_current": false,
@ -103,6 +116,7 @@
},
"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",
"independent_forgejo_continuity_contract": "product-source/hololake-platform/guanghu-os/standards/jd-independent-forgejo-continuity-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

@ -15,6 +15,9 @@ const serviceContract = readJson(
const projectionContract = readJson(
"product-source/hololake-platform/guanghu-os/standards/jd-native-public-projection-contract.json",
);
const forgejoContract = readJson(
"product-source/hololake-platform/guanghu-os/standards/jd-independent-forgejo-continuity-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");
@ -38,7 +41,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.7");
assert.equal(contract.version, "2026-08-15.8");
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);
@ -56,6 +59,11 @@ test("the physical shadow and host QEMU cycles are registered without impersonat
assert.equal(contract.implementation.bs_sg_authenticated_projection_sender, 100);
assert.equal(contract.implementation.live_native_projection_freshness, 0);
assert.equal(contract.implementation.nginx_native_projection_route_switch, 0);
assert.equal(contract.implementation.independent_forgejo_continuity_contract_source, 100);
assert.equal(contract.implementation.independent_forgejo_shadow_verifier_test, 100);
assert.equal(contract.implementation.bs_sg_full_forgejo_shadow, 0);
assert.equal(contract.implementation.bs_gz_to_bs_sg_forgejo_tunnel, 0);
assert.equal(contract.implementation.nginx_code_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);
@ -72,6 +80,27 @@ test("the physical shadow and host QEMU cycles are registered without impersonat
assert.equal(contract.native_public_projection_shadow_evidence.nginx_public_route_switched, 0);
assert.match(contract.native_public_projection_shadow_evidence.bs_gz_server_receipt_sha256, /^[0-9a-f]{64}$/);
assert.match(contract.native_public_projection_shadow_evidence.bs_sg_server_receipt_sha256, /^[0-9a-f]{64}$/);
assert.equal(contract.guard_cleanup_evidence.bs_gz_duplicate_forgejo_guard_removed, 100);
assert.equal(contract.guard_cleanup_evidence.preserved_live_forgejo_http, 200);
assert.equal(contract.guard_cleanup_evidence.public_code_http_after, 200);
assert.equal(contract.guard_cleanup_evidence.data_deleted, false);
assert.match(contract.guard_cleanup_evidence.server_receipt_sha256, /^[0-9a-f]{64}$/);
});
test("full Forgejo continuity remains separate from the read-only native code snapshot", () => {
assert.equal(forgejoContract.source_binding.node_id, "JD-FD-PRIMARY");
assert.equal(forgejoContract.source_binding.repository_count, 7);
assert.equal(forgejoContract.shadow_binding.node_id, "BS-SG-003");
assert.equal(forgejoContract.shadow_binding.publicly_reachable, false);
assert.equal(forgejoContract.migration_policy.online_snapshot_is_cutover_authority, false);
assert.equal(forgejoContract.migration_policy.final_cutover_requires_bounded_write_freeze, true);
assert.equal(forgejoContract.acceptance_gates.verifier_source, 100);
assert.equal(forgejoContract.acceptance_gates.isolated_verifier_test, 100);
assert.equal(forgejoContract.acceptance_gates.bs_sg_full_forgejo_shadow_deployed, 0);
assert.equal(forgejoContract.acceptance_gates.bs_gz_to_bs_sg_authenticated_tunnel, 0);
assert.equal(forgejoContract.acceptance_gates.nginx_code_route_switched, 0);
assert.equal(forgejoContract.acceptance_gates.full_forgejo_equivalence, 0);
assert.equal(forgejoContract.acceptance_gates.production_native_cutover, 0);
});
test("native public projection separates liveness, authenticated state, and pinned public bytes", () => {