feat: add JD native read-only service surface
This commit is contained in:
parent
a5a1cdc185
commit
856a6c9ffb
8 changed files with 317 additions and 18 deletions
|
|
@ -9,6 +9,9 @@ const readJson = (relative) => JSON.parse(fs.readFileSync(path.join(root, relati
|
|||
const contract = readJson("routing/guanghu-os-control-architecture.json");
|
||||
const architecture = readJson("routing/hololake-current-architecture.json");
|
||||
const rules = readJson("routing/hololake-engineering-rules.json");
|
||||
const serviceContract = readJson(
|
||||
"product-source/hololake-platform/guanghu-os/standards/jd-native-service-equivalence-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");
|
||||
|
|
@ -32,7 +35,7 @@ test("current JD state stays transitional and cannot impersonate final master co
|
|||
});
|
||||
|
||||
test("the physical shadow cycle is registered without impersonating Guanghu-owned boot control", () => {
|
||||
assert.equal(contract.version, "2026-08-15.3");
|
||||
assert.equal(contract.version, "2026-08-15.4");
|
||||
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);
|
||||
|
|
@ -40,6 +43,12 @@ test("the physical shadow cycle is registered without impersonating Guanghu-owne
|
|||
assert.equal(contract.implementation.linux_hosted_isolated_shadow_backend, 100);
|
||||
assert.equal(contract.implementation.real_isolated_linux_backend, 0);
|
||||
assert.equal(contract.implementation.jd_shadow_backend_physical_cycle, 100);
|
||||
assert.equal(contract.implementation.native_service_equivalence_contract_source, 100);
|
||||
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.public_native_anchor_equivalence, 0);
|
||||
assert.equal(contract.implementation.public_native_code_channel_equivalence, 0);
|
||||
assert.equal(contract.implementation.full_forgejo_equivalence, 0);
|
||||
assert.equal(contract.implementation.independent_guanghu_first_boot_supervisor, 0);
|
||||
assert.equal(contract.implementation.jd_physical_deployment, 0);
|
||||
assert.equal(contract.current_target_evidence.final_state, "DORMANT");
|
||||
|
|
@ -54,3 +63,19 @@ test("current architecture and global engineering rules project the same control
|
|||
assert.equal(rules.server_os_control.linux_hosted_language_primary_is_final_master, false);
|
||||
assert.equal(rules.server_os_control.live_readback_predicates_required, true);
|
||||
});
|
||||
|
||||
test("native service surface is exact while every physical and public claim remains zero", () => {
|
||||
assert.equal(serviceContract.node_id, "JD-FD-PRIMARY");
|
||||
assert.deepEqual(
|
||||
serviceContract.native_read_only_surface.map((endpoint) => endpoint.path),
|
||||
["/v1/anchor", "/v1/code-channel"],
|
||||
);
|
||||
assert.equal(serviceContract.accepted_repository.commit, "fb1096c5ecdcfb36015d51273f487c2f36d9c9cd");
|
||||
assert.equal(serviceContract.acceptance_gates.native_anchor_qemu, 100);
|
||||
assert.equal(serviceContract.acceptance_gates.native_code_channel_read_only_qemu, 100);
|
||||
assert.equal(serviceContract.acceptance_gates.native_physical_readback, 0);
|
||||
assert.equal(serviceContract.acceptance_gates.public_anchor_during_native_residency, 0);
|
||||
assert.equal(serviceContract.acceptance_gates.public_code_during_native_residency, 0);
|
||||
assert.equal(serviceContract.acceptance_gates.full_forgejo_equivalence, 0);
|
||||
assert.equal(serviceContract.acceptance_gates.production_native_cutover, 0);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue