[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,28 @@
#!/usr/bin/env node
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const root = __dirname;
const script = fs.readFileSync(path.join(root, "activate-staged-candidate.py"), "utf8");
const unit = fs.readFileSync(path.join(root, "hlcc-jd-candidate-activator.service"), "utf8");
const bootstrap = fs.readFileSync(path.join(root, "hlcc-bootstrap.py"), "utf8");
assert.match(bootstrap, /hlcc-offline\/16\.0\.1/);
assert.match(bootstrap, /forgejo-upstream-all\.bundle/);
assert.match(bootstrap, /guanghu-code-channel\.bundle/);
assert.match(bootstrap, /full-offline-v16\.0\.1/);
assert.match(script, /systemctl", "show", "--property=MainPID"/);
assert.match(script, /process_root\.stat\(\)\.st_uid != os\.getuid\(\)/);
assert.match(script, /"\/hololake-code-channel\/jd-candidate\/hlcc-bootstrap\.py" not in command/);
assert.match(script, /os\.kill\(pid, signal\.SIGTERM\)/);
assert.match(script, /payload\.get\("mode"\) == "isolated-candidate"/);
assert.match(script, /payload\.get\("ready"\) is True/);
assert.match(script, /payload\.get\("stage"\) == "ready"/);
assert.doesNotMatch(script, /shell=True|systemctl", "(?:restart|stop|start)"/);
assert.match(unit, /^User=guanghu$/m);
assert.match(unit, /^NoNewPrivileges=true$/m);
assert.match(unit, /^ProtectSystem=strict$/m);
console.log("HLCC full-offline candidate activator: PASS");