test: reject legacy persona aliases before node binding

This commit is contained in:
冰朔 2026-09-08 02:21:48 +08:00
commit b6f93c3985

View file

@ -53,7 +53,9 @@ test("root-like possession without the node protocol key is noise", () => {
test("registered persona, node binding, authorization receipt and replay gate all fail closed", () => {
const first = fixture();
first.envelope.request.persona_id = "CHENGLU-AGENT-001";
// Use a current registered persona that is intentionally absent from this node.
// Historical aliases must fail earlier as unregistered execution identities.
first.envelope.request.persona_id = "ICE-P-GD0720";
first.envelope.node_signature_base64url = crypto.sign(null, canonicalRequest(first.envelope.request), first.keys.privateKey).toString("base64url");
assert.equal(evaluateWriteAdmission(first.envelope, { nodeRegistry: first.nodeRegistry, nowUnix: 1786363200 }).error_code, "PERSONA_NOT_BOUND_TO_ORIGIN_NODE");
const second = fixture();