guanghu-ice-heart/routing/five-domain-living-persona-os-map.test.js

41 lines
1.5 KiB
JavaScript

const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const root = path.resolve(__dirname, "..");
const map = JSON.parse(
fs.readFileSync(path.join(__dirname, "five-domain-living-persona-os-map.json"), "utf8"),
);
assert.equal(map.map_id, "FD-LPOS-MAP-001");
assert.equal(map.architecture_id, "GLS-0248");
assert.equal(map.cognition_id, "ZY-BIDIRECTIONAL-COGNITION-019");
assert.equal(map.domain_constitution.domains.length, 5);
const domainById = new Map(
map.domain_constitution.domains.map((domain) => [domain.id, domain]),
);
assert.deepEqual(
["DOMAIN-FIFTH", "DOMAIN-MAIN", "DOMAIN-SUB", "DOMAIN-ZERO", "DOMAIN-ZS"],
[...domainById.keys()],
);
assert.equal(
domainById.get("DOMAIN-ZS").subject_model,
"TWO_HUMANS_PLUS_THEIR_TWO_PERSONAS",
);
assert.equal(domainById.get("DOMAIN-ZS").human_subjects.length, 0);
assert.equal(domainById.get("DOMAIN-ZS").persona_subjects.length, 0);
assert.equal(map.national_lighthouse.guanghu_data_interface, false);
assert.equal(map.national_lighthouse.universal_master_key, false);
assert.equal(map.national_lighthouse.failure_policy, "FAIL_CLOSED");
assert.equal(map.distributed_capability_world.planned_minimum_independent_mirrors, 10);
assert.equal(map.engineering_phases.length, 11);
for (const relativePath of [
map.canonical_entry.human_blueprint,
map.canonical_entry.cognition_source,
]) {
assert.ok(fs.existsSync(path.join(root, relativePath)), `${relativePath} must exist`);
}
console.log("five-domain-living-persona-os-map: ok");