@decocms/parity 0.35.23 → 0.35.24

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/AGENTS.md CHANGED
@@ -159,7 +159,10 @@ Hard caps already in place:
159
159
  - **Live prod × cand side by side lives in `parity cockpit --prod <url> --cand <url>`**, not the HTML report; its proxy strips X-Frame-Options so any site renders.
160
160
  - **Cookies are isolated per run** — no shared session between prod and cand. If a flow needs auth, you'll need to handle that in `.parityrc.json` or extend the flow.
161
161
  - **Visual diff catches missing sections** via DOM (`data-section`); if the migrated site doesn't emit that attribute, the heatmap still shows the region but the section name is lost.
162
- - **A page whose height differs between prod and cand is `failed` (not compared)** — the pixel diff would only cover the intersection. Fix the height first (the first box-tree delta usually names why), or compare the section with `parity heatmap --selector`.
162
+ - **A page whose height differs between prod and cand is `failed` (not compared) *and* a real `visual:height:<page>` finding** — the pixel diff would only cover the intersection, but the height difference itself is measured and scored (low under 50 px and 2%, high from 10% of prod's height). Fix the height first (the finding names the first sections whose height differs; `parity section --box-tree` finds why), or compare the section with `parity heatmap --selector`. Different widths or a side that was never captured stay inconclusive; `visualDiff.results[].notComparedKind` and the summary line (`6 not compared (height differs: 4, not captured: 1, other: 1)`) say which.
163
+ - **A page that was never captured (status 0) is not a status divergence.** `http-status-parity` files one inconclusive `http-status:not-captured:<page>` finding, the run gets a `cand-pages-not-captured` (or `prod-…`) caveat listing the paths, and the check is `warn`. A real 404/500 stays critical. Re-run against a warm server before reading the score.
164
+ - **`[hydration]` console errors are React's own hydration messages only.** A section that threw and was caught by an error boundary is `[section-crash]` (same severity); its `file:line` positions come from the candidate's build at capture time and may be stale against the working tree.
165
+ - **`Issue.page` is the `path::viewport` key**, never a URL; the URL is in `details`.
163
166
  - **`parity run` doesn't apply schema changes from old runs** — if you change `src/types/schema.ts`, old `report.json` files won't parse. Delete `parity-output/` or re-run.
164
167
 
165
168
  ## Files agents should and should not write
package/CHANGELOG.md CHANGED
@@ -25,6 +25,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
25
25
  * **`src/checks/tolerances.ts`** — one table of the pass/fail tolerances that were file-local
26
26
  constants and inline literals across `src/checks` and `src/diff`, each with a unit, a basis
27
27
  (`measured` / `spec` / `assumed`) and a note. No value changed.
28
+ * **Route discovery without a sitemap.** With no usable `/sitemap.xml` and no
29
+ `--pages`, capture follows same-origin links (nav and footer first, then content,
30
+ two levels, `robots.txt`-respecting), groups them into templates and captures one
31
+ representative per template, capped. `migration-plan.json` gains `discovery`
32
+ (`sitemap` | `links` | `explicit`, profile + evidence, templates with example
33
+ URLs, what the cap left out). All plan additions are optional, so existing plans
34
+ still load and `parity plan merge` carries them.
35
+
36
+ ### Fixed
37
+
38
+ * **A candidate page that was never captured is no longer a status divergence.**
39
+ A capture that recorded no HTTP answer (status 0: timeout, refused connection)
40
+ made `http-status-parity` file a critical `prod=200 cand=0`. It is now one
41
+ inconclusive `http-status:not-captured:<page>` finding naming the side and the
42
+ capture's duration, the pair is not counted as compared and the check is `warn`.
43
+ Pair-diffing checks with no HTML guard (console, network summary, web vitals,
44
+ redirects, third-party scripts, analytics beacon) withhold such a pair through
45
+ `withCapturedPairs`. The run gains a `cand-pages-not-captured` /
46
+ `prod-pages-not-captured` caveat listing the paths. A real 404/500 is unchanged.
47
+ * **A section crash is no longer labelled `[hydration]`.** The console classifier
48
+ matched `/hydrat/` and the `useDevice`/`usePlatform` hook names anywhere in the
49
+ message. Hydration now means React's own messages (and minified #418/#423/#425);
50
+ an error-boundary crash is `[section-crash]`, same severity, with the section
51
+ and thrown error in the summary and a note that stack line numbers come from the
52
+ capture-time build. Issue ids are unchanged.
53
+ * **A page-height difference is a finding.** Same width, different height was an
54
+ inconclusive low issue that cost nothing, so a candidate missing half a page
55
+ could out-score one that matched. It is now `visual:height:<page>` (low under
56
+ 50 px and 2%, high from 10% of prod's height), still without a pixel diff, and
57
+ `visual:inconclusive:<page>` is no longer emitted for those pages. The run
58
+ summary splits not-compared pages (`height differs` / `not captured` / `other`).
59
+ Scores of runs with such pages go down; that is intended.
60
+ * **`Issue.page` is the `path::viewport` key everywhere.** plp-pagination,
61
+ plp-sorting, not-found-parity, pdp-breadcrumbs, pdp-gallery-related,
62
+ cookie-cep-modal-cls, footer-links-health and http-status orphans filed a full
63
+ URL; it moved to `details`.
64
+ * **`parity capture` no longer inventories placeholders as if they were the page.**
65
+ On a deco (Fresh + htmx) content site the plan listed 4 of the home page's 10
66
+ sections, 2 pages of a 13-route site, one section twice, and names that
67
+ contradicted the markup (an about-us block named `cta-banner`, video embeds
68
+ `testimonials-carousel`, a blog listing typed `plp`). Four causes, each fixed:
69
+ - Sections are found by what the page declares: `data-manifest-key` /
70
+ `data-section` give the component its name and a `liveType`, with
71
+ `nameFrom: "manifest"`; guessed names are `nameFrom: "heuristic"` and the LLM
72
+ relabel pass never touches a declared one.
73
+ - One component per live section: a lazy wrapper holding only the section is
74
+ recorded as `wrapperSelector`, and the list/slides inside a section become its
75
+ `children` rather than sibling rows.
76
+ - Deferred sections are resolved before inventory (scroll, then a direct request
77
+ of the `hx-get` URL, nested, depth-capped). Each component records
78
+ `deferred: rendered | fetched`; each page records a `deferral` with counts and
79
+ the unresolved selectors, and `complete: false` marks a partial inventory.
80
+ `parity html` resolves them too (`--no-resolve-deferred` opts out).
81
+ - Per-component screenshots cropped the shared full-page capture at
82
+ viewport-relative coordinates after scrolling the component into view, so every
83
+ component below the first screen showed the wrong region (a neighbouring
84
+ section). The crop now uses page coordinates.
85
+ * **Page kind has evidence.** A storefront kind (`plp`, `pdp`) is only assigned on
86
+ a `commerce` site profile; a content site's listing or about page is `other`.
87
+ `pages[].kindEvidence` records the decision. `category-auto` no longer hard-codes
88
+ `plp`.
89
+
28
90
 
29
91
  ### Changed
30
92