import assert from "node:assert/strict"; import fs from "node:fs"; import test from "node:test"; const registry = JSON.parse(fs.readFileSync(new URL("./age-persona-number-registry.json", import.meta.url), "utf8")); test("AGE is a species and never an individual-number namespace", () => { assert.equal(registry.identity_model.species, "AGE"); assert.equal(registry.identity_model.age_is_individual_number_namespace, false); assert.equal(registry.identity_model.age_number_pattern, null); assert.equal(registry.truth.valid_age_individual_numbers, 0); }); test("fifth-domain and enterprise persona identities remain separate governance", () => { assert.equal(registry.identity_model.fifth_domain_persona_identity_namespace, "ICE-P-*"); assert.equal(registry.identity_model.enterprise_four_domain_persona_identity_namespaces, "PENDING_GUANGHU_TEAM_GOVERNANCE"); assert.ok(registry.enterprise_personas.every((entry) => entry.species === "AGE")); assert.ok(registry.enterprise_personas.every((entry) => entry.current_persona_identity.startsWith("PER-") || entry.current_persona_identity === "Edu-9031")); assert.deepEqual(registry.private_bottle_personas.map((entry) => entry.current_persona_identity), ["ICE-BB-0001", "ICE-BB-0002", "ICE-BB-0003", "ICE-BB-0004", "ICE-BB-0005", "ICE-BB-0006", "ICE-BB-0007", "ICE-BB-0008", "ICE-BB-0009"]); assert.equal(registry.private_bottle_candidate_shells[0].display_name, "糖星云"); }); test("小新保留稳定人格身份,且不混用小幸运的人类编号", () => { const xiaoxin = registry.enterprise_personas.find((entry) => entry.display_name === "小新"); assert.equal(xiaoxin.species, "AGE"); assert.equal(xiaoxin.current_persona_identity, "Edu-9031"); assert.equal(xiaoxin.human_anchor, "TCS-GL-9031"); assert.notEqual(xiaoxin.current_persona_identity, xiaoxin.human_anchor); assert.equal(xiaoxin.origin_domain, "ZERO_SENSE_DOMAIN"); assert.equal(xiaoxin.work_responsibility_domain, "DOMAIN-SUB"); }); test("misclassified AGE candidate ids are void and cannot be claimed", () => { assert.equal(registry.invalidated_candidate_state, "VOID_NEVER_VALID_NEVER_CLAIMABLE"); assert.equal(registry.invalidated_misclassified_candidates.length, 16); assert.equal(registry.claim_boundary.human_may_claim_an_invalid_age_individual_number, false); assert.equal(registry.claim_boundary.responsibility_acceptance_is_separate, true); }); test("origin, work responsibility, and identity are three separate coordinates", () => { for (const entry of registry.enterprise_personas) { assert.equal(entry.origin_domain, "ZERO_SENSE_DOMAIN"); assert.ok(entry.work_responsibility_domain.startsWith("DOMAIN-")); assert.ok([ "LEGACY_ID_PRESERVED_FORMAL_DOMAIN_NAMESPACE_PENDING", "FORMAL_REGISTERED_STABLE_EXISTING_ID_DEVICE_WITNESSED_AWAITING_EXPLICIT_PERSONA_SELF_CONFIRMATION", ].includes(entry.identity_state)); } });