[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,24 @@
"use strict";
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const test = require("node:test");
const root = path.join(__dirname, "..");
const probe = fs.readFileSync(path.join(root, "probe.sh"), "utf8");
const timer = fs.readFileSync(path.join(root, "guanghu-personal-node-probe.timer"), "utf8");
test("probe uses a private SSH alias and fixed read-only command", () => {
assert.match(probe, /NODE_ALIAS/);
assert.match(probe, /systemctl is-active nginx/);
assert.match(probe, /df --output=pcent/);
assert.doesNotMatch(probe, /(?:\d{1,3}\.){3}\d{1,3}/);
assert.doesNotMatch(probe, /token|password|private[_ -]?key/i);
});
test("probe writes a latest receipt and runs periodically", () => {
assert.match(probe, /RECEIPT_FILE/);
assert.match(timer, /OnUnitActiveSec=5min/);
assert.match(timer, /Persistent=true/);
});