Skip to content

Commit 5e9676f

Browse files
author
Oxy
committed
openclaw-edgemesh: replace AAHP check stub with real readiness validator
1 parent 0e79749 commit 5e9676f

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"lint:fix": "eslint . --fix",
1212
"format": "prettier . --write",
1313
"format:check": "prettier . --check",
14-
"aahp:check": "node -e \"console.log('AAHP check: PASS (stub)')\"",
14+
"aahp:check": "node scripts/aahp-check.mjs",
1515
"verify:quick": "npm test && npm run build",
1616
"release:gate": "npm run aahp:check && npm test && npm run typecheck",
1717
"dev:control": "tsx src/control-plane.ts",

scripts/aahp-check.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/usr/bin/env node
2+
import fs from "node:fs";
3+
import path from "node:path";
4+
5+
const root = process.cwd();
6+
7+
const requiredFiles = [
8+
"README.md",
9+
"docs/ARCHITECTURE.md",
10+
"docs/API.md",
11+
"docs/EXTENDING.md",
12+
"docs/TROUBLESHOOTING.md",
13+
"docs/PHASE2_ROADMAP.md",
14+
"src/control-plane.ts",
15+
"src/security.ts",
16+
"src/test.ts",
17+
"src/phase2b.test.ts",
18+
"src/phase2d.test.ts"
19+
];
20+
21+
const missing = requiredFiles.filter((rel) => !fs.existsSync(path.join(root, rel)));
22+
23+
if (missing.length > 0) {
24+
console.error("AAHP check: FAIL");
25+
for (const f of missing) console.error(`- missing: ${f}`);
26+
process.exit(1);
27+
}
28+
29+
const roadmap = fs.readFileSync(path.join(root, "docs/PHASE2_ROADMAP.md"), "utf8");
30+
const mustContain = [
31+
"mandatory security",
32+
"release gate",
33+
"observability",
34+
"failure drills"
35+
];
36+
37+
const missingPhrases = mustContain.filter((p) => !roadmap.toLowerCase().includes(p));
38+
if (missingPhrases.length > 0) {
39+
console.error("AAHP check: FAIL");
40+
for (const p of missingPhrases) console.error(`- roadmap missing phrase: ${p}`);
41+
process.exit(1);
42+
}
43+
44+
console.log("AAHP check: PASS");

0 commit comments

Comments
 (0)