[HLCC-ICE-000003] fix: recover code-channel owner login safely

This commit is contained in:
冰朔 2026-07-26 15:02:01 +08:00
commit 100848e9e4
12 changed files with 235 additions and 16 deletions

View file

@ -23,12 +23,23 @@ test("canonical AI and persona entry files route to the domestic map", () => {
test("code map resolves REPO-001 to domestic and labels the Singapore route legacy", () => {
const codeMap = read(".code-map");
assert.match(codeMap, /^REPO-001=https:\/\/guanghulab\.com\/fifth-domain\/bingshuo\/fifth-domain\.git$/m);
assert.match(codeMap, /^REPO-012=https:\/\/guanghulab\.com\/code\/bingshuo\/guanghu-ice-heart\.git$/m);
assert.match(codeMap, /^REPO-001-LEGACY-SG=/m);
assert.match(codeMap, /^FD-REPO-MAP-001=routing\/repository-route-map\.json$/m);
assert.match(codeMap, /^FD-NODE-MAP-001=routing\/server-node-map\.json$/m);
assert.match(codeMap, /^ZY-OPS-LOOP-001=.*zhuyuan-persona-system\//m);
});
test("repository map exposes the current code channel as a public domestic route", () => {
const map = JSON.parse(read("routing/repository-route-map.json"));
const channel = map.repositories.find(item => item.code === "REPO-012");
assert.equal(channel.slug, "guanghu-ice-heart");
assert.equal(channel.state, "DOMESTIC_CODE_CHANNEL_PRIMARY");
assert.equal(channel.primary.url, "https://guanghulab.com/code/bingshuo/guanghu-ice-heart");
assert.equal(channel.primary.clone_url, "https://guanghulab.com/code/bingshuo/guanghu-ice-heart.git");
assert.match(JSON.stringify(channel.keywords), /公开读取/);
});
test("Zhuyuan current chain resolves to the domestic node without secrets", () => {
const nodeMap = JSON.parse(read("routing/server-node-map.json"));
assert.equal(nodeMap.map_id, "FD-NODE-MAP-001");

View file

@ -5,10 +5,10 @@ const { createServer, loadMap, loadNodeMap, search, searchAll } = require("./ser
test("repository map has unique sequential codes and domestic primary routes", () => {
const map = loadMap();
assert.equal(map.repositories.length, 11);
assert.deepEqual(map.repositories.map(item => item.code), Array.from({ length: 11 }, (_, index) => `REPO-${String(index + 1).padStart(3, "0")}`));
assert.equal(new Set(map.repositories.map(item => item.code)).size, 11);
for (const item of map.repositories) assert.match(item.primary.url, /^https:\/\/guanghulab\.com\/fifth-domain\//);
assert.equal(map.repositories.length, 12);
assert.deepEqual(map.repositories.map(item => item.code), Array.from({ length: 12 }, (_, index) => `REPO-${String(index + 1).padStart(3, "0")}`));
assert.equal(new Set(map.repositories.map(item => item.code)).size, 12);
for (const item of map.repositories) assert.match(item.primary.url, /^https:\/\/guanghulab\.com\/(?:fifth-domain|code)\//);
});
test("Chinese language-world query resolves the Fifth Domain primary", () => {