[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,21 @@
#!/usr/bin/env node
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const root = path.join(__dirname, "..");
const script = fs.readFileSync(path.join(root, "activate-staged-unit.py"), "utf8");
const unit = fs.readFileSync(path.join(root, "hlcc-jd-app-hub-activator.service"), "utf8");
assert.match(script, /systemctl", "show", "--property=MainPID"/);
assert.match(script, /process_root\.stat\(\)\.st_uid != os\.getuid\(\)/);
assert.match(script, /"\/jd-app-hub\/server\.js" not in command/);
assert.match(script, /os\.kill\(pid, signal\.SIGTERM\)/);
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);
assert.match(unit, /^ReadOnlyPaths=__RELEASE_ROOT__$/m);
console.log("JD app hub staged-unit activator: PASS");