ipal-doctor: one command that checks a site against the team rules
bin ipal-doctor + @intecion/ipal-kit/doctor: static rules (versions, Node 22, AGENT.md §3 layout and naming, database names, env rules, headers, X-Powered-By, CSP, 2FA, cookie scanner, adminMeta, AGENTS.md, skills, seeds, block library via blockLibraryManifest, ipal-audit --quick), registry rules (latest plugin, pnpm audit --prod), live rules (--url, ipal-seo-check), deep rules (--deep via payload run; GET /api/ipal/doctor, off until IPAL_DOCTOR_TOKEN). Human / JSON output, --strict, exit codes 0/1/2/3, --sites drift table, ipal-doctor.json with reasons, until, files, seen. Fixes found on the way: sitemap leaves out the System pages 404 page; ipal-audit finds array labels after fields, any form seed, runs grep in UTF-8; ipal-seo-check counts duplicate titles per language. Reference site at zero findings (static), CI steps on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ab133fbd7
commit
a4e8cfeae8
+10
-4
@@ -51,8 +51,8 @@ jobs:
|
||||
- run: pnpm --dir reference generate:importmap && git diff --exit-code reference/src/app
|
||||
- run: pnpm --dir reference generate:types && git diff --exit-code reference/src/payload-types.ts
|
||||
- run: pnpm --dir reference typecheck
|
||||
# Doctor (static) — turn on when ipal-doctor ships (docs/dev/ipal-doctor-proposal.md):
|
||||
# - run: node bin/ipal-doctor.mjs reference --strict --offline --json > doctor-static.json
|
||||
# ipal-doctor (static, docs/doctor.md): the reference site is the zero-findings example — any unsilenced finding fails
|
||||
- run: node bin/ipal-doctor.mjs reference --strict --offline
|
||||
|
||||
# Full run on main (and before a release): MongoDB, seed, production build, smoke tests.
|
||||
reference-full:
|
||||
@@ -69,6 +69,9 @@ jobs:
|
||||
PAYLOAD_SECRET: ci-reference-secret-0123456789abcdef
|
||||
NEXT_PUBLIC_SERVER_URL: http://localhost:3100
|
||||
IPAL_IP_HEADER: x-forwarded-for
|
||||
# cookieScanner.crawl → ipalEnvRules({ cookieCrawl }) requires both in production; CI never starts a crawl
|
||||
IPAL_COOKIE_SCAN_URL: http://127.0.0.1:9/crawl
|
||||
IPAL_COOKIE_SCAN_TOKEN: ci-cookie-scan-token-0123456789
|
||||
NEXT_PUBLIC_TURNSTILE_SITE_KEY: 1x00000000000000000000AA
|
||||
TURNSTILE_SECRET_KEY: 1x0000000000000000000000000000000AA
|
||||
ALLOW_LOCAL_MEDIA: '1'
|
||||
@@ -95,5 +98,8 @@ jobs:
|
||||
- run: pnpm --dir reference build
|
||||
- run: pnpm --dir reference exec playwright install --with-deps chromium
|
||||
- run: pnpm --dir reference test:e2e
|
||||
# Doctor (deep + HTTP) — turn on when ipal-doctor ships:
|
||||
# - run: node bin/ipal-doctor.mjs reference --strict --offline --deep --url http://localhost:3100
|
||||
# ipal-doctor (deep + HTTP): read-only database counts, the import map, the env rules, and the running site
|
||||
- run: |
|
||||
PORT=3100 pnpm --dir reference start &
|
||||
for i in $(seq 1 60); do curl -sf http://localhost:3100/api/health >/dev/null && break; sleep 2; done
|
||||
node bin/ipal-doctor.mjs reference --strict --offline --deep --url http://localhost:3100
|
||||
|
||||
Reference in New Issue
Block a user