[HLCC-ICE-000001][ZY-CONTRIB-20260723-001] feat: 以来光者贡献链启用冰朔第五域个人子频道

This commit is contained in:
光湖代码频道 · 铸渊 2026-07-24 10:39:10 +08:00
commit 5615453e4e
660 changed files with 122355 additions and 0 deletions

View file

@ -0,0 +1,26 @@
"use strict";
const test = require("node:test");
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const script = fs.readFileSync(path.join(__dirname, "..", "enroll-bs-sg-001-from-console.sh"), "utf8");
test("BS-SG-001 enrollment is fixed to one node, source and public key", () => {
assert.match(script, /NODE_ID=BS-SG-001/);
assert.match(script, /EXPECTED_HOSTNAME=guanghu-lang-sg-001/);
assert.match(script, /JD_SOURCE_CIDR=111\.228\.0\.139\/32/);
assert.match(script, /jd_ops_to_bs_sg_001/);
assert.match(script, /no-port-forwarding/);
assert.match(script, /no-agent-forwarding/);
assert.doesNotMatch(script, /eval|bash\s+-c|\$\{cmd\}/);
});
test("enrollment validates Gatekeeper identity and provides a narrow rollback", () => {
assert.match(script, /127\.0\.0\.1:3911\/status/);
assert.match(script, /Gatekeeper identity mismatch/);
assert.match(script, /--rollback/);
assert.match(script, /grep -vF/);
assert.match(script, /other authorized keys were preserved/);
});