@riddledc/riddle-proof 0.8.79 → 0.8.80
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 +39 -0
- package/dist/change-proof.js +2 -2
- package/dist/{chunk-7N6X54WG.js → chunk-6T6ZAK77.js} +1 -1
- package/dist/{chunk-RQPCKRKT.js → chunk-A4EF4M3B.js} +1 -1
- package/dist/{chunk-6VFS2JFR.js → chunk-IL7MLYB5.js} +1 -1
- package/dist/{chunk-NEXWITV4.js → chunk-N7EETHYG.js} +4 -4
- package/dist/{chunk-FCSJZBC5.js → chunk-ZNVYJFR7.js} +341 -4
- package/dist/cli/index.js +5 -5
- package/dist/cli.cjs +338 -4
- package/dist/cli.js +5 -5
- package/dist/index.cjs +344 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -4
- package/dist/pr-comment.js +3 -3
- package/dist/profile/index.cjs +344 -4
- package/dist/profile/index.d.cts +1 -1
- package/dist/profile/index.d.ts +1 -1
- package/dist/profile/index.js +7 -1
- package/dist/profile-suggestions.js +2 -2
- package/dist/profile.cjs +344 -4
- package/dist/profile.d.cts +38 -3
- package/dist/profile.d.ts +38 -3
- package/dist/profile.js +7 -1
- package/examples/profiles/ordered-trace.json +58 -0
- package/package.json +1 -1
package/dist/profile.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const RIDDLE_PROOF_PROFILE_VERSION: "riddle-proof.profile.v1";
|
|
|
5
5
|
declare const RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: "riddle-proof.profile-evidence.v1";
|
|
6
6
|
declare const RIDDLE_PROOF_PROFILE_RESULT_VERSION: "riddle-proof.profile-result.v1";
|
|
7
7
|
declare const RIDDLE_PROOF_PROFILE_STATUSES: readonly ["passed", "product_regression", "proof_insufficient", "environment_blocked", "configuration_error", "needs_human_review"];
|
|
8
|
-
declare const RIDDLE_PROOF_PROFILE_CHECK_TYPES: readonly ["route_loaded", "url_search_param_equals", "url_search_param_absent", "selector_visible", "selector_absent", "selector_count_at_least", "selector_count_equals", "selector_count_equal", "selector_count_eq", "dialog_count_equals", "dialog_accept_count_equals", "dialog_dismiss_count_equals", "selector_text_visible", "selector_text_absent", "selector_text_order", "observe_within", "frame_text_visible", "frame_url_equals", "frame_url_matches", "frame_no_horizontal_overflow", "text_visible", "text_absent", "http_status", "link_status", "artifact_link_status", "route_inventory", "no_horizontal_overflow", "no_mobile_horizontal_overflow", "no_fatal_console_errors", "no_console_warnings"];
|
|
8
|
+
declare const RIDDLE_PROOF_PROFILE_CHECK_TYPES: readonly ["route_loaded", "url_search_param_equals", "url_search_param_absent", "selector_visible", "selector_absent", "selector_count_at_least", "selector_count_equals", "selector_count_equal", "selector_count_eq", "dialog_count_equals", "dialog_accept_count_equals", "dialog_dismiss_count_equals", "selector_text_visible", "selector_text_absent", "selector_text_order", "ordered_trace", "observe_within", "frame_text_visible", "frame_url_equals", "frame_url_matches", "frame_no_horizontal_overflow", "text_visible", "text_absent", "http_status", "link_status", "artifact_link_status", "route_inventory", "no_horizontal_overflow", "no_mobile_horizontal_overflow", "no_fatal_console_errors", "no_console_warnings"];
|
|
9
9
|
declare const RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: readonly ["click", "tap", "tap_until", "drag", "press", "key_down", "key_up", "fill", "set_input_value", "set_range_value", "deterministic_runtime", "canvas_signature", "assert_text_visible", "assert_text_absent", "assert_selector_count", "assert_window_value", "assert_window_number", "local_storage", "session_storage", "clear_storage", "clear_console", "dialog_response", "screenshot", "wait", "wait_for_selector", "wait_for_text", "window_eval", "window_call", "window_call_until"];
|
|
10
10
|
type RiddleProofProfileStatus = typeof RIDDLE_PROOF_PROFILE_STATUSES[number];
|
|
11
11
|
type RiddleProofProfileCheckType = typeof RIDDLE_PROOF_PROFILE_CHECK_TYPES[number];
|
|
@@ -40,6 +40,36 @@ interface RiddleProofProfileHttpStatusPreflightFetchResponse {
|
|
|
40
40
|
}
|
|
41
41
|
type RiddleProofProfileHttpStatusPreflightFetch = (url: string, init?: Record<string, unknown>) => Promise<RiddleProofProfileHttpStatusPreflightFetchResponse>;
|
|
42
42
|
type RiddleProofProfileJsonValueType = "array" | "boolean" | "null" | "number" | "object" | "string";
|
|
43
|
+
declare const RIDDLE_PROOF_ORDERED_TRACE_OPERATORS: readonly ["exists", "equals", "not_equals", "truthy", "falsy", "gt", "gte", "lt", "lte", "abs_gt", "abs_gte", "abs_lt", "abs_lte"];
|
|
44
|
+
type RiddleProofOrderedTraceOperator = typeof RIDDLE_PROOF_ORDERED_TRACE_OPERATORS[number];
|
|
45
|
+
interface RiddleProofOrderedTracePredicate {
|
|
46
|
+
path: string;
|
|
47
|
+
op: RiddleProofOrderedTraceOperator;
|
|
48
|
+
value?: JsonValue;
|
|
49
|
+
}
|
|
50
|
+
interface RiddleProofOrderedTraceEvent {
|
|
51
|
+
label: string;
|
|
52
|
+
predicates: RiddleProofOrderedTracePredicate[];
|
|
53
|
+
}
|
|
54
|
+
interface RiddleProofOrderedTraceWitness {
|
|
55
|
+
label: string;
|
|
56
|
+
index: number;
|
|
57
|
+
observations: Array<{
|
|
58
|
+
path: string;
|
|
59
|
+
op: RiddleProofOrderedTraceOperator;
|
|
60
|
+
expected?: JsonValue;
|
|
61
|
+
observed: JsonValue;
|
|
62
|
+
}>;
|
|
63
|
+
}
|
|
64
|
+
interface RiddleProofOrderedTraceAssessment {
|
|
65
|
+
version: "riddle-proof.ordered-trace-assessment.v1";
|
|
66
|
+
status: "passed" | "failed" | "proof_insufficient";
|
|
67
|
+
trace_length: number;
|
|
68
|
+
witnesses: RiddleProofOrderedTraceWitness[];
|
|
69
|
+
missing_event?: string;
|
|
70
|
+
missing_paths?: string[];
|
|
71
|
+
reason?: string;
|
|
72
|
+
}
|
|
43
73
|
interface RiddleProofProfileHttpStatusBodyJsonAssertion {
|
|
44
74
|
label?: string;
|
|
45
75
|
path: string;
|
|
@@ -246,6 +276,9 @@ interface RiddleProofProfileCheck {
|
|
|
246
276
|
body_not_patterns?: string[];
|
|
247
277
|
body_json_assertions?: RiddleProofProfileHttpStatusBodyJsonAssertion[];
|
|
248
278
|
expected_texts?: string[];
|
|
279
|
+
setup_action_label?: string;
|
|
280
|
+
trace_path?: string;
|
|
281
|
+
events?: RiddleProofOrderedTraceEvent[];
|
|
249
282
|
link_selector?: string;
|
|
250
283
|
source_selector?: string;
|
|
251
284
|
route_path_prefix?: string;
|
|
@@ -372,7 +405,7 @@ interface RiddleProofProfileEvidence {
|
|
|
372
405
|
interface RiddleProofProfileCheckResult {
|
|
373
406
|
type: RiddleProofProfileCheckType | (string & {});
|
|
374
407
|
label?: string;
|
|
375
|
-
status: "passed" | "failed" | "skipped" | "needs_human_review";
|
|
408
|
+
status: "passed" | "failed" | "skipped" | "proof_insufficient" | "needs_human_review";
|
|
376
409
|
evidence: Record<string, JsonValue>;
|
|
377
410
|
message?: string;
|
|
378
411
|
}
|
|
@@ -454,6 +487,8 @@ interface NormalizeRiddleProofProfileOptions {
|
|
|
454
487
|
route?: string;
|
|
455
488
|
viewports?: RiddleProofProfileViewport[];
|
|
456
489
|
}
|
|
490
|
+
declare function assessRiddleProofOrderedTrace(trace: unknown, events: RiddleProofOrderedTraceEvent[]): RiddleProofOrderedTraceAssessment;
|
|
491
|
+
declare function assessRiddleProofOrderedTraceSetupResults(results: unknown, setupActionLabel: string, tracePath: string, events: RiddleProofOrderedTraceEvent[]): RiddleProofOrderedTraceAssessment;
|
|
457
492
|
declare function slugifyRiddleProofProfileName(value: string): string;
|
|
458
493
|
declare function collectRiddleProofProfileWarnings(profile: RiddleProofProfile): string[];
|
|
459
494
|
declare function normalizeRiddleProofProfile(input: unknown, options?: NormalizeRiddleProofProfileOptions): RiddleProofProfile;
|
|
@@ -514,4 +549,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
|
|
|
514
549
|
declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
|
|
515
550
|
declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
|
|
516
551
|
|
|
517
|
-
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileRunnerArtifactPreflight, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
|
552
|
+
export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS, RIDDLE_PROOF_ORDERED_TRACE_OPERATORS, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofArtifactBodyAssertionInput, type RiddleProofArtifactBodyAssertionResult, type RiddleProofOrderedTraceAssessment, type RiddleProofOrderedTraceEvent, type RiddleProofOrderedTraceOperator, type RiddleProofOrderedTracePredicate, type RiddleProofOrderedTraceWitness, type RiddleProofProfile, type RiddleProofProfileArtifactCompleteness, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileHttpStatusBodyJsonAssertion, type RiddleProofProfileHttpStatusBodyJsonAssertionResult, type RiddleProofProfileHttpStatusPreflightCheckResult, type RiddleProofProfileHttpStatusPreflightFetch, type RiddleProofProfileHttpStatusPreflightFetchResponse, type RiddleProofProfileHttpStatusPreflightOptions, type RiddleProofProfileHttpStatusPreflightResult, type RiddleProofProfileJsonValueType, type RiddleProofProfileNetworkAbortErrorCode, type RiddleProofProfileNetworkMock, type RiddleProofProfileNetworkMockResponse, type RiddleProofProfileResult, type RiddleProofProfileReturnSummaryField, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRouteInventoryRoute, type RiddleProofProfileRunner, type RiddleProofProfileRunnerArtifactPreflight, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, applyRiddleProofProfileArtifactCompleteness, assessRiddleProofOrderedTrace, assessRiddleProofOrderedTraceSetupResults, assessRiddleProofProfileArtifactCompleteness, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, collectRiddleProofProfileWarnings, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, deriveRiddleProofArtifactBodyAssertions, extractRiddleProofProfileResult, normalizeRiddleProofProfile, preflightRiddleProofProfileHttpStatusChecks, preflightRiddleProofProfileRunnerArtifacts, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
|
package/dist/profile.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
3
|
+
RIDDLE_PROOF_ORDERED_TRACE_OPERATORS,
|
|
3
4
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
4
5
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
5
6
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -8,6 +9,8 @@ import {
|
|
|
8
9
|
RIDDLE_PROOF_PROFILE_STATUSES,
|
|
9
10
|
RIDDLE_PROOF_PROFILE_VERSION,
|
|
10
11
|
applyRiddleProofProfileArtifactCompleteness,
|
|
12
|
+
assessRiddleProofOrderedTrace,
|
|
13
|
+
assessRiddleProofOrderedTraceSetupResults,
|
|
11
14
|
assessRiddleProofProfileArtifactCompleteness,
|
|
12
15
|
assessRiddleProofProfileEvidence,
|
|
13
16
|
buildRiddleProofProfileScript,
|
|
@@ -27,10 +30,11 @@ import {
|
|
|
27
30
|
resolveRiddleProofProfileTimeoutSec,
|
|
28
31
|
slugifyRiddleProofProfileName,
|
|
29
32
|
summarizeRiddleProofProfileResult
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZNVYJFR7.js";
|
|
31
34
|
import "./chunk-MLKGABMK.js";
|
|
32
35
|
export {
|
|
33
36
|
RIDDLE_PROOF_HOSTED_PROFILE_ARTIFACTS,
|
|
37
|
+
RIDDLE_PROOF_ORDERED_TRACE_OPERATORS,
|
|
34
38
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
35
39
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|
|
36
40
|
RIDDLE_PROOF_PROFILE_NETWORK_ABORT_ERROR_CODES,
|
|
@@ -39,6 +43,8 @@ export {
|
|
|
39
43
|
RIDDLE_PROOF_PROFILE_STATUSES,
|
|
40
44
|
RIDDLE_PROOF_PROFILE_VERSION,
|
|
41
45
|
applyRiddleProofProfileArtifactCompleteness,
|
|
46
|
+
assessRiddleProofOrderedTrace,
|
|
47
|
+
assessRiddleProofOrderedTraceSetupResults,
|
|
42
48
|
assessRiddleProofProfileArtifactCompleteness,
|
|
43
49
|
assessRiddleProofProfileEvidence,
|
|
44
50
|
buildRiddleProofProfileScript,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "ordered-interaction-trace",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{ "name": "tablet", "width": 768, "height": 1024 }
|
|
8
|
+
],
|
|
9
|
+
"setup_actions": [
|
|
10
|
+
{
|
|
11
|
+
"type": "window_eval",
|
|
12
|
+
"label": "capture interaction trace",
|
|
13
|
+
"script": "return { trace: Array.isArray(window.__RIDDLE_PROOF_TRACE__) ? window.__RIDDLE_PROOF_TRACE__ : [] };"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"checks": [
|
|
18
|
+
{ "type": "route_loaded", "expected_path": "/" },
|
|
19
|
+
{
|
|
20
|
+
"type": "ordered_trace",
|
|
21
|
+
"label": "input to release",
|
|
22
|
+
"setup_action_label": "capture interaction trace",
|
|
23
|
+
"trace_path": "trace",
|
|
24
|
+
"events": [
|
|
25
|
+
{
|
|
26
|
+
"label": "input",
|
|
27
|
+
"predicates": [
|
|
28
|
+
{ "path": "active", "op": "equals", "value": true },
|
|
29
|
+
{ "path": "target", "op": "abs_gte", "value": 0.8 }
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "response",
|
|
34
|
+
"predicates": [
|
|
35
|
+
{ "path": "applied", "op": "abs_gte", "value": 0.1 }
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"label": "release",
|
|
40
|
+
"predicates": [
|
|
41
|
+
{ "path": "active", "op": "equals", "value": false },
|
|
42
|
+
{ "path": "applied", "op": "abs_gte", "value": 0.05 }
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"label": "idle",
|
|
47
|
+
"predicates": [
|
|
48
|
+
{ "path": "active", "op": "equals", "value": false },
|
|
49
|
+
{ "path": "applied", "op": "equals", "value": 0 }
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{ "type": "no_fatal_console_errors" }
|
|
55
|
+
],
|
|
56
|
+
"artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
|
|
57
|
+
"baseline_policy": "invariant_only"
|
|
58
|
+
}
|