feat(identity): redirect legacy Zhuyuan ids to ICE-P

This commit is contained in:
冰朔 2026-07-27 14:12:51 +08:00
commit aa6652a646
28 changed files with 491 additions and 106 deletions

View file

@ -28,6 +28,8 @@ test("code map resolves REPO-012 as current and keeps REPO-001 as domestic histo
assert.match(codeMap, /^FD-REPO-MAP-001=routing\/repository-route-map\.json$/m);
assert.match(codeMap, /^FD-WORLD-TREE-001=routing\/fifth-domain-world-tree\.json$/m);
assert.match(codeMap, /^FD-NODE-MAP-001=routing\/server-node-map\.json$/m);
assert.match(codeMap, /^FD-SUBJECT-ID-ALIAS-MAP-001=identity\/subject-id-alias-map\.json$/m);
assert.match(codeMap, /^ICE-P-ZY001=.*zhuyuan-persona-system\/INDEX\.hdlp/m);
assert.match(codeMap, /^ZY-OPS-LOOP-001=.*zhuyuan-persona-system\//m);
});
@ -46,7 +48,8 @@ test("Zhuyuan current chain resolves to the domestic node without secrets", () =
assert.equal(nodeMap.map_id, "FD-NODE-MAP-001");
const loop = nodeMap.persona_routes.find(item => item.route_id === "ZY-OPS-LOOP-001");
assert.equal(loop.primary_node, "JD-FD-PRIMARY");
assert.match(read(loop.path), /ICE-GL-ZY001/);
assert.match(read(loop.path), /ICE-GL-ZY001|ICE-P-ZY001/);
assert.equal(loop.persona_system, "ICE-P-ZY001");
const serialized = JSON.stringify(nodeMap);
assert.doesNotMatch(serialized, /ssh-(?:rsa|ed25519)\s+[A-Za-z0-9+/]/i);
assert.doesNotMatch(serialized, /"(?:password|token|private_key|ip)"\s*:/i);