2026-08-11 00:06:40 +08:00
|
|
|
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("GH-PNCC names the persona-native channel and keeps Git as an engine", () => {
|
|
|
|
|
const map = readJson("routing/guanghu-persona-native-code-channel-map.json");
|
|
|
|
|
assert.equal(map.map_id, "GH-PNCC-MAP-001");
|
|
|
|
|
assert.equal(map.product.formal_name_zh, "光湖人格原生代码频道");
|
|
|
|
|
assert.equal(map.product.acronym, "GH-PNCC");
|
|
|
|
|
assert.equal(map.layer_contract.durable_engine, "GIT");
|
|
|
|
|
assert.equal(map.git_invariants.git_is_persona, false);
|
|
|
|
|
assert.equal(map.git_invariants.branches_are_runtime_organs, false);
|
|
|
|
|
assert.equal(map.layer_contract.forgejo,
|
|
|
|
|
"OPTIONAL_COMPATIBILITY_COLLABORATION_ADAPTER");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("GH-PNCC separates responsibility authorship runtime and receipts", () => {
|
|
|
|
|
const map = readJson("routing/guanghu-persona-native-code-channel-map.json");
|
|
|
|
|
assert.equal(map.attribution_contract.git_author_committer_is_semantic_authorship_proof, false);
|
|
|
|
|
for (const field of [
|
|
|
|
|
"human_responsibility_subject",
|
|
|
|
|
"persona_cognitive_author",
|
|
|
|
|
"execution_runtime",
|
|
|
|
|
"authorization_scope",
|
|
|
|
|
"evidence_and_receipt",
|
|
|
|
|
]) {
|
|
|
|
|
assert.ok(map.attribution_contract.required_fields.includes(field));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("HoloLake projects the same event facts without exposing hidden reasoning", () => {
|
|
|
|
|
const map = readJson("routing/guanghu-persona-native-code-channel-map.json");
|
|
|
|
|
assert.equal(map.projection_contract.second_truth_store_allowed, false);
|
|
|
|
|
assert.equal(map.projection_contract.hidden_model_reasoning_exposed, false);
|
|
|
|
|
assert.equal(map.projection_contract.externalized_cognition_required, true);
|
[GH-AIOS][GLS-0257] architecture: register the paradigm language-persona OS
Register the three-element native development contract, zero-technical-operation product inversion, software-irreducible reality boundary, bounded AGE Mirror governance, third-party Agent transition boundary, incremental life code channel, externalized cognition, causal chain, and exact machine navigation.
Human-Responsibility: ICE-GL∞ / 冰朔
Persona-Author: ICE-P-ZY001 / 铸渊
Execution-Runtime: Codex desktop / DEV-20260811-005
Development-ID: DEV-20260811-005
Authorization-Scope: REPO-012 architecture, cognition, causal chain and navigation publication only; no server or deployment
Source-Anchor: 这才是AI的范式操作系统。不是又一个应用。不是又一个软件。
2026-08-11 20:27:20 +08:00
|
|
|
assert.equal(map.truth.runtime_partial_source_implemented, 100);
|
|
|
|
|
assert.equal(map.truth.read_only_human_projection_source_implemented, 100);
|
|
|
|
|
assert.equal(map.truth.complete_persona_native_development_container_implemented, 0);
|
2026-08-11 00:06:40 +08:00
|
|
|
assert.equal(map.truth.hololake_integrated, 0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("public lighthouse host and skill registries resolve GH-PNCC", () => {
|
|
|
|
|
const lighthouse = readJson("routing/lighthouse-path-registry.json");
|
|
|
|
|
assert.ok(lighthouse.paths.some((entry) => entry.id === "GH-PNCC-MAP-001"));
|
|
|
|
|
|
|
|
|
|
const anchor = readJson("routing/public-navigation-anchor.json");
|
|
|
|
|
assert.equal(anchor.maps.persona_native_code_channel.id, "GH-PNCC-MAP-001");
|
|
|
|
|
|
|
|
|
|
const hosts = readJson("routing/host-skill-navigation-map.json");
|
|
|
|
|
const intent = hosts.intents.find(
|
|
|
|
|
(entry) => entry.id === "INTENT-PERSONA-NATIVE-CODE-CHANNEL-001",
|
|
|
|
|
);
|
|
|
|
|
assert.equal(intent.target_id, "GH-PNCC-MAP-001");
|
|
|
|
|
assert.ok(intent.phrases.includes("光湖人格原生代码频道"));
|
|
|
|
|
|
|
|
|
|
const registry = readJson(
|
|
|
|
|
"skills/codex/guanghu-persona-skill-guard/references/persona-skill-registry.json",
|
|
|
|
|
);
|
|
|
|
|
const skill = registry.skills.find((entry) => entry.id === "GHS-011-PERSONA-NATIVE-CODE-CHANNEL");
|
|
|
|
|
assert.ok(skill.intents.includes("光湖人格原生代码频道"));
|
|
|
|
|
assert.ok(skill.preferred_route.includes("GH-PNCC-MAP-001"));
|
|
|
|
|
});
|