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:
Radosław Smoliński
2026-10-29 16:03:00 +01:00
co-authored by Claude Opus 5.5
parent 0ab133fbd7
commit a4e8cfeae8
62 changed files with 2998 additions and 70 deletions
+6
View File
@@ -253,6 +253,11 @@ export async function buildSitemapEntries({
extractSlugInLocale(settings.homepage, defaultLocale) ??
'home'
// The page assigned as the 404 in System pages renders with status 404 — never a sitemap URL,
// whatever its slug (the slug list above only catches '404', 'not-found' …).
const notFound = settings.notFound as { id?: number | string } | null | number | string | undefined
const notFoundId = notFound && typeof notFound === 'object' ? notFound.id : notFound
// Which collections to walk: pages (no prefix) + each content collection with
// its archive-page slugs as the localized prefix.
const collections: CollectionEntry[] = [{ slug: pagesSlug }]
@@ -272,6 +277,7 @@ export async function buildSitemapEntries({
// loads every block of every post into memory at once.
for await (const raw of readAll(payload, collection.slug, select)) {
if (!isIndexable(raw)) {continue}
if (collection.slug === pagesSlug && notFoundId != null && String(raw.id) === String(notFoundId)) {continue}
const images = [...new Set(imagesOf(raw).map(absolute).filter((u): u is string => Boolean(u)))]
// Emit a separate <url> for EACH locale. Google's sitemap spec for