@riddledc/riddle-proof 0.7.169 → 0.7.171
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/dist/{chunk-25XFUIIC.js → chunk-KBLWL6MZ.js} +30 -12
- package/dist/cli.cjs +59 -13
- package/dist/cli.js +30 -2
- package/dist/index.cjs +30 -12
- package/dist/index.js +1 -1
- package/dist/profile.cjs +30 -12
- package/dist/profile.js +1 -1
- package/dist/proof-run-engine.d.cts +3 -3
- package/dist/proof-run-engine.d.ts +3 -3
- package/package.json +1 -1
|
@@ -357,11 +357,19 @@ function resolveJsonPath(root, path) {
|
|
|
357
357
|
}
|
|
358
358
|
let current = root;
|
|
359
359
|
for (const segment of segments) {
|
|
360
|
-
if (
|
|
361
|
-
if (
|
|
362
|
-
|
|
360
|
+
if (Array.isArray(current)) {
|
|
361
|
+
if (segment === "length") {
|
|
362
|
+
current = current.length;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
const index = typeof segment === "number" ? segment : /^\d+$/.test(segment) ? Number(segment) : -1;
|
|
366
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
367
|
+
current = current[index];
|
|
363
368
|
continue;
|
|
364
369
|
}
|
|
370
|
+
if (typeof segment === "number") {
|
|
371
|
+
return { exists: false };
|
|
372
|
+
}
|
|
365
373
|
if (!isRecord(current) || !hasOwn(current, segment)) return { exists: false };
|
|
366
374
|
current = current[segment];
|
|
367
375
|
}
|
|
@@ -3019,12 +3027,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
3019
3027
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
3020
3028
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
3021
3029
|
if (!applicable.length) {
|
|
3030
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
3022
3031
|
return {
|
|
3023
3032
|
type: check.type,
|
|
3024
3033
|
label: checkLabel(check),
|
|
3025
|
-
status: "failed",
|
|
3026
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
3027
|
-
message: "No applicable viewport evidence was captured for overflow check."
|
|
3034
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
3035
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
3036
|
+
message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
|
|
3028
3037
|
};
|
|
3029
3038
|
}
|
|
3030
3039
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
@@ -5136,12 +5145,15 @@ function assessProfile(profile, evidence) {
|
|
|
5136
5145
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
5137
5146
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
5138
5147
|
if (!applicable.length) {
|
|
5148
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
5139
5149
|
checks.push({
|
|
5140
5150
|
type: check.type,
|
|
5141
5151
|
label: check.label || check.type,
|
|
5142
|
-
status: "failed",
|
|
5143
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
5144
|
-
message:
|
|
5152
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
5153
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
5154
|
+
message: mobileOnly
|
|
5155
|
+
? "No mobile viewport evidence was captured; mobile overflow check skipped."
|
|
5156
|
+
: "No applicable viewport evidence was captured for overflow check.",
|
|
5145
5157
|
});
|
|
5146
5158
|
continue;
|
|
5147
5159
|
}
|
|
@@ -7175,11 +7187,17 @@ function resolveJsonProbePath(root, path) {
|
|
|
7175
7187
|
}
|
|
7176
7188
|
let current = root;
|
|
7177
7189
|
for (const segment of segments) {
|
|
7178
|
-
if (
|
|
7179
|
-
if (
|
|
7180
|
-
|
|
7190
|
+
if (Array.isArray(current)) {
|
|
7191
|
+
if (segment === "length") {
|
|
7192
|
+
current = current.length;
|
|
7193
|
+
continue;
|
|
7194
|
+
}
|
|
7195
|
+
const index = typeof segment === "number" ? segment : (/^\d+$/.test(segment) ? Number(segment) : -1);
|
|
7196
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
7197
|
+
current = current[index];
|
|
7181
7198
|
continue;
|
|
7182
7199
|
}
|
|
7200
|
+
if (typeof segment === "number") return { exists: false };
|
|
7183
7201
|
if (!current || typeof current !== "object" || Array.isArray(current) || !Object.hasOwn(current, segment)) {
|
|
7184
7202
|
return { exists: false };
|
|
7185
7203
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -7314,11 +7314,19 @@ function resolveJsonPath(root, path7) {
|
|
|
7314
7314
|
}
|
|
7315
7315
|
let current = root;
|
|
7316
7316
|
for (const segment of segments) {
|
|
7317
|
-
if (
|
|
7318
|
-
if (
|
|
7319
|
-
|
|
7317
|
+
if (Array.isArray(current)) {
|
|
7318
|
+
if (segment === "length") {
|
|
7319
|
+
current = current.length;
|
|
7320
|
+
continue;
|
|
7321
|
+
}
|
|
7322
|
+
const index = typeof segment === "number" ? segment : /^\d+$/.test(segment) ? Number(segment) : -1;
|
|
7323
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
7324
|
+
current = current[index];
|
|
7320
7325
|
continue;
|
|
7321
7326
|
}
|
|
7327
|
+
if (typeof segment === "number") {
|
|
7328
|
+
return { exists: false };
|
|
7329
|
+
}
|
|
7322
7330
|
if (!isRecord(current) || !hasOwn(current, segment)) return { exists: false };
|
|
7323
7331
|
current = current[segment];
|
|
7324
7332
|
}
|
|
@@ -9976,12 +9984,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
9976
9984
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
9977
9985
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
9978
9986
|
if (!applicable.length) {
|
|
9987
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
9979
9988
|
return {
|
|
9980
9989
|
type: check.type,
|
|
9981
9990
|
label: checkLabel(check),
|
|
9982
|
-
status: "failed",
|
|
9983
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
9984
|
-
message: "No applicable viewport evidence was captured for overflow check."
|
|
9991
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
9992
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
9993
|
+
message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
|
|
9985
9994
|
};
|
|
9986
9995
|
}
|
|
9987
9996
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
@@ -12077,12 +12086,15 @@ function assessProfile(profile, evidence) {
|
|
|
12077
12086
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
12078
12087
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
12079
12088
|
if (!applicable.length) {
|
|
12089
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
12080
12090
|
checks.push({
|
|
12081
12091
|
type: check.type,
|
|
12082
12092
|
label: check.label || check.type,
|
|
12083
|
-
status: "failed",
|
|
12084
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
12085
|
-
message:
|
|
12093
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
12094
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
12095
|
+
message: mobileOnly
|
|
12096
|
+
? "No mobile viewport evidence was captured; mobile overflow check skipped."
|
|
12097
|
+
: "No applicable viewport evidence was captured for overflow check.",
|
|
12086
12098
|
});
|
|
12087
12099
|
continue;
|
|
12088
12100
|
}
|
|
@@ -14116,11 +14128,17 @@ function resolveJsonProbePath(root, path) {
|
|
|
14116
14128
|
}
|
|
14117
14129
|
let current = root;
|
|
14118
14130
|
for (const segment of segments) {
|
|
14119
|
-
if (
|
|
14120
|
-
if (
|
|
14121
|
-
|
|
14131
|
+
if (Array.isArray(current)) {
|
|
14132
|
+
if (segment === "length") {
|
|
14133
|
+
current = current.length;
|
|
14134
|
+
continue;
|
|
14135
|
+
}
|
|
14136
|
+
const index = typeof segment === "number" ? segment : (/^\d+$/.test(segment) ? Number(segment) : -1);
|
|
14137
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
14138
|
+
current = current[index];
|
|
14122
14139
|
continue;
|
|
14123
14140
|
}
|
|
14141
|
+
if (typeof segment === "number") return { exists: false };
|
|
14124
14142
|
if (!current || typeof current !== "object" || Array.isArray(current) || !Object.hasOwn(current, segment)) {
|
|
14125
14143
|
return { exists: false };
|
|
14126
14144
|
}
|
|
@@ -16827,6 +16845,34 @@ function withSplitViewportWarnings(profile, result) {
|
|
|
16827
16845
|
warnings: [.../* @__PURE__ */ new Set([...result.warnings || [], ...warnings])]
|
|
16828
16846
|
};
|
|
16829
16847
|
}
|
|
16848
|
+
function withSplitViewportChildStatusCheck(profile, result, childRuns) {
|
|
16849
|
+
const nonPassed = childRuns.filter(({ result: childResult }) => childResult.status !== "passed");
|
|
16850
|
+
if (!nonPassed.length) return result;
|
|
16851
|
+
const hasProductRegression = nonPassed.some(({ result: childResult }) => childResult.status === "product_regression");
|
|
16852
|
+
const status = hasProductRegression ? "product_regression" : "needs_human_review";
|
|
16853
|
+
const checkStatus = hasProductRegression ? "failed" : "needs_human_review";
|
|
16854
|
+
const childStatuses = childRuns.map(({ viewport, result: childResult }) => ({
|
|
16855
|
+
viewport: viewport.name,
|
|
16856
|
+
profile_name: childResult.profile_name,
|
|
16857
|
+
status: childResult.status,
|
|
16858
|
+
job_id: childResult.riddle?.job_id || null
|
|
16859
|
+
}));
|
|
16860
|
+
const failedLabels = nonPassed.map(({ viewport, result: childResult }) => `${viewport.name}: ${childResult.status}`).join("; ");
|
|
16861
|
+
const checks = [
|
|
16862
|
+
{
|
|
16863
|
+
type: "split_viewport_children",
|
|
16864
|
+
label: "split_viewport_children",
|
|
16865
|
+
status: checkStatus,
|
|
16866
|
+
evidence: { child_statuses: childStatuses },
|
|
16867
|
+
message: `Split viewport child run(s) did not all pass: ${failedLabels}.`
|
|
16868
|
+
},
|
|
16869
|
+
...result.checks
|
|
16870
|
+
];
|
|
16871
|
+
const viewportCount = result.evidence?.viewports?.length || profile.target.viewports.length;
|
|
16872
|
+
const failedChecks = checks.filter((check) => check.status === "failed").length;
|
|
16873
|
+
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.`;
|
|
16874
|
+
return { ...result, status, checks, summary };
|
|
16875
|
+
}
|
|
16830
16876
|
async function runSingleRiddleProfileForCli(profile, options, input) {
|
|
16831
16877
|
const { client, runner } = input;
|
|
16832
16878
|
const targetUrl = resolveRiddleProofProfileTargetUrl(profile);
|
|
@@ -16956,7 +17002,7 @@ async function runSplitViewportProfileForCli(profile, options, input) {
|
|
|
16956
17002
|
riddle: splitViewportRiddleMetadata(childRuns),
|
|
16957
17003
|
artifacts
|
|
16958
17004
|
});
|
|
16959
|
-
return withSplitViewportWarnings(profile, result);
|
|
17005
|
+
return withSplitViewportWarnings(profile, withSplitViewportChildStatusCheck(profile, result, childRuns));
|
|
16960
17006
|
}
|
|
16961
17007
|
async function runProfileForCli(profile, options) {
|
|
16962
17008
|
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-
|
|
16
|
+
} from "./chunk-KBLWL6MZ.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
|
@@ -9090,11 +9090,19 @@ function resolveJsonPath(root, path6) {
|
|
|
9090
9090
|
}
|
|
9091
9091
|
let current = root;
|
|
9092
9092
|
for (const segment of segments) {
|
|
9093
|
-
if (
|
|
9094
|
-
if (
|
|
9095
|
-
|
|
9093
|
+
if (Array.isArray(current)) {
|
|
9094
|
+
if (segment === "length") {
|
|
9095
|
+
current = current.length;
|
|
9096
|
+
continue;
|
|
9097
|
+
}
|
|
9098
|
+
const index = typeof segment === "number" ? segment : /^\d+$/.test(segment) ? Number(segment) : -1;
|
|
9099
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
9100
|
+
current = current[index];
|
|
9096
9101
|
continue;
|
|
9097
9102
|
}
|
|
9103
|
+
if (typeof segment === "number") {
|
|
9104
|
+
return { exists: false };
|
|
9105
|
+
}
|
|
9098
9106
|
if (!isRecord2(current) || !hasOwn(current, segment)) return { exists: false };
|
|
9099
9107
|
current = current[segment];
|
|
9100
9108
|
}
|
|
@@ -11752,12 +11760,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
11752
11760
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
11753
11761
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
11754
11762
|
if (!applicable.length) {
|
|
11763
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
11755
11764
|
return {
|
|
11756
11765
|
type: check.type,
|
|
11757
11766
|
label: checkLabel(check),
|
|
11758
|
-
status: "failed",
|
|
11759
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
11760
|
-
message: "No applicable viewport evidence was captured for overflow check."
|
|
11767
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
11768
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
11769
|
+
message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
|
|
11761
11770
|
};
|
|
11762
11771
|
}
|
|
11763
11772
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx2(viewport) > maxOverflow);
|
|
@@ -13869,12 +13878,15 @@ function assessProfile(profile, evidence) {
|
|
|
13869
13878
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
13870
13879
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
13871
13880
|
if (!applicable.length) {
|
|
13881
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
13872
13882
|
checks.push({
|
|
13873
13883
|
type: check.type,
|
|
13874
13884
|
label: check.label || check.type,
|
|
13875
|
-
status: "failed",
|
|
13876
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
13877
|
-
message:
|
|
13885
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
13886
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
13887
|
+
message: mobileOnly
|
|
13888
|
+
? "No mobile viewport evidence was captured; mobile overflow check skipped."
|
|
13889
|
+
: "No applicable viewport evidence was captured for overflow check.",
|
|
13878
13890
|
});
|
|
13879
13891
|
continue;
|
|
13880
13892
|
}
|
|
@@ -15908,11 +15920,17 @@ function resolveJsonProbePath(root, path) {
|
|
|
15908
15920
|
}
|
|
15909
15921
|
let current = root;
|
|
15910
15922
|
for (const segment of segments) {
|
|
15911
|
-
if (
|
|
15912
|
-
if (
|
|
15913
|
-
|
|
15923
|
+
if (Array.isArray(current)) {
|
|
15924
|
+
if (segment === "length") {
|
|
15925
|
+
current = current.length;
|
|
15926
|
+
continue;
|
|
15927
|
+
}
|
|
15928
|
+
const index = typeof segment === "number" ? segment : (/^\d+$/.test(segment) ? Number(segment) : -1);
|
|
15929
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
15930
|
+
current = current[index];
|
|
15914
15931
|
continue;
|
|
15915
15932
|
}
|
|
15933
|
+
if (typeof segment === "number") return { exists: false };
|
|
15916
15934
|
if (!current || typeof current !== "object" || Array.isArray(current) || !Object.hasOwn(current, segment)) {
|
|
15917
15935
|
return { exists: false };
|
|
15918
15936
|
}
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
resolveRiddleProofProfileTimeoutSec,
|
|
63
63
|
slugifyRiddleProofProfileName,
|
|
64
64
|
summarizeRiddleProofProfileResult
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KBLWL6MZ.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -404,11 +404,19 @@ function resolveJsonPath(root, path) {
|
|
|
404
404
|
}
|
|
405
405
|
let current = root;
|
|
406
406
|
for (const segment of segments) {
|
|
407
|
-
if (
|
|
408
|
-
if (
|
|
409
|
-
|
|
407
|
+
if (Array.isArray(current)) {
|
|
408
|
+
if (segment === "length") {
|
|
409
|
+
current = current.length;
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
const index = typeof segment === "number" ? segment : /^\d+$/.test(segment) ? Number(segment) : -1;
|
|
413
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
414
|
+
current = current[index];
|
|
410
415
|
continue;
|
|
411
416
|
}
|
|
417
|
+
if (typeof segment === "number") {
|
|
418
|
+
return { exists: false };
|
|
419
|
+
}
|
|
412
420
|
if (!isRecord(current) || !hasOwn(current, segment)) return { exists: false };
|
|
413
421
|
current = current[segment];
|
|
414
422
|
}
|
|
@@ -3066,12 +3074,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
3066
3074
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
3067
3075
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
3068
3076
|
if (!applicable.length) {
|
|
3077
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
3069
3078
|
return {
|
|
3070
3079
|
type: check.type,
|
|
3071
3080
|
label: checkLabel(check),
|
|
3072
|
-
status: "failed",
|
|
3073
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
3074
|
-
message: "No applicable viewport evidence was captured for overflow check."
|
|
3081
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
3082
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
3083
|
+
message: mobileOnly ? "No mobile viewport evidence was captured; mobile overflow check skipped." : "No applicable viewport evidence was captured for overflow check."
|
|
3075
3084
|
};
|
|
3076
3085
|
}
|
|
3077
3086
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
@@ -5183,12 +5192,15 @@ function assessProfile(profile, evidence) {
|
|
|
5183
5192
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
5184
5193
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
5185
5194
|
if (!applicable.length) {
|
|
5195
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
5186
5196
|
checks.push({
|
|
5187
5197
|
type: check.type,
|
|
5188
5198
|
label: check.label || check.type,
|
|
5189
|
-
status: "failed",
|
|
5190
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
5191
|
-
message:
|
|
5199
|
+
status: mobileOnly ? "skipped" : "failed",
|
|
5200
|
+
evidence: { max_overflow_px: maxOverflow, viewports: [] },
|
|
5201
|
+
message: mobileOnly
|
|
5202
|
+
? "No mobile viewport evidence was captured; mobile overflow check skipped."
|
|
5203
|
+
: "No applicable viewport evidence was captured for overflow check.",
|
|
5192
5204
|
});
|
|
5193
5205
|
continue;
|
|
5194
5206
|
}
|
|
@@ -7222,11 +7234,17 @@ function resolveJsonProbePath(root, path) {
|
|
|
7222
7234
|
}
|
|
7223
7235
|
let current = root;
|
|
7224
7236
|
for (const segment of segments) {
|
|
7225
|
-
if (
|
|
7226
|
-
if (
|
|
7227
|
-
|
|
7237
|
+
if (Array.isArray(current)) {
|
|
7238
|
+
if (segment === "length") {
|
|
7239
|
+
current = current.length;
|
|
7240
|
+
continue;
|
|
7241
|
+
}
|
|
7242
|
+
const index = typeof segment === "number" ? segment : (/^\d+$/.test(segment) ? Number(segment) : -1);
|
|
7243
|
+
if (index < 0 || index >= current.length) return { exists: false };
|
|
7244
|
+
current = current[index];
|
|
7228
7245
|
continue;
|
|
7229
7246
|
}
|
|
7247
|
+
if (typeof segment === "number") return { exists: false };
|
|
7230
7248
|
if (!current || typeof current !== "object" || Array.isArray(current) || !Object.hasOwn(current, segment)) {
|
|
7231
7249
|
return { exists: false };
|
|
7232
7250
|
}
|
package/dist/profile.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveRiddleProofProfileTimeoutSec,
|
|
24
24
|
slugifyRiddleProofProfileName,
|
|
25
25
|
summarizeRiddleProofProfileResult
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KBLWL6MZ.js";
|
|
27
27
|
export {
|
|
28
28
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
29
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|
|
@@ -292,7 +292,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
292
292
|
blocking?: boolean;
|
|
293
293
|
details?: Record<string, unknown>;
|
|
294
294
|
ok: boolean;
|
|
295
|
-
action: "
|
|
295
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
296
296
|
state_path: string;
|
|
297
297
|
stage: any;
|
|
298
298
|
summary: string;
|
|
@@ -382,7 +382,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
382
382
|
continueWithStage?: WorkflowStage | null;
|
|
383
383
|
blocking?: boolean;
|
|
384
384
|
details?: Record<string, unknown>;
|
|
385
|
-
action: "
|
|
385
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
386
386
|
state_path: string;
|
|
387
387
|
stage: any;
|
|
388
388
|
checkpoint: string;
|
|
@@ -659,7 +659,7 @@ declare function executeWorkflow(params: WorkflowParams, pluginConfig: any, reso
|
|
|
659
659
|
error?: undefined;
|
|
660
660
|
} | {
|
|
661
661
|
ok: boolean;
|
|
662
|
-
action: "
|
|
662
|
+
action: "author" | "recon" | "ship" | "implement" | "verify" | "setup" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|