@decocms/parity 0.35.29 → 0.35.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -61,6 +61,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
61
61
 
62
62
  ### Fixed
63
63
 
64
+ * **The compared / passed counts agree across checks again.** Three changes that each assumed
65
+ the others were already in: a pair a not-captured guard (`withCapturedPairs`) withholds now
66
+ lands in the check's `inconclusive` count (a check that does not count stays uncounted);
67
+ `visual-regression-keyframes` counts a height-differs page as compared-and-not-passed and every
68
+ other `failed` page as inconclusive, even when a live `visual:sections` finding names it, so the
69
+ check agrees with the "N not compared" split line; and the page-height severity scale moved
70
+ into `TOLERANCES.visual` (`heightLowMaxPx`, `heightLowMaxPct`, `heightHighMinPct`). No tolerance
71
+ value changed.
72
+
64
73
  * **A candidate page that was never captured is no longer a status divergence.**
65
74
  A capture that recorded no HTTP answer (status 0: timeout, refused connection)
66
75
  made `http-status-parity` file a critical `prod=200 cand=0`. It is now one
package/dist/cli.js CHANGED
@@ -76786,6 +76786,24 @@ var TOLERANCES = {
76786
76786
  unit: "px",
76787
76787
  basis: "assumed",
76788
76788
  note: "Minimum connected-component size to count as a hotspot; drops 1-2px anti-aliasing specks. About a small icon."
76789
+ },
76790
+ heightLowMaxPx: {
76791
+ value: 50,
76792
+ unit: "px",
76793
+ basis: "assumed",
76794
+ note: "A page-height difference under this and under heightLowMaxPct is `low` (margin / rounding)."
76795
+ },
76796
+ heightLowMaxPct: {
76797
+ value: 2,
76798
+ unit: "% of prod height",
76799
+ basis: "assumed",
76800
+ note: "Paired with heightLowMaxPx so a short page is not 'low' at 49 px."
76801
+ },
76802
+ heightHighMinPct: {
76803
+ value: 10,
76804
+ unit: "% of prod height",
76805
+ basis: "assumed",
76806
+ note: "A page-height difference at or above this is `high`: a block of content is missing or extra."
76789
76807
  }
76790
76808
  },
76791
76809
  geometry: {
@@ -79374,11 +79392,11 @@ function withCapturedPairs(check) {
79374
79392
  summary: `${uncapturedSummary(pair.key, sides)} — not compared by ${result.name}`,
79375
79393
  details: "The capture recorded no HTTP answer (status 0), so this check had nothing to judge on that side. Not a finding about the page: re-run it against a warm server."
79376
79394
  }));
79377
- return {
79395
+ return addWithheld({
79378
79396
  ...result,
79379
79397
  status: result.status === "pass" ? "warn" : result.status,
79380
79398
  issues: [...result.issues, ...issues]
79381
- };
79399
+ }, missing.length);
79382
79400
  };
79383
79401
  Object.defineProperty(guarded, "name", { value: check.name });
79384
79402
  return guarded;
@@ -89738,32 +89756,12 @@ function everyRegionImperceptible(heatmapPath, prod, cand, diffDir, prefix, view
89738
89756
  });
89739
89757
  return explainHotspots(all.hotspots, prod.side, cand.side, artifactPaths(diffDir, prefix, viewport), prod.boxTree, cand.boxTree).every(isImperceptible);
89740
89758
  }
89741
- var HEIGHT_DIFF_TOLERANCE = {
89742
- lowMaxPx: {
89743
- value: 50,
89744
- unit: "px",
89745
- basis: "assumed",
89746
- note: "under this and under lowMaxPct: margin / rounding"
89747
- },
89748
- lowMaxPct: {
89749
- value: 2,
89750
- unit: "% of prod height",
89751
- basis: "assumed",
89752
- note: "paired with lowMaxPx so a short page is not 'low' at 49 px"
89753
- },
89754
- highMinPct: {
89755
- value: 10,
89756
- unit: "% of prod height",
89757
- basis: "assumed",
89758
- note: "at or above: a block of content is missing or extra"
89759
- }
89760
- };
89761
89759
  function heightDiffSeverity(prodH, candH) {
89762
89760
  const delta = Math.abs(candH - prodH);
89763
89761
  const pct = prodH > 0 ? delta / prodH * 100 : 100;
89764
- if (pct >= HEIGHT_DIFF_TOLERANCE.highMinPct.value)
89762
+ if (pct >= TOLERANCES.visual.heightHighMinPct.value)
89765
89763
  return "high";
89766
- if (delta < HEIGHT_DIFF_TOLERANCE.lowMaxPx.value && pct < HEIGHT_DIFF_TOLERANCE.lowMaxPct.value) {
89764
+ if (delta < TOLERANCES.visual.heightLowMaxPx.value && pct < TOLERANCES.visual.heightLowMaxPct.value) {
89767
89765
  return "low";
89768
89766
  }
89769
89767
  return "medium";
@@ -90056,6 +90054,9 @@ Usually missing from registerSections() in src/setup.ts, or the CMS is not resol
90056
90054
  summary: "Visual pass ran but no page pair was captured on both sides — nothing was compared"
90057
90055
  });
90058
90056
  }
90057
+ const measured = (r) => r.verdict !== "failed" || r.notComparedKind === "height-differs";
90058
+ const notMeasured = results.filter((r) => !measured(r)).map((r) => r.pageKey);
90059
+ const notMeasuredSet = new Set(notMeasured);
90059
90060
  const summary = {
90060
90061
  results,
90061
90062
  pagesChecked: results.length,
@@ -90076,9 +90077,9 @@ Usually missing from registerSections() in src/setup.ts, or the CMS is not resol
90076
90077
  issues,
90077
90078
  ...unitCounts({
90078
90079
  unit: "page-pair",
90079
- judged: results.filter((r) => r.verdict !== "failed").map((r) => r.pageKey),
90080
- unjudged: results.filter((r) => r.verdict === "failed").map((r) => r.pageKey),
90081
- issues,
90080
+ judged: results.filter(measured).map((r) => r.pageKey),
90081
+ unjudged: notMeasured,
90082
+ issues: issues.filter((i) => i.inconclusive || i.accepted || !i.page || !notMeasuredSet.has(i.page)),
90082
90083
  informational: (i) => i.id.startsWith("visual:heatmap:") || i.id.startsWith("visual:sections-expected:")
90083
90084
  }),
90084
90085
  data: { visualDiff: summary }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/parity",
3
- "version": "0.35.29",
3
+ "version": "0.35.30",
4
4
  "description": "E2E parity validator for site migrations. Compares prod vs cand and reports UI, functional, SEO, visual, and Web Vitals deltas with a ranked HTML report.",
5
5
  "type": "module",
6
6
  "license": "MIT",