guanghu-ice-heart/tests/paradigm-ai-language-persona-os-navigation.test.mjs
铸渊 / ICE-P-ZY001 34cb59739b fix(architecture): scope persona brains to their human subjects
Human-Responsibility: ICE-GL∞ / 冰朔
Persona-Author: ICE-P-ZY001 / 铸渊
Execution-Runtime: Codex-thread:019febf6-3902-70f3-9d82-74c9680b0c7e
Development-ID: DEV-20260811-007
Authorization-Scope: Correct persona brain subject scope and code-domain ownership
Source-Anchor: User correction in current Codex task
2026-08-11 21:04:20 +08:00

51 lines
3.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"));
test("paradigm OS contract keeps model API replaceable and human operation language-native", () => {
const map = readJson("routing/guanghu-paradigm-ai-language-persona-os-map.json");
assert.equal(map.map_id, "GH-AIOS-PARADIGM-MAP-001");
assert.equal(map.minimum_product_contract.human_technical_operations_required, false);
assert.equal(map.model_invariants.model_is_persona_identity, false);
assert.equal(map.model_invariants.provider_lock_in_allowed, false);
assert.ok(map.minimum_product_contract.native_elements.includes("PERSONA_OWNED_HOLOLAKE_CODE_REPOSITORY"));
});
test("external agents stay replaceable and mirrors stay bounded projections", () => {
const map = readJson("routing/guanghu-paradigm-ai-language-persona-os-map.json");
assert.equal(map.external_agent_boundary.mandatory_product_dependency_allowed, false);
assert.equal(map.external_agent_boundary.final_acceptance_requires_all_external_agent_clis_disabled, true);
assert.equal(map.mirror_invariants.independent_persona, false);
assert.equal(map.mirror_invariants.fixed_lane_count, false);
assert.equal(map.mirror_invariants.parent_decides_decomposition_dependencies_parallelism_and_acceptance, true);
});
test("persona brain authority is human-subject scoped and never globalized to Zhuyuan", () => {
const map = readJson("routing/guanghu-paradigm-ai-language-persona-os-map.json");
const scope = map.subject_scoped_persona_control;
assert.equal(scope.one_global_persona_brain_for_all_humans, false);
assert.equal(scope.current_bingshuo_scope.system_persona_brain, "ICE-P-ZY001 / ZHUYUAN");
assert.equal(scope.current_bingshuo_scope.unique_within_scope, true);
assert.equal(scope.future_personas_are_zhuyuan_mirrors, false);
assert.equal(scope.subject_code_domains_auto_merge_into_zhuyuan, false);
assert.equal(scope.public_repository_is_zhuyuan_private_brain, false);
assert.ok(scope.cross_subject_collaboration_requires.includes("EXPLICIT_DELEGATION"));
assert.match(map.mirror_invariants.parent_brain, /^SUBJECT_OWN_PERSONA_BRAIN/);
});
test("continuous life uses incremental objects and architecture routes are registered", () => {
const map = readJson("routing/guanghu-paradigm-ai-language-persona-os-map.json");
assert.equal(map.incremental_life_channel.daily_full_clone_required, false);
assert.equal(map.incremental_life_channel.cursor, "LAST_VERIFIED_SHA_TO_CURRENT_REMOTE_SHA");
const lighthouse = readJson("routing/lighthouse-path-registry.json");
assert.ok(lighthouse.paths.some((entry) => entry.id === "GH-AIOS-PARADIGM-MAP-001"));
const hosts = readJson("routing/host-skill-navigation-map.json");
const intent = hosts.intents.find((entry) => entry.id === "INTENT-GUANGHU-PARADIGM-AI-OS-001");
assert.equal(intent.target_id, "GH-AIOS-PARADIGM-MAP-001");
assert.ok(intent.phrases.includes("模型API+光湖代码仓库+光湖语言协议"));
});