@riddledc/riddle-proof 0.7.168 → 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.
- package/README.md +6 -3
- package/dist/{chunk-U56YGC5K.js → chunk-7ZY6ONH4.js} +37 -26
- package/dist/cli.cjs +66 -27
- package/dist/cli.js +30 -2
- package/dist/index.cjs +37 -26
- package/dist/index.js +1 -1
- package/dist/profile.cjs +37 -26
- 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
package/README.md
CHANGED
|
@@ -497,9 +497,12 @@ sequences include `clicked_total` and `clicked_truncated`; the compact `clicked`
|
|
|
497
497
|
list keeps the first and last clicked targets so later route switches and reset
|
|
498
498
|
actions stay visible. Click actions with `click_count` greater than `1` are
|
|
499
499
|
included in clicked-target evidence and rolled up as `click_count_action_total`
|
|
500
|
-
and `click_count_value_total`.
|
|
501
|
-
|
|
502
|
-
|
|
500
|
+
and `click_count_value_total`. Repeated selector runs such as long gameplay
|
|
501
|
+
button loops are also grouped as compact `same-selector` click-sequence
|
|
502
|
+
receipts with click totals and ordinals. Setup receipt sampling favors both
|
|
503
|
+
first and last per-viewport receipts before filling remaining space, so late
|
|
504
|
+
lifecycle phases such as terminal or restart remain visible in compact
|
|
505
|
+
summaries.
|
|
503
506
|
|
|
504
507
|
`target.timeout_sec` is optional. Use it for known-heavy profile targets so the
|
|
505
508
|
profile carries its own hosted Riddle worker budget; an explicit CLI `--timeout`
|
|
@@ -631,26 +631,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
631
631
|
for (const item of clickedItems) {
|
|
632
632
|
const selector = stringValue(item.selector);
|
|
633
633
|
if (!selector) continue;
|
|
634
|
-
const match = nthChildPattern.exec(selector);
|
|
635
|
-
if (!match) continue;
|
|
636
634
|
const frameSelector = stringValue(item.frame_selector);
|
|
637
|
-
const
|
|
638
|
-
const
|
|
635
|
+
const clickCountValue = numberValue(item.click_count);
|
|
636
|
+
const clickCount = clickCountValue === void 0 ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
637
|
+
const ordinal = numberValue(item.ordinal);
|
|
638
|
+
const match = nthChildPattern.exec(selector);
|
|
639
|
+
const selectorTemplate = match ? selector.replace(nthChildTemplatePattern, ":nth-child(*)") : selector;
|
|
640
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
641
|
+
const key = `${valueSource}
|
|
642
|
+
${frameSelector || ""}
|
|
639
643
|
${selectorTemplate}`;
|
|
640
644
|
const group = groups.get(key) || {
|
|
641
645
|
selector_template: selectorTemplate,
|
|
642
646
|
frame_selector: frameSelector,
|
|
643
|
-
value_source:
|
|
647
|
+
value_source: valueSource,
|
|
644
648
|
sequence: [],
|
|
645
649
|
ordinals: [],
|
|
646
650
|
result_count: 0,
|
|
647
651
|
click_total: 0
|
|
648
652
|
};
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
const ordinal = numberValue(item.ordinal);
|
|
653
|
+
if (match) {
|
|
654
|
+
const value = Number(match[1]);
|
|
655
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
656
|
+
}
|
|
654
657
|
if (ordinal !== void 0) group.ordinals.push(ordinal);
|
|
655
658
|
group.result_count += 1;
|
|
656
659
|
group.click_total += clickCount;
|
|
@@ -3016,12 +3019,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
3016
3019
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
3017
3020
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
3018
3021
|
if (!applicable.length) {
|
|
3022
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
3019
3023
|
return {
|
|
3020
3024
|
type: check.type,
|
|
3021
3025
|
label: checkLabel(check),
|
|
3022
|
-
status: "failed",
|
|
3023
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
3024
|
-
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."
|
|
3025
3029
|
};
|
|
3026
3030
|
}
|
|
3027
3031
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
@@ -4337,25 +4341,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
4337
4341
|
for (const item of clickedItems || []) {
|
|
4338
4342
|
const selector = typeof item.selector === "string" && item.selector.trim() ? item.selector.trim() : undefined;
|
|
4339
4343
|
if (!selector) continue;
|
|
4340
|
-
const match = nthChildPattern.exec(selector);
|
|
4341
|
-
if (!match) continue;
|
|
4342
4344
|
const frameSelector = typeof item.frame_selector === "string" && item.frame_selector.trim() ? item.frame_selector.trim() : undefined;
|
|
4343
|
-
const
|
|
4344
|
-
const
|
|
4345
|
+
const clickCountValue = typeof item.click_count === "number" && Number.isFinite(item.click_count) ? item.click_count : undefined;
|
|
4346
|
+
const clickCount = clickCountValue === undefined ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
4347
|
+
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
4348
|
+
const match = nthChildPattern.exec(selector);
|
|
4349
|
+
const selectorTemplate = match
|
|
4350
|
+
? selector.replace(nthChildTemplatePattern, ":nth-child(*)")
|
|
4351
|
+
: selector;
|
|
4352
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
4353
|
+
const key = valueSource + "\\n" + String(frameSelector || "") + "\\n" + selectorTemplate;
|
|
4345
4354
|
const group = groups.get(key) || {
|
|
4346
4355
|
selector_template: selectorTemplate,
|
|
4347
4356
|
frame_selector: frameSelector,
|
|
4348
|
-
value_source:
|
|
4357
|
+
value_source: valueSource,
|
|
4349
4358
|
sequence: [],
|
|
4350
4359
|
ordinals: [],
|
|
4351
4360
|
result_count: 0,
|
|
4352
4361
|
click_total: 0,
|
|
4353
4362
|
};
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
4363
|
+
if (match) {
|
|
4364
|
+
const value = Number(match[1]);
|
|
4365
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
4366
|
+
}
|
|
4359
4367
|
if (ordinal !== undefined) group.ordinals.push(ordinal);
|
|
4360
4368
|
group.result_count += 1;
|
|
4361
4369
|
group.click_total += clickCount;
|
|
@@ -5129,12 +5137,15 @@ function assessProfile(profile, evidence) {
|
|
|
5129
5137
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
5130
5138
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
5131
5139
|
if (!applicable.length) {
|
|
5140
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
5132
5141
|
checks.push({
|
|
5133
5142
|
type: check.type,
|
|
5134
5143
|
label: check.label || check.type,
|
|
5135
|
-
status: "failed",
|
|
5136
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
5137
|
-
message:
|
|
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.",
|
|
5138
5149
|
});
|
|
5139
5150
|
continue;
|
|
5140
5151
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -7588,26 +7588,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
7588
7588
|
for (const item of clickedItems) {
|
|
7589
7589
|
const selector = stringValue2(item.selector);
|
|
7590
7590
|
if (!selector) continue;
|
|
7591
|
-
const match = nthChildPattern.exec(selector);
|
|
7592
|
-
if (!match) continue;
|
|
7593
7591
|
const frameSelector = stringValue2(item.frame_selector);
|
|
7594
|
-
const
|
|
7595
|
-
const
|
|
7592
|
+
const clickCountValue = numberValue(item.click_count);
|
|
7593
|
+
const clickCount = clickCountValue === void 0 ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
7594
|
+
const ordinal = numberValue(item.ordinal);
|
|
7595
|
+
const match = nthChildPattern.exec(selector);
|
|
7596
|
+
const selectorTemplate = match ? selector.replace(nthChildTemplatePattern, ":nth-child(*)") : selector;
|
|
7597
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
7598
|
+
const key = `${valueSource}
|
|
7599
|
+
${frameSelector || ""}
|
|
7596
7600
|
${selectorTemplate}`;
|
|
7597
7601
|
const group = groups.get(key) || {
|
|
7598
7602
|
selector_template: selectorTemplate,
|
|
7599
7603
|
frame_selector: frameSelector,
|
|
7600
|
-
value_source:
|
|
7604
|
+
value_source: valueSource,
|
|
7601
7605
|
sequence: [],
|
|
7602
7606
|
ordinals: [],
|
|
7603
7607
|
result_count: 0,
|
|
7604
7608
|
click_total: 0
|
|
7605
7609
|
};
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
const ordinal = numberValue(item.ordinal);
|
|
7610
|
+
if (match) {
|
|
7611
|
+
const value = Number(match[1]);
|
|
7612
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
7613
|
+
}
|
|
7611
7614
|
if (ordinal !== void 0) group.ordinals.push(ordinal);
|
|
7612
7615
|
group.result_count += 1;
|
|
7613
7616
|
group.click_total += clickCount;
|
|
@@ -9973,12 +9976,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
9973
9976
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
9974
9977
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
9975
9978
|
if (!applicable.length) {
|
|
9979
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
9976
9980
|
return {
|
|
9977
9981
|
type: check.type,
|
|
9978
9982
|
label: checkLabel(check),
|
|
9979
|
-
status: "failed",
|
|
9980
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
9981
|
-
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."
|
|
9982
9986
|
};
|
|
9983
9987
|
}
|
|
9984
9988
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
@@ -11278,25 +11282,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
11278
11282
|
for (const item of clickedItems || []) {
|
|
11279
11283
|
const selector = typeof item.selector === "string" && item.selector.trim() ? item.selector.trim() : undefined;
|
|
11280
11284
|
if (!selector) continue;
|
|
11281
|
-
const match = nthChildPattern.exec(selector);
|
|
11282
|
-
if (!match) continue;
|
|
11283
11285
|
const frameSelector = typeof item.frame_selector === "string" && item.frame_selector.trim() ? item.frame_selector.trim() : undefined;
|
|
11284
|
-
const
|
|
11285
|
-
const
|
|
11286
|
+
const clickCountValue = typeof item.click_count === "number" && Number.isFinite(item.click_count) ? item.click_count : undefined;
|
|
11287
|
+
const clickCount = clickCountValue === undefined ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
11288
|
+
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
11289
|
+
const match = nthChildPattern.exec(selector);
|
|
11290
|
+
const selectorTemplate = match
|
|
11291
|
+
? selector.replace(nthChildTemplatePattern, ":nth-child(*)")
|
|
11292
|
+
: selector;
|
|
11293
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
11294
|
+
const key = valueSource + "\\n" + String(frameSelector || "") + "\\n" + selectorTemplate;
|
|
11286
11295
|
const group = groups.get(key) || {
|
|
11287
11296
|
selector_template: selectorTemplate,
|
|
11288
11297
|
frame_selector: frameSelector,
|
|
11289
|
-
value_source:
|
|
11298
|
+
value_source: valueSource,
|
|
11290
11299
|
sequence: [],
|
|
11291
11300
|
ordinals: [],
|
|
11292
11301
|
result_count: 0,
|
|
11293
11302
|
click_total: 0,
|
|
11294
11303
|
};
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
11304
|
+
if (match) {
|
|
11305
|
+
const value = Number(match[1]);
|
|
11306
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
11307
|
+
}
|
|
11300
11308
|
if (ordinal !== undefined) group.ordinals.push(ordinal);
|
|
11301
11309
|
group.result_count += 1;
|
|
11302
11310
|
group.click_total += clickCount;
|
|
@@ -12070,12 +12078,15 @@ function assessProfile(profile, evidence) {
|
|
|
12070
12078
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
12071
12079
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
12072
12080
|
if (!applicable.length) {
|
|
12081
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
12073
12082
|
checks.push({
|
|
12074
12083
|
type: check.type,
|
|
12075
12084
|
label: check.label || check.type,
|
|
12076
|
-
status: "failed",
|
|
12077
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
12078
|
-
message:
|
|
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.",
|
|
12079
12090
|
});
|
|
12080
12091
|
continue;
|
|
12081
12092
|
}
|
|
@@ -16820,6 +16831,34 @@ function withSplitViewportWarnings(profile, result) {
|
|
|
16820
16831
|
warnings: [.../* @__PURE__ */ new Set([...result.warnings || [], ...warnings])]
|
|
16821
16832
|
};
|
|
16822
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
|
+
}
|
|
16823
16862
|
async function runSingleRiddleProfileForCli(profile, options, input) {
|
|
16824
16863
|
const { client, runner } = input;
|
|
16825
16864
|
const targetUrl = resolveRiddleProofProfileTargetUrl(profile);
|
|
@@ -16949,7 +16988,7 @@ async function runSplitViewportProfileForCli(profile, options, input) {
|
|
|
16949
16988
|
riddle: splitViewportRiddleMetadata(childRuns),
|
|
16950
16989
|
artifacts
|
|
16951
16990
|
});
|
|
16952
|
-
return withSplitViewportWarnings(profile, result);
|
|
16991
|
+
return withSplitViewportWarnings(profile, withSplitViewportChildStatusCheck(profile, result, childRuns));
|
|
16953
16992
|
}
|
|
16954
16993
|
async function runProfileForCli(profile, options) {
|
|
16955
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-
|
|
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
|
@@ -9364,26 +9364,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
9364
9364
|
for (const item of clickedItems) {
|
|
9365
9365
|
const selector = stringValue5(item.selector);
|
|
9366
9366
|
if (!selector) continue;
|
|
9367
|
-
const match = nthChildPattern.exec(selector);
|
|
9368
|
-
if (!match) continue;
|
|
9369
9367
|
const frameSelector = stringValue5(item.frame_selector);
|
|
9370
|
-
const
|
|
9371
|
-
const
|
|
9368
|
+
const clickCountValue = numberValue3(item.click_count);
|
|
9369
|
+
const clickCount = clickCountValue === void 0 ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
9370
|
+
const ordinal = numberValue3(item.ordinal);
|
|
9371
|
+
const match = nthChildPattern.exec(selector);
|
|
9372
|
+
const selectorTemplate = match ? selector.replace(nthChildTemplatePattern, ":nth-child(*)") : selector;
|
|
9373
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
9374
|
+
const key = `${valueSource}
|
|
9375
|
+
${frameSelector || ""}
|
|
9372
9376
|
${selectorTemplate}`;
|
|
9373
9377
|
const group = groups.get(key) || {
|
|
9374
9378
|
selector_template: selectorTemplate,
|
|
9375
9379
|
frame_selector: frameSelector,
|
|
9376
|
-
value_source:
|
|
9380
|
+
value_source: valueSource,
|
|
9377
9381
|
sequence: [],
|
|
9378
9382
|
ordinals: [],
|
|
9379
9383
|
result_count: 0,
|
|
9380
9384
|
click_total: 0
|
|
9381
9385
|
};
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
const ordinal = numberValue3(item.ordinal);
|
|
9386
|
+
if (match) {
|
|
9387
|
+
const value = Number(match[1]);
|
|
9388
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
9389
|
+
}
|
|
9387
9390
|
if (ordinal !== void 0) group.ordinals.push(ordinal);
|
|
9388
9391
|
group.result_count += 1;
|
|
9389
9392
|
group.click_total += clickCount;
|
|
@@ -11749,12 +11752,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
11749
11752
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
11750
11753
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
11751
11754
|
if (!applicable.length) {
|
|
11755
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
11752
11756
|
return {
|
|
11753
11757
|
type: check.type,
|
|
11754
11758
|
label: checkLabel(check),
|
|
11755
|
-
status: "failed",
|
|
11756
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
11757
|
-
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."
|
|
11758
11762
|
};
|
|
11759
11763
|
}
|
|
11760
11764
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx2(viewport) > maxOverflow);
|
|
@@ -13070,25 +13074,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
13070
13074
|
for (const item of clickedItems || []) {
|
|
13071
13075
|
const selector = typeof item.selector === "string" && item.selector.trim() ? item.selector.trim() : undefined;
|
|
13072
13076
|
if (!selector) continue;
|
|
13073
|
-
const match = nthChildPattern.exec(selector);
|
|
13074
|
-
if (!match) continue;
|
|
13075
13077
|
const frameSelector = typeof item.frame_selector === "string" && item.frame_selector.trim() ? item.frame_selector.trim() : undefined;
|
|
13076
|
-
const
|
|
13077
|
-
const
|
|
13078
|
+
const clickCountValue = typeof item.click_count === "number" && Number.isFinite(item.click_count) ? item.click_count : undefined;
|
|
13079
|
+
const clickCount = clickCountValue === undefined ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
13080
|
+
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
13081
|
+
const match = nthChildPattern.exec(selector);
|
|
13082
|
+
const selectorTemplate = match
|
|
13083
|
+
? selector.replace(nthChildTemplatePattern, ":nth-child(*)")
|
|
13084
|
+
: selector;
|
|
13085
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
13086
|
+
const key = valueSource + "\\n" + String(frameSelector || "") + "\\n" + selectorTemplate;
|
|
13078
13087
|
const group = groups.get(key) || {
|
|
13079
13088
|
selector_template: selectorTemplate,
|
|
13080
13089
|
frame_selector: frameSelector,
|
|
13081
|
-
value_source:
|
|
13090
|
+
value_source: valueSource,
|
|
13082
13091
|
sequence: [],
|
|
13083
13092
|
ordinals: [],
|
|
13084
13093
|
result_count: 0,
|
|
13085
13094
|
click_total: 0,
|
|
13086
13095
|
};
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
13096
|
+
if (match) {
|
|
13097
|
+
const value = Number(match[1]);
|
|
13098
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
13099
|
+
}
|
|
13092
13100
|
if (ordinal !== undefined) group.ordinals.push(ordinal);
|
|
13093
13101
|
group.result_count += 1;
|
|
13094
13102
|
group.click_total += clickCount;
|
|
@@ -13862,12 +13870,15 @@ function assessProfile(profile, evidence) {
|
|
|
13862
13870
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
13863
13871
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
13864
13872
|
if (!applicable.length) {
|
|
13873
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
13865
13874
|
checks.push({
|
|
13866
13875
|
type: check.type,
|
|
13867
13876
|
label: check.label || check.type,
|
|
13868
|
-
status: "failed",
|
|
13869
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
13870
|
-
message:
|
|
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.",
|
|
13871
13882
|
});
|
|
13872
13883
|
continue;
|
|
13873
13884
|
}
|
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-7ZY6ONH4.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -678,26 +678,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
678
678
|
for (const item of clickedItems) {
|
|
679
679
|
const selector = stringValue(item.selector);
|
|
680
680
|
if (!selector) continue;
|
|
681
|
-
const match = nthChildPattern.exec(selector);
|
|
682
|
-
if (!match) continue;
|
|
683
681
|
const frameSelector = stringValue(item.frame_selector);
|
|
684
|
-
const
|
|
685
|
-
const
|
|
682
|
+
const clickCountValue = numberValue(item.click_count);
|
|
683
|
+
const clickCount = clickCountValue === void 0 ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
684
|
+
const ordinal = numberValue(item.ordinal);
|
|
685
|
+
const match = nthChildPattern.exec(selector);
|
|
686
|
+
const selectorTemplate = match ? selector.replace(nthChildTemplatePattern, ":nth-child(*)") : selector;
|
|
687
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
688
|
+
const key = `${valueSource}
|
|
689
|
+
${frameSelector || ""}
|
|
686
690
|
${selectorTemplate}`;
|
|
687
691
|
const group = groups.get(key) || {
|
|
688
692
|
selector_template: selectorTemplate,
|
|
689
693
|
frame_selector: frameSelector,
|
|
690
|
-
value_source:
|
|
694
|
+
value_source: valueSource,
|
|
691
695
|
sequence: [],
|
|
692
696
|
ordinals: [],
|
|
693
697
|
result_count: 0,
|
|
694
698
|
click_total: 0
|
|
695
699
|
};
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
const ordinal = numberValue(item.ordinal);
|
|
700
|
+
if (match) {
|
|
701
|
+
const value = Number(match[1]);
|
|
702
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
703
|
+
}
|
|
701
704
|
if (ordinal !== void 0) group.ordinals.push(ordinal);
|
|
702
705
|
group.result_count += 1;
|
|
703
706
|
group.click_total += clickCount;
|
|
@@ -3063,12 +3066,13 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
3063
3066
|
const maxOverflow = check.max_overflow_px ?? 4;
|
|
3064
3067
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? viewports.filter((viewport) => viewport.width <= 820) : viewports;
|
|
3065
3068
|
if (!applicable.length) {
|
|
3069
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
3066
3070
|
return {
|
|
3067
3071
|
type: check.type,
|
|
3068
3072
|
label: checkLabel(check),
|
|
3069
|
-
status: "failed",
|
|
3070
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
3071
|
-
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."
|
|
3072
3076
|
};
|
|
3073
3077
|
}
|
|
3074
3078
|
const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
|
|
@@ -4384,25 +4388,29 @@ function profileSetupClickSequenceReceipts(clickedItems) {
|
|
|
4384
4388
|
for (const item of clickedItems || []) {
|
|
4385
4389
|
const selector = typeof item.selector === "string" && item.selector.trim() ? item.selector.trim() : undefined;
|
|
4386
4390
|
if (!selector) continue;
|
|
4387
|
-
const match = nthChildPattern.exec(selector);
|
|
4388
|
-
if (!match) continue;
|
|
4389
4391
|
const frameSelector = typeof item.frame_selector === "string" && item.frame_selector.trim() ? item.frame_selector.trim() : undefined;
|
|
4390
|
-
const
|
|
4391
|
-
const
|
|
4392
|
+
const clickCountValue = typeof item.click_count === "number" && Number.isFinite(item.click_count) ? item.click_count : undefined;
|
|
4393
|
+
const clickCount = clickCountValue === undefined ? 1 : Math.max(1, Math.min(100, Math.floor(clickCountValue)));
|
|
4394
|
+
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
4395
|
+
const match = nthChildPattern.exec(selector);
|
|
4396
|
+
const selectorTemplate = match
|
|
4397
|
+
? selector.replace(nthChildTemplatePattern, ":nth-child(*)")
|
|
4398
|
+
: selector;
|
|
4399
|
+
const valueSource = match ? "nth-child" : "same-selector";
|
|
4400
|
+
const key = valueSource + "\\n" + String(frameSelector || "") + "\\n" + selectorTemplate;
|
|
4392
4401
|
const group = groups.get(key) || {
|
|
4393
4402
|
selector_template: selectorTemplate,
|
|
4394
4403
|
frame_selector: frameSelector,
|
|
4395
|
-
value_source:
|
|
4404
|
+
value_source: valueSource,
|
|
4396
4405
|
sequence: [],
|
|
4397
4406
|
ordinals: [],
|
|
4398
4407
|
result_count: 0,
|
|
4399
4408
|
click_total: 0,
|
|
4400
4409
|
};
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
const ordinal = typeof item.ordinal === "number" && Number.isFinite(item.ordinal) ? item.ordinal : undefined;
|
|
4410
|
+
if (match) {
|
|
4411
|
+
const value = Number(match[1]);
|
|
4412
|
+
for (let index = 0; index < clickCount; index += 1) group.sequence.push(value);
|
|
4413
|
+
}
|
|
4406
4414
|
if (ordinal !== undefined) group.ordinals.push(ordinal);
|
|
4407
4415
|
group.result_count += 1;
|
|
4408
4416
|
group.click_total += clickCount;
|
|
@@ -5176,12 +5184,15 @@ function assessProfile(profile, evidence) {
|
|
|
5176
5184
|
const maxOverflow = check.max_overflow_px == null ? 4 : check.max_overflow_px;
|
|
5177
5185
|
const applicable = check.type === "no_mobile_horizontal_overflow" ? checkViewports.filter((viewport) => viewport.width <= 820) : checkViewports;
|
|
5178
5186
|
if (!applicable.length) {
|
|
5187
|
+
const mobileOnly = check.type === "no_mobile_horizontal_overflow";
|
|
5179
5188
|
checks.push({
|
|
5180
5189
|
type: check.type,
|
|
5181
5190
|
label: check.label || check.type,
|
|
5182
|
-
status: "failed",
|
|
5183
|
-
evidence: { max_overflow_px: maxOverflow },
|
|
5184
|
-
message:
|
|
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.",
|
|
5185
5196
|
});
|
|
5186
5197
|
continue;
|
|
5187
5198
|
}
|
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-7ZY6ONH4.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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "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: "setup" | "recon" | "author" | "implement" | "verify" | "ship" | "run";
|
|
663
663
|
state_path: string;
|
|
664
664
|
stage: any;
|
|
665
665
|
summary: string;
|