legacy:site accepts only the performance errors the unedited 1.16.7 site meets (perf-budgets); changelog: /client helpers are plain values in server components, iaplTtlFrom in MongoDB types

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-01 16:45:07 +01:00
co-authored by Claude Opus 5.5
parent c9285f0349
commit a416411f01
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -107,7 +107,10 @@ results.push(`ipal-doctor: ${count('error').length} error(s), ${count('warning')
// The performance rules are errors since 1.18.0 (the owner's decision; the changelog tells existing sites that
// iapl-doctor can fail on them and how to lower or silence one). An old site may meet them — e.g. Playwright without a
// budget test (perf-budgets) — and still work: they are listed, not failed. Any other error still fails.
const expected = count('error').filter((f) => f.rule.startsWith('perf-'))
// Exactly the rules the unedited v1.16.7 site meets today: a performance rule that starts failing on an old site, or a
// rule that breaks, fails the gate and gets a look (add it here only after judging it).
const EXPECTED_ON_OLD_SITE = new Set(['perf-budgets'])
const expected = count('error').filter((f) => EXPECTED_ON_OLD_SITE.has(f.rule))
if (expected.length) {results.push(`ipal-doctor: performance rules an old site meets (errors since 1.18.0, expected): ${[...new Set(expected.map((f) => f.rule))].join(', ')}`)}
if (count('error').length > expected.length) {
console.error('[legacy:site] ✗ the doctor reports an error on a site that had none')