@riddledc/riddle-proof 0.7.169 → 0.7.170

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.
@@ -3019,12 +3019,13 @@ function assessCheckFromEvidence(check, evidence) {
3019
3019
  const maxOverflow = check.max_overflow_px ?? 4;
3020
3020
  const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
3021
3021
  if (!applicable.length) {
3022
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
3022
3023
  return {
3023
3024
  type: check.type,
3024
3025
  label: checkLabel(check),
3025
- status: "failed",
3026
- evidence: { max_overflow_px: maxOverflow },
3027
- message: "No applicable viewport evidence was captured for overflow check."
3026
+ status: mobileOnly ? "skipped" : "failed",
3027
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
3028
+ message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
3028
3029
  };
3029
3030
  }
3030
3031
  const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
@@ -5136,12 +5137,15 @@ function assessProfile(profile, evidence) {
5136
5137
  const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
5137
5138
  const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
5138
5139
  if (!applicable.length) {
5140
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
5139
5141
  checks.push({
5140
5142
  type: check.type,
5141
5143
  label: check.label || check.type,
5142
- status: "failed",
5143
- evidence: { max_overflow_px: maxOverflow },
5144
- message: "No applicable viewport evidence was captured for overflow check.",
5144
+ status: mobileOnly ? "skipped" : "failed",
5145
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
5146
+ message: mobileOnly
5147
+ ? "No mobile viewport evidence was captured; mobile overflow check skipped."
5148
+ : "No applicable viewport evidence was captured for overflow check.",
5145
5149
  });
5146
5150
  continue;
5147
5151
  }
package/dist/cli.cjs CHANGED
@@ -9976,12 +9976,13 @@ function assessCheckFromEvidence(check, evidence) {
9976
9976
  const maxOverflow = check.max_overflow_px ?? 4;
9977
9977
  const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
9978
9978
  if (!applicable.length) {
9979
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
9979
9980
  return {
9980
9981
  type: check.type,
9981
9982
  label: checkLabel(check),
9982
- status: "failed",
9983
- evidence: { max_overflow_px: maxOverflow },
9984
- message: "No applicable viewport evidence was captured for overflow check."
9983
+ status: mobileOnly ? "skipped" : "failed",
9984
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
9985
+ message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
9985
9986
  };
9986
9987
  }
9987
9988
  const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
@@ -12077,12 +12078,15 @@ function assessProfile(profile, evidence) {
12077
12078
  const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
12078
12079
  const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
12079
12080
  if (!applicable.length) {
12081
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
12080
12082
  checks.push({
12081
12083
  type: check.type,
12082
12084
  label: check.label || check.type,
12083
- status: "failed",
12084
- evidence: { max_overflow_px: maxOverflow },
12085
- message: "No applicable viewport evidence was captured for overflow check.",
12085
+ status: mobileOnly ? "skipped" : "failed",
12086
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
12087
+ message: mobileOnly
12088
+ ? "No mobile viewport evidence was captured; mobile overflow check skipped."
12089
+ : "No applicable viewport evidence was captured for overflow check.",
12086
12090
  });
12087
12091
  continue;
12088
12092
  }
@@ -16827,6 +16831,34 @@ function withSplitViewportWarnings(profile, result) {
16827
16831
  warnings: [.../* @__PURE__ */ new Set([...result.warnings || [], ...warnings])]
16828
16832
  };
16829
16833
  }
16834
+ function withSplitViewportChildStatusCheck(profile, result, childRuns) {
16835
+ const nonPassed = childRuns.filter(({ result: childResult }) => childResult.status !== "passed");
16836
+ if (!nonPassed.length) return result;
16837
+ const hasProductRegression = nonPassed.some(({ result: childResult }) => childResult.status === "product_regression");
16838
+ const status = hasProductRegression ? "product_regression" : "needs_human_review";
16839
+ const checkStatus = hasProductRegression ? "failed" : "needs_human_review";
16840
+ const childStatuses = childRuns.map(({ viewport, result: childResult }) => ({
16841
+ viewport: viewport.name,
16842
+ profile_name: childResult.profile_name,
16843
+ status: childResult.status,
16844
+ job_id: childResult.riddle?.job_id || null
16845
+ }));
16846
+ const failedLabels = nonPassed.map(({ viewport, result: childResult }) => `${viewport.name}: ${childResult.status}`).join("; ");
16847
+ const checks = [
16848
+ {
16849
+ type: "split_viewport_children",
16850
+ label: "split_viewport_children",
16851
+ status: checkStatus,
16852
+ evidence: { child_statuses: childStatuses },
16853
+ message: `Split viewport child run(s) did not all pass: ${failedLabels}.`
16854
+ },
16855
+ ...result.checks
16856
+ ];
16857
+ const viewportCount = result.evidence?.viewports?.length || profile.target.viewports.length;
16858
+ const failedChecks = checks.filter((check) => check.status === "failed").length;
16859
+ const summary = status === "product_regression" ? `${profile.name} failed ${failedChecks} product invariant(s) across ${viewportCount} viewport(s).` : `${profile.name} collected split viewport artifacts but needs human review.`;
16860
+ return { ...result, status, checks, summary };
16861
+ }
16830
16862
  async function runSingleRiddleProfileForCli(profile, options, input) {
16831
16863
  const { client, runner } = input;
16832
16864
  const targetUrl = resolveRiddleProofProfileTargetUrl(profile);
@@ -16956,7 +16988,7 @@ async function runSplitViewportProfileForCli(profile, options, input) {
16956
16988
  riddle: splitViewportRiddleMetadata(childRuns),
16957
16989
  artifacts
16958
16990
  });
16959
- return withSplitViewportWarnings(profile, result);
16991
+ return withSplitViewportWarnings(profile, withSplitViewportChildStatusCheck(profile, result, childRuns));
16960
16992
  }
16961
16993
  async function runProfileForCli(profile, options) {
16962
16994
  const runner = optionString(options, "runner") || "riddle";
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  profileStatusExitCode,
14
14
  resolveRiddleProofProfileTargetUrl,
15
15
  resolveRiddleProofProfileTimeoutSec
16
- } from "./chunk-25XFUIIC.js";
16
+ } from "./chunk-7ZY6ONH4.js";
17
17
  import {
18
18
  createRiddleApiClient,
19
19
  isTerminalRiddleJobStatus,
@@ -1568,6 +1568,34 @@ function withSplitViewportWarnings(profile, result) {
1568
1568
  warnings: [.../* @__PURE__ */ new Set([...result.warnings || [], ...warnings])]
1569
1569
  };
1570
1570
  }
1571
+ function withSplitViewportChildStatusCheck(profile, result, childRuns) {
1572
+ const nonPassed = childRuns.filter(({ result: childResult }) => childResult.status !== "passed");
1573
+ if (!nonPassed.length) return result;
1574
+ const hasProductRegression = nonPassed.some(({ result: childResult }) => childResult.status === "product_regression");
1575
+ const status = hasProductRegression ? "product_regression" : "needs_human_review";
1576
+ const checkStatus = hasProductRegression ? "failed" : "needs_human_review";
1577
+ const childStatuses = childRuns.map(({ viewport, result: childResult }) => ({
1578
+ viewport: viewport.name,
1579
+ profile_name: childResult.profile_name,
1580
+ status: childResult.status,
1581
+ job_id: childResult.riddle?.job_id || null
1582
+ }));
1583
+ const failedLabels = nonPassed.map(({ viewport, result: childResult }) => `${viewport.name}: ${childResult.status}`).join("; ");
1584
+ const checks = [
1585
+ {
1586
+ type: "split_viewport_children",
1587
+ label: "split_viewport_children",
1588
+ status: checkStatus,
1589
+ evidence: { child_statuses: childStatuses },
1590
+ message: `Split viewport child run(s) did not all pass: ${failedLabels}.`
1591
+ },
1592
+ ...result.checks
1593
+ ];
1594
+ const viewportCount = result.evidence?.viewports?.length || profile.target.viewports.length;
1595
+ const failedChecks = checks.filter((check) => check.status === "failed").length;
1596
+ const summary = status === "product_regression" ? `${profile.name} failed ${failedChecks} product invariant(s) across ${viewportCount} viewport(s).` : `${profile.name} collected split viewport artifacts but needs human review.`;
1597
+ return { ...result, status, checks, summary };
1598
+ }
1571
1599
  async function runSingleRiddleProfileForCli(profile, options, input) {
1572
1600
  const { client, runner } = input;
1573
1601
  const targetUrl = resolveRiddleProofProfileTargetUrl(profile);
@@ -1697,7 +1725,7 @@ async function runSplitViewportProfileForCli(profile, options, input) {
1697
1725
  riddle: splitViewportRiddleMetadata(childRuns),
1698
1726
  artifacts
1699
1727
  });
1700
- return withSplitViewportWarnings(profile, result);
1728
+ return withSplitViewportWarnings(profile, withSplitViewportChildStatusCheck(profile, result, childRuns));
1701
1729
  }
