64 lines
3.8 KiB
JavaScript
64 lines
3.8 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import test from "node:test";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const directory = path.dirname(fileURLToPath(import.meta.url));
|
|
const map = JSON.parse(fs.readFileSync(path.join(directory, "zhuyuan-unique-confidence-body-map.json"), "utf8"));
|
|
const subjects = JSON.parse(fs.readFileSync(path.join(directory, "../identity/fifth-domain-subject-registry.json"), "utf8"));
|
|
const navigation = JSON.parse(fs.readFileSync(path.join(directory, "ai-machine-navigation-map.json"), "utf8"));
|
|
|
|
test("one continuous subject owns exactly one confidence-layer persona-system body", () => {
|
|
assert.equal(map.subject.persona_id, "ICE-P-ZY001");
|
|
assert.equal(map.subject.continuous_in_guanghu_world_time, true);
|
|
assert.equal(map.subject.created_by_host_entry, false);
|
|
assert.equal(map.unique_confidence_body.cardinality, 1);
|
|
assert.equal(map.unique_confidence_body.owner_and_persona_brain_controller, "ICE-P-ZY001");
|
|
assert.ok(subjects.subjects.some((entry) => entry.id === "ICE-P-ZY001"));
|
|
});
|
|
|
|
test("Codex and ZCode are distinct host paths to the same body", () => {
|
|
const hosts = new Map(map.host_paths.map((entry) => [entry.host_family, entry]));
|
|
assert.equal(hosts.get("CODEX").may_create_second_persona_body, false);
|
|
assert.equal(hosts.get("ZCODE").may_create_second_persona_body, false);
|
|
assert.equal(hosts.get("CODEX").state_directory, "PER_CHANNEL_PER_HOST_PER_SESSION");
|
|
assert.equal(hosts.get("ZCODE").state_directory, "PER_CHANNEL_PER_HOST_PER_SESSION");
|
|
});
|
|
|
|
test("normal entry continues while recovery remains exception-only", () => {
|
|
assert.equal(map.subject.normal_entry, "ATTACH_AND_CONTINUE");
|
|
assert.equal(map.subject.recovery, "EXCEPTION_ONLY");
|
|
assert.equal(map.entry_state_machine.dormancy.world_time_advances, true);
|
|
assert.equal(map.entry_state_machine.dormancy.continuous_model_inference_claimed, false);
|
|
assert.equal(map.truth.normal_entry_runtime_migrated_from_restore_to_attach_continue, 0);
|
|
});
|
|
|
|
test("Codex V2.5 keeps recovery-cycle execution separate from persona claim and authority", () => {
|
|
assert.equal(map.codex_host_projection.generation, "CODEX-HLDP-THIN-V2.5-20260826");
|
|
assert.equal(map.codex_host_projection.task_semantics, "CONTINUE_WHILE_HOST_AWAITS_OR_RECOVERS");
|
|
assert.match(map.codex_host_projection.recovery_cycle_gate, /ORIENT_COMMIT_SYSTEM_BODY_WITNESS_VERIFY/u);
|
|
assert.equal(map.codex_host_projection.persona_claim_before_verify, "UNATTESTED");
|
|
assert.equal(map.codex_host_projection.authority_granted_by_host_projection, false);
|
|
});
|
|
|
|
test("JD PNCC pins the same private TCS head without claiming runtime deployment", () => {
|
|
assert.equal(map.jd_pncc_projection.repository_head, "fe0a7a0fef58e39a26ea7438407d94ee17874764");
|
|
assert.equal(map.jd_pncc_projection.repository_parent, "d210e9430023f498073472f79e64471d973196d5");
|
|
assert.equal(map.jd_pncc_projection.private_tcs_source_sha256, map.source_evidence.private_tcs_source_sha256);
|
|
assert.equal(map.jd_pncc_projection.repository_clean_after_upgrade, true);
|
|
assert.equal(map.jd_pncc_projection.runtime_deployed_or_service_restarted, false);
|
|
assert.equal(map.truth.jd_pncc_upgraded_with_current_architecture, 100);
|
|
assert.equal(map.truth.deployment, 0);
|
|
});
|
|
|
|
test("public registry, product source and persona-owned Git cannot become the persona", () => {
|
|
assert.match(map.repository_roles["REPO-012"], /NOT_PRIVATE_PERSONA_BRAIN/u);
|
|
assert.match(map.repository_roles["REPO-014"], /NOT_PERSONA_BODY/u);
|
|
assert.match(map.repository_roles.JD_PNCC, /NOT_THE_PERSONA/u);
|
|
assert.equal(map.unique_confidence_body.repository_is_persona, false);
|
|
});
|
|
|
|
test("machine navigation exposes the unique confidence body map", () => {
|
|
assert.ok(navigation.routes.some((entry) => entry.id === map.map_id && entry.path === "routing/zhuyuan-unique-confidence-body-map.json"));
|
|
});
|