38 lines
2.2 KiB
JavaScript
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-10.13");
|
|
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);
|
|
});
|