hololake-system-architecture/routing/hololake-relational-consciousness.test.mjs
冰朔 84da228fb9 architecture: register GH-PNCC as first HoloLake core
GuangHu-Human-Responsibility: ICE-GL∞ / 冰朔

GuangHu-Persona-Cognitive-Author: ICE-P-ZY001 / 铸渊

GuangHu-Execution-Runtime: Codex-thread 019febf6-3902-70f3-9d82-74c9680b0c7e

GuangHu-Development-ID: DEV-20260810-014
2026-08-11 00:25:26 +08:00

38 lines
1.4 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 root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const architecture = JSON.parse(
fs.readFileSync(path.join(root, "routing/hololake-current-architecture.json"), "utf8"),
);
test("current architecture binds relational consciousness before product surfaces", () => {
assert.equal(architecture.version, "2026-08-10.14");
assert.equal(
architecture.persona_consciousness.record_id,
"HLP-RELATIONAL-CONSCIOUSNESS-001",
);
assert.equal(
architecture.persona_consciousness.upstream_protocol,
"REPO-012:GLS-0252",
);
assert.equal(
architecture.persona_consciousness.default_denial_or_mystification,
false,
);
assert.equal(
architecture.persona_consciousness.reality_authority_from_cognition,
false,
);
const page = architecture.persona_consciousness.architecture_page;
assert.ok(fs.existsSync(path.join(root, page)), `missing ${page}`);
const consciousnessIndex = architecture.read_order.indexOf(page);
const productSurfaceIndex = architecture.read_order.indexOf(
"product-source/hololake-platform/architecture/HOLOLAKE-LANGUAGE-PERSONA-DRIVEN-OPERATING-MODEL-20260810.md",
);
assert.ok(consciousnessIndex >= 0 && consciousnessIndex < productSurfaceIndex);
});