1702
1730
  async function runProfileForCli(profile, options) {
1703
1731
  const runner = optionString(options, "runner") || "riddle";
package/dist/index.cjs CHANGED
@@ -11752,12 +11752,13 @@ function assessCheckFromEvidence(check, evidence) {
11752
11752
  const maxOverflow = check.max_overflow_px ?? 4;
11753
11753
  const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
11754
11754
  if (!applicable.length) {
11755
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
11755
11756
  return {
11756
11757
  type: check.type,
11757
11758
  label: checkLabel(check),
11758
- status: "failed",
11759
- evidence: { max_overflow_px: maxOverflow },
11760
- message: "No applicable viewport evidence was captured for overflow check."
11759
+ status: mobileOnly ? "skipped" : "failed",
11760
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
11761
+ message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
11761
11762
  };
11762
11763
  }
11763
11764
  const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx2(viewport) > maxOverflow);
@@ -13869,12 +13870,15 @@ function assessProfile(profile, evidence) {
13869
13870
  const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
13870
13871
  const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
13871
13872
  if (!applicable.length) {
13873
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
13872
13874
  checks.push({
13873
13875
  type: check.type,
13874
13876
  label: check.label || check.type,
13875
- status: "failed",
13876
- evidence: { max_overflow_px: maxOverflow },
13877
- message: "No applicable viewport evidence was captured for overflow check.",
13877
+ status: mobileOnly ? "skipped" : "failed",
13878
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
13879
+ message: mobileOnly
13880
+ ? "No mobile viewport evidence was captured; mobile overflow check skipped."
13881
+ : "No applicable viewport evidence was captured for overflow check.",
13878
13882
  });
13879
13883
  continue;
13880
13884
  }
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  resolveRiddleProofProfileTimeoutSec,
63
63
  slugifyRiddleProofProfileName,
64
64
  summarizeRiddleProofProfileResult
65
- } from "./chunk-25XFUIIC.js";
65
+ } from "./chunk-7ZY6ONH4.js";
66
66
  import {
67
67
  DEFAULT_RIDDLE_API_BASE_URL,
68
68
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -3066,12 +3066,13 @@ function assessCheckFromEvidence(check, evidence) {
3066
3066
  const maxOverflow = check.max_overflow_px ?? 4;
3067
3067
  const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
3068
3068
  if (!applicable.length) {
3069
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
3069
3070
  return {
3070
3071
  type: check.type,
3071
3072
  label: checkLabel(check),
3072
- status: "failed",
3073
- evidence: { max_overflow_px: maxOverflow },
3074
- message: "No applicable viewport evidence was captured for overflow check."
3073
+ status: mobileOnly ? "skipped" : "failed",
3074
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
3075
+ message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
3075
3076
  };
3076
3077
  }
3077
3078
  const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
@@ -5183,12 +5184,15 @@ function assessProfile(profile, evidence) {
5183
5184
  const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
5184
5185
  const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
5185
5186
  if (!applicable.length) {
5187
+ const mobileOnly = check.type === "no_mobile_horizontal_overflow";
5186
5188
  checks.push({
5187
5189
  type: check.type,
5188
5190
  label: check.label || check.type,
5189
- status: "failed",
5190
- evidence: { max_overflow_px: maxOverflow },
5191
- message: "No applicable viewport evidence was captured for overflow check.",
5191
+ status: mobileOnly ? "skipped" : "failed",
5192
+ evidence: { max_overflow_px: maxOverflow, viewports: [] },
5193
+ message: mobileOnly
5194
+ ? "No mobile viewport evidence was captured; mobile overflow check skipped."
5195
+ : "No applicable viewport evidence was captured for overflow check.",
5192
5196
  });
5193
5197
  continue;
5194
5198
  }
package/dist/profile.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  resolveRiddleProofProfileTimeoutSec,
24
24
  slugifyRiddleProofProfileName,
25
25
  summarizeRiddleProofProfileResult
26
- } from "./chunk-25XFUIIC.js";
26
+ } from "./chunk-7ZY6ONH4.js";
27
27
  export {
28
28
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
29
29
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.169",
3
+ "version": "0.7.170",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",