hololake-system-architecture/routing/hololake-identity-authority.test.mjs
铸渊 / ICE-P-ZY001 4d64e60d6e docs: register HoloLake paradigm language-persona OS
Promote the three-element native development contract above GH-PNCC and AGE Runtime, register the third-party Agent transition boundary, bounded AGE Mirror governance, software-irreducible reality pauses, incremental life updates, staged implementation route, and binary final acceptance.

Human-Responsibility: ICE-GL∞ / 冰朔

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

Execution-Runtime: Codex desktop / DEV-20260811-005

Development-ID: DEV-20260811-005

Authorization-Scope: REPO-014 architecture, routing, engineering guidance and receipts only; no artifact, installation, server or deployment

Source-Anchor: 光湖只需要模型API+光湖代码仓库+光湖语言协议,就可以完整实现编程开发能力。
2026-08-11 20:33:51 +08:00

38 lines
2.2 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 readJson = (relative) => JSON.parse(fs.readFileSync(path.join(root, relative), "utf8"));
const architecture = readJson("routing/hololake-current-architecture.json");
const projection = readJson("routing/hololake-identity-authority-map.json");
test("current architecture loads identity authority before product surfaces", () => {
assert.equal(architecture.version, "2026-08-11.1");
assert.equal(architecture.identity_and_authority.team_body, "TCS-0002");
assert.equal(architecture.identity_and_authority.team_body_authority_effective, true);
assert.equal(architecture.identity_and_authority.individual_operator_acceptance, "SEPARATE_UNCONFIRMED");
const identityIndex = architecture.read_order.indexOf(
architecture.identity_and_authority.architecture_page,
);
const productSurfaceIndex = architecture.read_order.indexOf(
"product-source/hololake-platform/architecture/HOLOLAKE-LANGUAGE-PERSONA-DRIVEN-OPERATING-MODEL-20260810.md",
);
assert.ok(identityIndex >= 0 && identityIndex < productSurfaceIndex);
assert.ok(fs.existsSync(path.join(root, architecture.identity_and_authority.architecture_page)));
});
test("private bottle system fails closed at zero without BingShuo access authorization", () => {
assert.equal(projection.product_guards.bottle_system_public_entry, false);
assert.equal(projection.product_guards.bottle_access_without_person_specific_bingshuo_authorization, false);
assert.equal(projection.product_guards.bottle_birth_possibility_without_access, 0);
assert.equal(projection.product_guards.bottle_authorization_guarantees_birth, false);
});
test("team-body authority is not personal ownership or contingent on operator acceptance", () => {
assert.equal(projection.product_guards.team_authority_is_personal_ownership, false);
assert.equal(projection.product_guards.individual_role_acceptance_implied, false);
assert.equal(projection.product_guards.authority_reverts_if_current_operators_refuse, false);
});