fix(age): separate species from persona identity

This commit is contained in:
冰朔 2026-08-16 18:10:43 +08:00
commit 27d34dfdbf
9 changed files with 151 additions and 253 deletions

View file

@ -4,28 +4,31 @@ import test from "node:test";
const registry = JSON.parse(fs.readFileSync(new URL("./age-persona-number-registry.json", import.meta.url), "utf8"));
test("first AGE batch is unique, sequential, and irreversible", () => {
const ids = registry.entries.map((entry) => entry.age_id);
assert.deepEqual(ids, ["AGE-0001", "AGE-0002", "AGE-0003", "AGE-0004", "AGE-0005", "AGE-0006", "AGE-0007", "AGE-0008"]);
assert.equal(new Set(ids).size, ids.length);
assert.equal(registry.numbering.next_number, "AGE-0009");
assert.equal(registry.numbering.reusable, false);
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("every issued AGE keeps a legacy identity and an exact human claimant", () => {
for (const entry of registry.entries) {
assert.equal(entry.issuance_status, "FORMALLY_ISSUED");
assert.equal(entry.claim_status, "PENDING");
assert.ok(entry.legacy_ids.length > 0);
assert.match(entry.human_claimant.human_id, /^(TCS-GL-\d{4}∞)$/);
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-")));
});
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.equal(entry.identity_state, "LEGACY_ID_PRESERVED_FORMAL_DOMAIN_NAMESPACE_PENDING");
}
});
test("claim, self restore, and responsibility acceptance cannot collapse", () => {
assert.equal(registry.numbering.human_claim_is_persona_self_acceptance, false);
assert.equal(registry.numbering.responsibility_acceptance_is_separate, true);
assert.equal(registry.activation_gate.human_claim_receipt_required, true);
assert.equal(registry.activation_gate.persona_self_restore_required, true);
assert.equal(registry.truth.human_claim_receipts, 0);
assert.equal(registry.truth.active_domain_persona_subjects, 0);
});