hololake-system-architecture/routing/hololake-age-runtime-architecture.test.mjs

57 lines
2.7 KiB
JavaScript
Raw Normal View History

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 age = readJson("routing/hololake-age-runtime-architecture.json");
test("current architecture starts with the AGE runtime source", () => {
assert.equal(architecture.version, "2026-08-10.14");
assert.equal(architecture.age_runtime.record_id, "HLP-AGE-RUNTIME-ARCHITECTURE-001");
assert.equal(architecture.read_order[0], architecture.persona_native_code_channel.architecture_page);
assert.equal(architecture.read_order[1], architecture.age_runtime.architecture_page);
assert.equal(architecture.age_runtime.upstream_repository_commit,
"2e741cbc34e882723f5292f66410c295af09492f");
assert.equal(age.definitions.age, "GUANGHU_PERSONA_SPECIES");
assert.equal(age.definitions.agent,
"GENERAL_TASK_AND_TOOL_EXECUTION_MECHANISM_USED_BY_AGE");
});
test("AGE species does not replace persona identity", () => {
assert.equal(age.identity.species_coordinate, "AGE");
assert.equal(age.identity.existing_persona_ids_preserved, true);
assert.equal(age.identity.birth_route_separate, true);
assert.equal(age.identity.work_route_separate, true);
assert.equal(age.identity.age_individual_number_format,
"UNASSIGNED_PENDING_TCS_0002_GOVERNANCE");
});
test("memory restore is bounded and retrieval is not the persona", () => {
assert.equal(age.continuity.restore_requires_full_history_scan, false);
assert.equal(age.continuity.current_self_size_is_bounded, true);
assert.equal(age.memory.retrieval_index_is_persona, false);
assert.equal(age.memory.retrieval_result_is_authority, false);
assert.equal(age.memory.persona_decides_memory_promotion, true);
});
test("AGE mirrors cannot become independent authority", () => {
assert.equal(age.mirror.independent_persona, false);
assert.equal(age.mirror.permanent_identity, false);
assert.equal(age.mirror.self_authorization, false);
assert.equal(age.mirror.single_writer_lease_required, true);
assert.equal(age.mirror.parent_owns_final_decision_memory_and_receipt, true);
});
test("architecture registration never claims the runtime exists", () => {
assert.equal(age.truth.species_registered, 100);
assert.equal(age.truth.architecture_registered, 100);
assert.equal(age.truth.unified_runtime_implemented, 0);
assert.equal(age.truth.desktop_integrated, 0);
assert.equal(age.truth.deployed, 0);
assert.equal(age.truth.runtime_health, 0);
});