diff --git a/docs/TRUST-CENTER-en.html b/docs/TRUST-CENTER-en.html index 3186c6a2..4c67452e 100644 --- a/docs/TRUST-CENTER-en.html +++ b/docs/TRUST-CENTER-en.html @@ -36,7 +36,7 @@

CoreGuard Trust Center

Every number on this page is measured from a committed artifact, and every claim is classified honestly — no slogans.

-
Measured: 2026-12-02T21:25:59Z
Commit: 83ece794
State snapshot
+
Measured: 2026-12-02T21:25:59Z
Commit: 83ece794
State snapshot
Arabic
Tests
2,489
machine-pinned pass total
Boundary audit
1,915 files
0 violations
Docs contract
140 / 91 / 34
executed / skip-listed / docs covered
diff --git a/docs/TRUST-CENTER.html b/docs/TRUST-CENTER.html index c0a322a1..1fd22a13 100644 --- a/docs/TRUST-CENTER.html +++ b/docs/TRUST-CENTER.html @@ -36,7 +36,7 @@

مركز الثقة — CoreGuard

كل رقم في هذه الصفحة مقيس من مستودع مُلتزَم، وكل ادعاء مصنّف بصدق — لا شعارات.

-
قياس: 2026-12-02T21:25:59Z
الالتزام: 83ece794
+
قياس: 2026-12-02T21:25:59Z
الالتزام: 83ece794
لقطة الحالة
English
الاختبارات
2,489
مجموع النجاح المثبّت في اللقطة
تدقيق الحدود
1,915 ملفًا
0 مخالفة
عقد الوثائق
140 / 91 / 34
مُنفّذ / مستثنى بسبب / وثائق مغطّاة
diff --git a/scripts/build-trust-center.mjs b/scripts/build-trust-center.mjs index f7215e0f..265c2e1e 100644 --- a/scripts/build-trust-center.mjs +++ b/scripts/build-trust-center.mjs @@ -173,7 +173,7 @@ footer{margin-top:44px;border-top:1px solid var(--line);padding-top:16px;color:v

${esc(T.title)}

${esc(T.sub)}

-
${esc(T.measured)}: ${esc(s.measuredAtUtc ?? "")}
${esc(T.commit)}: ${esc(shortCommit(s.gitCommit))}
+
${esc(T.measured)}: ${esc(s.measuredAtUtc ?? "")}
${esc(T.commit)}: ${esc(shortCommit(s.gitCommit))}
${kpis}

${esc(T.notTitle)}

    ${not}

${esc(T.claimsTitle)}

${T.claimHead.map((h) => ``).join("")}${claims}
${esc(h)}

${esc(T.statusNote)}

diff --git a/scripts/smoke-pages.mjs b/scripts/smoke-pages.mjs index 4245cb0c..478d07cc 100644 --- a/scripts/smoke-pages.mjs +++ b/scripts/smoke-pages.mjs @@ -18,8 +18,19 @@ const ROOT = join(dirname(fileURLToPath(import.meta.url)), ".."); export function checkPage({ url, status, body, expectedTotal }) { const errors = []; if (status !== 200) errors.push(`${url}: HTTP ${status}`); - if (!/[^<]*CoreGuard/i.test(body)) errors.push(`${url}: title does not name CoreGuard`); if (/\?\?\?/.test(body)) errors.push(`${url}: contains a ??? run (encoding damage)`); + if (url.endsWith(".json")) { + try { + const data = JSON.parse(body); + if (expectedTotal && data.testsTotal !== expectedTotal) { + errors.push(`${url}: testsTotal ${data.testsTotal} != ${expectedTotal}`); + } + } catch { + errors.push(`${url}: invalid JSON`); + } + return errors; + } + if (!/<title>[^<]*CoreGuard/i.test(body)) errors.push(`${url}: title does not name CoreGuard`); if (url.endsWith("/NUMBERS.html") && expectedTotal && !body.includes(String(expectedTotal))) { errors.push(`${url}: does not state the snapshot total ${expectedTotal}`); } diff --git a/test/ci/smoke-pages.test.js b/test/ci/smoke-pages.test.js index 03a9d858..35f8a84e 100644 --- a/test/ci/smoke-pages.test.js +++ b/test/ci/smoke-pages.test.js @@ -4,6 +4,10 @@ import { checkPage } from "../../scripts/smoke-pages.mjs"; test("Pages smoke: a good page passes", () => { assert.deepEqual(checkPage({ url: "https://x/", status: 200, body: "<title>CoreGuard", expectedTotal: 2470 }), []); + const json = JSON.stringify({ testsTotal: 2470 }); + assert.deepEqual(checkPage({ url: "https://x/state-snapshot.json", status: 200, body: json, expectedTotal: 2470 }), []); + assert.match(checkPage({ url: "https://x/state-snapshot.json", status: 200, body: "{}", expectedTotal: 2470 })[0], /testsTotal/); + assert.match(checkPage({ url: "https://x/state-snapshot.json", status: 200, body: "{", expectedTotal: 2470 })[0], /invalid JSON/); }); test("Pages smoke: negative controls — status, title, encoding, total and mirror link bite", () => {