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("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("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("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); });