@decocms/parity 0.35.25 → 0.35.26

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
@@ -38,6 +38,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
38
38
  judged (never a pass). A request the recording never saw fails the check and is named. A corpus
39
39
  suite (`tests/corpus/corpus.test.ts`, `PARITY_CORPUS_DIR`) replays a directory of reviewed
40
40
  recordings kept in a separate private repository. See `docs/reports.md`.
41
+ * **Determinism test**: the same recording replayed twice must give identical checks, issues
42
+ (ids, severity, details, evidence), verdict and score, order included; the corpus suite repeats
43
+ that for every case.
41
44
 
42
45
  ### Fixed
43
46
 
@@ -92,7 +95,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
92
95
  a `commerce` site profile; a content site's listing or about page is `other`.
93
96
  `pages[].kindEvidence` records the decision. `category-auto` no longer hard-codes
94
97
  `plp`.
95
-
98
+ * **`checks[]`, and the `issues[]` derived from it, are in registration order** instead of
99
+ completion order, so `report.json` and the JSONL stream no longer reorder between runs of the
100
+ same input. Results still land in the crash-safety array as each check finishes.
96
101
 
97
102
  ### Changed
98
103
 
package/dist/cli.js CHANGED
@@ -90193,23 +90193,29 @@ function getCheckByName(name) {
90193
90193
  }
90194
90194
  async function runAllChecks(ctx, outResults, checkFilter) {
90195
90195
  const results = outResults ?? [];
90196
- const checksToRun = checkFilter ? Array.from(checkFilter).map((name) => getCheckByName(name)).filter((c) => c !== undefined) : ALL_CHECKS;
90197
- await Promise.all(checksToRun.map(async (check) => {
90196
+ const checksToRun = checkFilter ? Array.from(checkFilter).map((name) => getCheckByName(name)).filter((c) => c !== undefined).sort((a, b) => ALL_CHECKS.indexOf(a) - ALL_CHECKS.indexOf(b)) : ALL_CHECKS;
90197
+ const rank = new Map;
90198
+ const push = (r, i) => {
90199
+ rank.set(r, i);
90200
+ results.push(r);
90201
+ };
90202
+ await Promise.all(checksToRun.map(async (check, i) => {
90198
90203
  const start = Date.now();
90199
90204
  try {
90200
90205
  const r = await check(ctx);
90201
- results.push({ ...r, durationMs: r.durationMs || Date.now() - start });
90206
+ push({ ...r, durationMs: r.durationMs || Date.now() - start }, i);
90202
90207
  } catch (err) {
90203
- results.push({
90208
+ push({
90204
90209
  name: check.name || "anonymous-check",
90205
90210
  status: "fail",
90206
90211
  severity: "medium",
90207
90212
  durationMs: Date.now() - start,
90208
90213
  summary: `check threw: ${err.message}`,
90209
90214
  issues: []
90210
- });
90215
+ }, i);
90211
90216
  }
90212
90217
  }));
90218
+ results.sort((a, b) => (rank.get(a) ?? -1) - (rank.get(b) ?? -1));
90213
90219
  return results;
90214
90220
  }
90215
90221
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/parity",
3
- "version": "0.35.25",
3
+ "version": "0.35.26",
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",