@riddledc/riddle-proof 0.7.215 → 0.7.216
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/cli.cjs +112 -1
- package/dist/cli.js +112 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -17231,6 +17231,72 @@ function profileHasRecoveredStateReceipt(receipts) {
|
|
|
17231
17231
|
return hasRecoveredState || success || hasValid && hasInvalid === false || leftTerminalState && retrySurfaceReady;
|
|
17232
17232
|
});
|
|
17233
17233
|
}
|
|
17234
|
+
function profileHasSequenceInputReceipt(receipts) {
|
|
17235
|
+
let hasSequenceContract = false;
|
|
17236
|
+
let hasInputReadyState = false;
|
|
17237
|
+
let hasSequenceOutcome = false;
|
|
17238
|
+
for (const receipt of receipts) {
|
|
17239
|
+
const storedTo = cliString(receipt.return_stored_to) || "";
|
|
17240
|
+
const label = cliString(receipt.label) || "";
|
|
17241
|
+
const path7 = cliString(receipt.path) || cliString(receipt.function_name) || "";
|
|
17242
|
+
const slot = profileLowerSummaryValue(receipt, ["slot", "phase", "state"]);
|
|
17243
|
+
const statusText = profileLowerSummaryValue(receipt, ["statusText", "status", "message"]);
|
|
17244
|
+
const summary = cliReturnSummaryLabel(receipt.return_summary) || "";
|
|
17245
|
+
const haystack = `${storedTo} ${label} ${path7} ${slot} ${statusText} ${summary}`.toLowerCase();
|
|
17246
|
+
const sequenceText = [
|
|
17247
|
+
"expectedSequence",
|
|
17248
|
+
"expectedLevel2Sequence",
|
|
17249
|
+
"inputSequence",
|
|
17250
|
+
"targetSequence",
|
|
17251
|
+
"sequence",
|
|
17252
|
+
"pattern"
|
|
17253
|
+
].map((name) => cliString(setupReturnSummaryValue(receipt, [name]))?.toLowerCase()).find(Boolean) || "";
|
|
17254
|
+
const sequenceArray = [
|
|
17255
|
+
setupReturnSummaryValue(receipt, ["expectedSequence"]),
|
|
17256
|
+
setupReturnSummaryValue(receipt, ["expectedLevel2Sequence"]),
|
|
17257
|
+
setupReturnSummaryValue(receipt, ["inputSequence"]),
|
|
17258
|
+
setupReturnSummaryValue(receipt, ["targetSequence"]),
|
|
17259
|
+
setupReturnSummaryValue(receipt, ["sequence"])
|
|
17260
|
+
].some((value) => Array.isArray(value) && value.length > 0);
|
|
17261
|
+
const mentionsSequence = Boolean(sequenceArray || sequenceText) || haystack.includes("sequence") || haystack.includes("short-long") || haystack.includes("short,long") || haystack.includes("short long") || haystack.includes("long-short") || haystack.includes("long,short") || haystack.includes("long short");
|
|
17262
|
+
if (mentionsSequence) hasSequenceContract = true;
|
|
17263
|
+
const level = cliFiniteNumber(setupReturnSummaryValue(receipt, ["level"]));
|
|
17264
|
+
const expectedSteps = cliFiniteNumber(setupReturnSummaryValue(receipt, ["expectedSteps", "stepCount", "sequenceLength"]));
|
|
17265
|
+
const controlsEnabled = setupReturnSummaryValue(receipt, ["controlsEnabled", "inputControlsEnabled", "inputEnabled", "canInput"]) === true || setupReturnSummaryValue(receipt, ["shortDisabled"]) === false || setupReturnSummaryValue(receipt, ["longDisabled"]) === false;
|
|
17266
|
+
const inputReady = haystack.includes("input") || statusText.includes("your turn") || statusText.includes("ready");
|
|
17267
|
+
if (inputReady && (controlsEnabled || level !== void 0 || expectedSteps !== void 0)) {
|
|
17268
|
+
hasInputReadyState = true;
|
|
17269
|
+
}
|
|
17270
|
+
const success = setupReturnSummaryValue(receipt, ["success", "passed"]) === true || statusText.includes("perfect") || statusText.includes("success");
|
|
17271
|
+
const failure = statusText.includes("miss") || statusText.includes("failure") || setupReturnSummaryValue(receipt, ["failed"]) === true;
|
|
17272
|
+
const streak = cliFiniteNumber(setupReturnSummaryValue(receipt, ["streak"]));
|
|
17273
|
+
const best = cliFiniteNumber(setupReturnSummaryValue(receipt, ["best"]));
|
|
17274
|
+
if (mentionsSequence && (success || failure || streak !== void 0 || best !== void 0)) {
|
|
17275
|
+
hasSequenceOutcome = true;
|
|
17276
|
+
}
|
|
17277
|
+
}
|
|
17278
|
+
return hasSequenceContract && (hasInputReadyState || hasSequenceOutcome);
|
|
17279
|
+
}
|
|
17280
|
+
function profileHasRestartReadyReceipt(receipts) {
|
|
17281
|
+
return receipts.some((receipt) => {
|
|
17282
|
+
const storedTo = cliString(receipt.return_stored_to) || "";
|
|
17283
|
+
const label = cliString(receipt.label) || "";
|
|
17284
|
+
const path7 = cliString(receipt.path) || cliString(receipt.function_name) || "";
|
|
17285
|
+
const slot = profileLowerSummaryValue(receipt, ["slot", "phase", "state"]);
|
|
17286
|
+
const statusText = profileLowerSummaryValue(receipt, ["statusText", "status", "message"]);
|
|
17287
|
+
const summary = cliReturnSummaryLabel(receipt.return_summary) || "";
|
|
17288
|
+
const haystack = `${storedTo} ${label} ${path7} ${slot} ${statusText} ${summary}`.toLowerCase();
|
|
17289
|
+
const labelsRestart = haystack.includes("restart") || haystack.includes("play again") || haystack.includes("play-again") || haystack.includes("playagain") || haystack.includes("retry");
|
|
17290
|
+
if (!labelsRestart) return false;
|
|
17291
|
+
const ok = receipt.ok !== false && setupReturnSummaryValue(receipt, ["ok"]) !== false;
|
|
17292
|
+
const controlsEnabled = setupReturnSummaryValue(receipt, ["controlsEnabled", "inputControlsEnabled", "inputEnabled", "canInput"]) === true || setupReturnSummaryValue(receipt, ["shortDisabled"]) === false && setupReturnSummaryValue(receipt, ["longDisabled"]) === false;
|
|
17293
|
+
const level = cliFiniteNumber(setupReturnSummaryValue(receipt, ["level"]));
|
|
17294
|
+
const streak = cliFiniteNumber(setupReturnSummaryValue(receipt, ["streak"]));
|
|
17295
|
+
const best = cliFiniteNumber(setupReturnSummaryValue(receipt, ["best"]));
|
|
17296
|
+
const readyState = statusText.includes("your turn") || statusText.includes("ready") || setupReturnSummaryValue(receipt, ["ready", "restartReady", "restart_ready"]) === true;
|
|
17297
|
+
return ok && controlsEnabled && (readyState || level !== void 0 || streak !== void 0 || best !== void 0);
|
|
17298
|
+
});
|
|
17299
|
+
}
|
|
17234
17300
|
function profileMetadataHasGeneratedOutputContract(metadata) {
|
|
17235
17301
|
const contract = cliRecord(metadata.declared_state_contract);
|
|
17236
17302
|
if (!contract) return false;
|
|
@@ -17279,6 +17345,7 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
17279
17345
|
const valueReceipts = [
|
|
17280
17346
|
...setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "window_eval")),
|
|
17281
17347
|
...setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "window_call")),
|
|
17348
|
+
...setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "window_call_until")),
|
|
17282
17349
|
...setupActionValueReceipts
|
|
17283
17350
|
].filter((item) => item.ok !== false);
|
|
17284
17351
|
const clickCount = setupViewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0) + profileSetupReceiptTotal(setupViewports, "click") + profileSetupReceiptTotal(setupViewports, "click_count");
|
|
@@ -17336,6 +17403,34 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
17336
17403
|
const after = cliFiniteNumber(setupReturnSummaryValue(item, ["after", "afterCount", "itemCount", "count"]));
|
|
17337
17404
|
return before !== void 0 && after !== void 0 && after > before;
|
|
17338
17405
|
});
|
|
17406
|
+
const stateGrowthMetricNames = [
|
|
17407
|
+
"best",
|
|
17408
|
+
"streak",
|
|
17409
|
+
"score",
|
|
17410
|
+
"level",
|
|
17411
|
+
"progress",
|
|
17412
|
+
"coins",
|
|
17413
|
+
"totalCoins",
|
|
17414
|
+
"totalEarned",
|
|
17415
|
+
"saveTotalCoins",
|
|
17416
|
+
"saveTotalClicks",
|
|
17417
|
+
"perClick",
|
|
17418
|
+
"perSecond",
|
|
17419
|
+
"clickPowerLevel",
|
|
17420
|
+
"autoClickerLevel"
|
|
17421
|
+
];
|
|
17422
|
+
const hasPositiveStateGrowthMetric = valueReceipts.some((item) => stateGrowthMetricNames.some((name) => {
|
|
17423
|
+
const storedTo = cliString(item.return_stored_to) || "";
|
|
17424
|
+
const label = cliString(item.label) || "";
|
|
17425
|
+
const path7 = cliString(item.path) || cliString(item.function_name) || "";
|
|
17426
|
+
const slot = profileLowerSummaryValue(item, ["slot", "phase", "state"]);
|
|
17427
|
+
const statusText = profileLowerSummaryValue(item, ["statusText", "status", "message"]);
|
|
17428
|
+
const haystack = `${storedTo} ${label} ${path7} ${slot} ${statusText}`.toLowerCase();
|
|
17429
|
+
const stateGrowthOutcome = haystack.includes("growth") || haystack.includes("success") || haystack.includes("after") || haystack.includes("add") || haystack.includes("upgrade") || haystack.includes("bought") || haystack.includes("perfect") || setupReturnSummaryValue(item, ["success", "passed"]) === true;
|
|
17430
|
+
if (!stateGrowthOutcome) return false;
|
|
17431
|
+
const value = cliFiniteNumber(setupReturnSummaryValue(item, [name]));
|
|
17432
|
+
return value !== void 0 && value > 0;
|
|
17433
|
+
}));
|
|
17339
17434
|
const hasReachability = profileReachabilitySummaryMarkdown(result).length > 0 || result.checks.some((check) => check.type === "selector_visible" && Boolean(cliRecord(check.evidence)?.selector));
|
|
17340
17435
|
const hasOverflowEvidence = result.checks.some((check) => check.type === "no_horizontal_overflow" || check.type === "no_mobile_horizontal_overflow" || check.type === "frame_no_horizontal_overflow") || evidenceViewports.some((viewport) => (cliFiniteNumber(viewport.overflow_px) || 0) > 0 || (cliFiniteNumber(viewport.bounds_overflow_px) || 0) > 0 || Boolean(viewport.overflow_offenders?.length));
|
|
17341
17436
|
const hasConsoleAccounting = profileHasCheck(result, ["no_console_warnings", "no_fatal_console_errors"]) || Boolean(result.evidence?.console || result.evidence?.page_errors);
|
|
@@ -17422,6 +17517,8 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
17422
17517
|
const hasControlledSuccessLaunchReceipt = profileHasControlledLaunchReceipt(valueReceipts, "success");
|
|
17423
17518
|
const hasRouteContinuationReceipt = profileHasRouteContinuationReceipt(valueReceipts);
|
|
17424
17519
|
const hasRecoveredStateReceipt = profileHasRecoveredStateReceipt(valueReceipts);
|
|
17520
|
+
const hasSequenceInputReceipt = profileHasSequenceInputReceipt(valueReceipts) && (inputDispatchCount > 0 || hasNaturalInput);
|
|
17521
|
+
const hasRestartReadyReceipt = profileHasRestartReadyReceipt(valueReceipts);
|
|
17425
17522
|
const hasGeneratedOutputContract = profileMetadataHasGeneratedOutputContract(metadata);
|
|
17426
17523
|
const hasGeneratedOutputReceipt = profileHasGeneratedOutputReceipt(valueReceipts);
|
|
17427
17524
|
const failedCleanupInventoryReason = profileFailedCleanupInventoryReason(setupViewports);
|
|
@@ -17589,6 +17686,20 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
17589
17686
|
"visible cleanup affordance receipt missing"
|
|
17590
17687
|
);
|
|
17591
17688
|
}
|
|
17689
|
+
if (text.includes("input") && (text.includes("sequence") || text.includes("short-long") || text.includes("short long") || text.includes("long-short") || text.includes("long long") || text.includes("long short"))) {
|
|
17690
|
+
return profileReceiptSignalStatus(
|
|
17691
|
+
hasSequenceInputReceipt,
|
|
17692
|
+
"sequence input receipt present",
|
|
17693
|
+
"sequence input receipt missing"
|
|
17694
|
+
);
|
|
17695
|
+
}
|
|
17696
|
+
if (text.includes("restart") && (text.includes("receipt") || text.includes("ready") || text.includes("re-enabled") || text.includes("controls"))) {
|
|
17697
|
+
return profileReceiptSignalStatus(
|
|
17698
|
+
hasRestartReadyReceipt,
|
|
17699
|
+
"restart-ready receipt present",
|
|
17700
|
+
"restart-ready receipt missing"
|
|
17701
|
+
);
|
|
17702
|
+
}
|
|
17592
17703
|
if (text.includes("retry") || text.includes("repair") || text.includes("reset") || text.includes("affordance")) {
|
|
17593
17704
|
return profileReceiptSignalStatus(hasStateContract || clickCount > 0, "affordance or transition receipt present", "affordance receipt missing");
|
|
17594
17705
|
}
|
|
@@ -17599,7 +17710,7 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
17599
17710
|
return profileReceiptSignalStatus(hasTextVisibility || screenshotCount > 0, "initial visible-state evidence present", "initial state evidence missing");
|
|
17600
17711
|
}
|
|
17601
17712
|
if (text.includes("state-growth") || text.includes("state growth") || text.includes("growth receipt") || text.includes("grid grows") || text.includes("state") && text.includes("after the click")) {
|
|
17602
|
-
return profileReceiptSignalStatus(hasStateGrowthReceipt, "state-growth receipt present", "state-growth receipt missing");
|
|
17713
|
+
return profileReceiptSignalStatus(hasStateGrowthReceipt || hasPositiveStateGrowthMetric, "state-growth receipt present", "state-growth receipt missing");
|
|
17603
17714
|
}
|
|
17604
17715
|
if (text.includes("visible grid") || text.includes("control evidence") || text.includes("grid") && text.includes("control")) {
|
|
17605
17716
|
return profileReceiptSignalStatus(
|
package/dist/cli.js
CHANGED
|
@@ -991,6 +991,72 @@ function profileHasRecoveredStateReceipt(receipts) {
|
|
|
991
991
|
return hasRecoveredState || success || hasValid && hasInvalid === false || leftTerminalState && retrySurfaceReady;
|
|
992
992
|
});
|
|
993
993
|
}
|
|
994
|
+
function profileHasSequenceInputReceipt(receipts) {
|
|
995
|
+
let hasSequenceContract = false;
|
|
996
|
+
let hasInputReadyState = false;
|
|
997
|
+
let hasSequenceOutcome = false;
|
|
998
|
+
for (const receipt of receipts) {
|
|
999
|
+
const storedTo = cliString(receipt.return_stored_to) || "";
|
|
1000
|
+
const label = cliString(receipt.label) || "";
|
|
1001
|
+
const path2 = cliString(receipt.path) || cliString(receipt.function_name) || "";
|
|
1002
|
+
const slot = profileLowerSummaryValue(receipt, ["slot", "phase", "state"]);
|
|
1003
|
+
const statusText = profileLowerSummaryValue(receipt, ["statusText", "status", "message"]);
|
|
1004
|
+
const summary = cliReturnSummaryLabel(receipt.return_summary) || "";
|
|
1005
|
+
const haystack = `${storedTo} ${label} ${path2} ${slot} ${statusText} ${summary}`.toLowerCase();
|
|
1006
|
+
const sequenceText = [
|
|
1007
|
+
"expectedSequence",
|
|
1008
|
+
"expectedLevel2Sequence",
|
|
1009
|
+
"inputSequence",
|
|
1010
|
+
"targetSequence",
|
|
1011
|
+
"sequence",
|
|
1012
|
+
"pattern"
|
|
1013
|
+
].map((name) => cliString(setupReturnSummaryValue(receipt, [name]))?.toLowerCase()).find(Boolean) || "";
|
|
1014
|
+
const sequenceArray = [
|
|
1015
|
+
setupReturnSummaryValue(receipt, ["expectedSequence"]),
|
|
1016
|
+
setupReturnSummaryValue(receipt, ["expectedLevel2Sequence"]),
|
|
1017
|
+
setupReturnSummaryValue(receipt, ["inputSequence"]),
|
|
1018
|
+
setupReturnSummaryValue(receipt, ["targetSequence"]),
|
|
1019
|
+
setupReturnSummaryValue(receipt, ["sequence"])
|
|
1020
|
+
].some((value) => Array.isArray(value) && value.length > 0);
|
|
1021
|
+
const mentionsSequence = Boolean(sequenceArray || sequenceText) || haystack.includes("sequence") || haystack.includes("short-long") || haystack.includes("short,long") || haystack.includes("short long") || haystack.includes("long-short") || haystack.includes("long,short") || haystack.includes("long short");
|
|
1022
|
+
if (mentionsSequence) hasSequenceContract = true;
|
|
1023
|
+
const level = cliFiniteNumber(setupReturnSummaryValue(receipt, ["level"]));
|
|
1024
|
+
const expectedSteps = cliFiniteNumber(setupReturnSummaryValue(receipt, ["expectedSteps", "stepCount", "sequenceLength"]));
|
|
1025
|
+
const controlsEnabled = setupReturnSummaryValue(receipt, ["controlsEnabled", "inputControlsEnabled", "inputEnabled", "canInput"]) === true || setupReturnSummaryValue(receipt, ["shortDisabled"]) === false || setupReturnSummaryValue(receipt, ["longDisabled"]) === false;
|
|
1026
|
+
const inputReady = haystack.includes("input") || statusText.includes("your turn") || statusText.includes("ready");
|
|
1027
|
+
if (inputReady && (controlsEnabled || level !== void 0 || expectedSteps !== void 0)) {
|
|
1028
|
+
hasInputReadyState = true;
|
|
1029
|
+
}
|
|
1030
|
+
const success = setupReturnSummaryValue(receipt, ["success", "passed"]) === true || statusText.includes("perfect") || statusText.includes("success");
|
|
1031
|
+
const failure = statusText.includes("miss") || statusText.includes("failure") || setupReturnSummaryValue(receipt, ["failed"]) === true;
|
|
1032
|
+
const streak = cliFiniteNumber(setupReturnSummaryValue(receipt, ["streak"]));
|
|
1033
|
+
const best = cliFiniteNumber(setupReturnSummaryValue(receipt, ["best"]));
|
|
1034
|
+
if (mentionsSequence && (success || failure || streak !== void 0 || best !== void 0)) {
|
|
1035
|
+
hasSequenceOutcome = true;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
return hasSequenceContract && (hasInputReadyState || hasSequenceOutcome);
|
|
1039
|
+
}
|
|
1040
|
+
function profileHasRestartReadyReceipt(receipts) {
|
|
1041
|
+
return receipts.some((receipt) => {
|
|
1042
|
+
const storedTo = cliString(receipt.return_stored_to) || "";
|
|
1043
|
+
const label = cliString(receipt.label) || "";
|
|
1044
|
+
const path2 = cliString(receipt.path) || cliString(receipt.function_name) || "";
|
|
1045
|
+
const slot = profileLowerSummaryValue(receipt, ["slot", "phase", "state"]);
|
|
1046
|
+
const statusText = profileLowerSummaryValue(receipt, ["statusText", "status", "message"]);
|
|
1047
|
+
const summary = cliReturnSummaryLabel(receipt.return_summary) || "";
|
|
1048
|
+
const haystack = `${storedTo} ${label} ${path2} ${slot} ${statusText} ${summary}`.toLowerCase();
|
|
1049
|
+
const labelsRestart = haystack.includes("restart") || haystack.includes("play again") || haystack.includes("play-again") || haystack.includes("playagain") || haystack.includes("retry");
|
|
1050
|
+
if (!labelsRestart) return false;
|
|
1051
|
+
const ok = receipt.ok !== false && setupReturnSummaryValue(receipt, ["ok"]) !== false;
|
|
1052
|
+
const controlsEnabled = setupReturnSummaryValue(receipt, ["controlsEnabled", "inputControlsEnabled", "inputEnabled", "canInput"]) === true || setupReturnSummaryValue(receipt, ["shortDisabled"]) === false && setupReturnSummaryValue(receipt, ["longDisabled"]) === false;
|
|
1053
|
+
const level = cliFiniteNumber(setupReturnSummaryValue(receipt, ["level"]));
|
|
1054
|
+
const streak = cliFiniteNumber(setupReturnSummaryValue(receipt, ["streak"]));
|
|
1055
|
+
const best = cliFiniteNumber(setupReturnSummaryValue(receipt, ["best"]));
|
|
1056
|
+
const readyState = statusText.includes("your turn") || statusText.includes("ready") || setupReturnSummaryValue(receipt, ["ready", "restartReady", "restart_ready"]) === true;
|
|
1057
|
+
return ok && controlsEnabled && (readyState || level !== void 0 || streak !== void 0 || best !== void 0);
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
994
1060
|
function profileMetadataHasGeneratedOutputContract(metadata) {
|
|
995
1061
|
const contract = cliRecord(metadata.declared_state_contract);
|
|
996
1062
|
if (!contract) return false;
|
|
@@ -1039,6 +1105,7 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
1039
1105
|
const valueReceipts = [
|
|
1040
1106
|
...setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "window_eval")),
|
|
1041
1107
|
...setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "window_call")),
|
|
1108
|
+
...setupViewports.flatMap((viewport) => setupReceiptArray(viewport, "window_call_until")),
|
|
1042
1109
|
...setupActionValueReceipts
|
|
1043
1110
|
].filter((item) => item.ok !== false);
|
|
1044
1111
|
const clickCount = setupViewports.reduce((sum, viewport) => sum + (cliFiniteNumber(viewport.clicked_total) || 0), 0) + profileSetupReceiptTotal(setupViewports, "click") + profileSetupReceiptTotal(setupViewports, "click_count");
|
|
@@ -1096,6 +1163,34 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
1096
1163
|
const after = cliFiniteNumber(setupReturnSummaryValue(item, ["after", "afterCount", "itemCount", "count"]));
|
|
1097
1164
|
return before !== void 0 && after !== void 0 && after > before;
|
|
1098
1165
|
});
|
|
1166
|
+
const stateGrowthMetricNames = [
|
|
1167
|
+
"best",
|
|
1168
|
+
"streak",
|
|
1169
|
+
"score",
|
|
1170
|
+
"level",
|
|
1171
|
+
"progress",
|
|
1172
|
+
"coins",
|
|
1173
|
+
"totalCoins",
|
|
1174
|
+
"totalEarned",
|
|
1175
|
+
"saveTotalCoins",
|
|
1176
|
+
"saveTotalClicks",
|
|
1177
|
+
"perClick",
|
|
1178
|
+
"perSecond",
|
|
1179
|
+
"clickPowerLevel",
|
|
1180
|
+
"autoClickerLevel"
|
|
1181
|
+
];
|
|
1182
|
+
const hasPositiveStateGrowthMetric = valueReceipts.some((item) => stateGrowthMetricNames.some((name) => {
|
|
1183
|
+
const storedTo = cliString(item.return_stored_to) || "";
|
|
1184
|
+
const label = cliString(item.label) || "";
|
|
1185
|
+
const path2 = cliString(item.path) || cliString(item.function_name) || "";
|
|
1186
|
+
const slot = profileLowerSummaryValue(item, ["slot", "phase", "state"]);
|
|
1187
|
+
const statusText = profileLowerSummaryValue(item, ["statusText", "status", "message"]);
|
|
1188
|
+
const haystack = `${storedTo} ${label} ${path2} ${slot} ${statusText}`.toLowerCase();
|
|
1189
|
+
const stateGrowthOutcome = haystack.includes("growth") || haystack.includes("success") || haystack.includes("after") || haystack.includes("add") || haystack.includes("upgrade") || haystack.includes("bought") || haystack.includes("perfect") || setupReturnSummaryValue(item, ["success", "passed"]) === true;
|
|
1190
|
+
if (!stateGrowthOutcome) return false;
|
|
1191
|
+
const value = cliFiniteNumber(setupReturnSummaryValue(item, [name]));
|
|
1192
|
+
return value !== void 0 && value > 0;
|
|
1193
|
+
}));
|
|
1099
1194
|
const hasReachability = profileReachabilitySummaryMarkdown(result).length > 0 || result.checks.some((check) => check.type === "selector_visible" && Boolean(cliRecord(check.evidence)?.selector));
|
|
1100
1195
|
const hasOverflowEvidence = result.checks.some((check) => check.type === "no_horizontal_overflow" || check.type === "no_mobile_horizontal_overflow" || check.type === "frame_no_horizontal_overflow") || evidenceViewports.some((viewport) => (cliFiniteNumber(viewport.overflow_px) || 0) > 0 || (cliFiniteNumber(viewport.bounds_overflow_px) || 0) > 0 || Boolean(viewport.overflow_offenders?.length));
|
|
1101
1196
|
const hasConsoleAccounting = profileHasCheck(result, ["no_console_warnings", "no_fatal_console_errors"]) || Boolean(result.evidence?.console || result.evidence?.page_errors);
|
|
@@ -1182,6 +1277,8 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
1182
1277
|
const hasControlledSuccessLaunchReceipt = profileHasControlledLaunchReceipt(valueReceipts, "success");
|
|
1183
1278
|
const hasRouteContinuationReceipt = profileHasRouteContinuationReceipt(valueReceipts);
|
|
1184
1279
|
const hasRecoveredStateReceipt = profileHasRecoveredStateReceipt(valueReceipts);
|
|
1280
|
+
const hasSequenceInputReceipt = profileHasSequenceInputReceipt(valueReceipts) && (inputDispatchCount > 0 || hasNaturalInput);
|
|
1281
|
+
const hasRestartReadyReceipt = profileHasRestartReadyReceipt(valueReceipts);
|
|
1185
1282
|
const hasGeneratedOutputContract = profileMetadataHasGeneratedOutputContract(metadata);
|
|
1186
1283
|
const hasGeneratedOutputReceipt = profileHasGeneratedOutputReceipt(valueReceipts);
|
|
1187
1284
|
const failedCleanupInventoryReason = profileFailedCleanupInventoryReason(setupViewports);
|
|
@@ -1349,6 +1446,20 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
1349
1446
|
"visible cleanup affordance receipt missing"
|
|
1350
1447
|
);
|
|
1351
1448
|
}
|
|
1449
|
+
if (text.includes("input") && (text.includes("sequence") || text.includes("short-long") || text.includes("short long") || text.includes("long-short") || text.includes("long long") || text.includes("long short"))) {
|
|
1450
|
+
return profileReceiptSignalStatus(
|
|
1451
|
+
hasSequenceInputReceipt,
|
|
1452
|
+
"sequence input receipt present",
|
|
1453
|
+
"sequence input receipt missing"
|
|
1454
|
+
);
|
|
1455
|
+
}
|
|
1456
|
+
if (text.includes("restart") && (text.includes("receipt") || text.includes("ready") || text.includes("re-enabled") || text.includes("controls"))) {
|
|
1457
|
+
return profileReceiptSignalStatus(
|
|
1458
|
+
hasRestartReadyReceipt,
|
|
1459
|
+
"restart-ready receipt present",
|
|
1460
|
+
"restart-ready receipt missing"
|
|
1461
|
+
);
|
|
1462
|
+
}
|
|
1352
1463
|
if (text.includes("retry") || text.includes("repair") || text.includes("reset") || text.includes("affordance")) {
|
|
1353
1464
|
return profileReceiptSignalStatus(hasStateContract || clickCount > 0, "affordance or transition receipt present", "affordance receipt missing");
|
|
1354
1465
|
}
|
|
@@ -1359,7 +1470,7 @@ function profilePackReceiptStatus(result, metadata, receipt) {
|
|
|
1359
1470
|
return profileReceiptSignalStatus(hasTextVisibility || screenshotCount > 0, "initial visible-state evidence present", "initial state evidence missing");
|
|
1360
1471
|
}
|
|
1361
1472
|
if (text.includes("state-growth") || text.includes("state growth") || text.includes("growth receipt") || text.includes("grid grows") || text.includes("state") && text.includes("after the click")) {
|
|
1362
|
-
return profileReceiptSignalStatus(hasStateGrowthReceipt, "state-growth receipt present", "state-growth receipt missing");
|
|
1473
|
+
return profileReceiptSignalStatus(hasStateGrowthReceipt || hasPositiveStateGrowthMetric, "state-growth receipt present", "state-growth receipt missing");
|
|
1363
1474
|
}
|
|
1364
1475
|
if (text.includes("visible grid") || text.includes("control evidence") || text.includes("grid") && text.includes("control")) {
|
|
1365
1476
|
return profileReceiptSignalStatus(
|