@riddledc/riddle-proof-packs 0.2.0
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/LICENSE +21 -0
- package/README.md +107 -0
- package/dist/index.cjs +1131 -0
- package/dist/index.d.cts +62 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +1095 -0
- package/package.json +47 -0
- package/packs/auth-smoke/README.md +21 -0
- package/packs/auth-smoke/profile.json +65 -0
- package/packs/canvas-gameplay/README.md +21 -0
- package/packs/canvas-gameplay/profile.json +225 -0
- package/packs/gameplay-window-call-until/README.md +21 -0
- package/packs/gameplay-window-call-until/profile.json +101 -0
- package/packs/handled-recovery-action-malformed-success/README.md +21 -0
- package/packs/handled-recovery-action-malformed-success/profile.json +126 -0
- package/packs/handled-recovery-list-load/README.md +21 -0
- package/packs/handled-recovery-list-load/profile.json +101 -0
- package/packs/mobile-layout-smoke/README.md +21 -0
- package/packs/mobile-layout-smoke/profile.json +64 -0
- package/packs/page-content-basic/README.md +21 -0
- package/packs/page-content-basic/profile.json +29 -0
- package/packs/route-inventory-basic/README.md +21 -0
- package/packs/route-inventory-basic/profile.json +29 -0
- package/packs/spa-route-exit-state-hygiene/README.md +21 -0
- package/packs/spa-route-exit-state-hygiene/profile.json +87 -0
- package/packs/terminal-result-partial-evidence/README.md +21 -0
- package/packs/terminal-result-partial-evidence/profile.json +122 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# handled-recovery-list-load
|
|
2
|
+
|
|
3
|
+
Handled Recovery List Load proof pack profile. Include this profile JSON directly in any profile-mode execution path.
|
|
4
|
+
|
|
5
|
+
## Proof claims and evidence roles
|
|
6
|
+
|
|
7
|
+
- evidence_role: `interaction_snapshots`
|
|
8
|
+
- atomic claim
|
|
9
|
+
- claim: list-recovery failures are surfaced without replacing baseline page-level information and without leaking parser errors.
|
|
10
|
+
- target: `/account` account page list section.
|
|
11
|
+
- setup/actions: seed mocks, enter a controlled save/load interaction, then capture pre-action and post-action UI states.
|
|
12
|
+
- evidence: list/state assertions, recovery text presence, absence of contradictory/invalid backend text, and clean console.
|
|
13
|
+
- verdict: pass when recovery path is explicit and unrelated UI state remains present.
|
|
14
|
+
- does not prove
|
|
15
|
+
- successful list loading performance or pagination contracts.
|
|
16
|
+
- backend pagination or auth policy behavior outside the exercised endpoint.
|
|
17
|
+
- long-running retry/resubmission behavior.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Load the profile JSON from `profile.json` and supply it to profile mode or a local runner input file.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "handled-recovery-list-load",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/account",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{ "name": "mobile", "width": 390, "height": 844 },
|
|
8
|
+
{ "name": "tablet", "width": 820, "height": 1180 },
|
|
9
|
+
{ "name": "desktop", "width": 1440, "height": 1000 }
|
|
10
|
+
],
|
|
11
|
+
"timeout_sec": 300,
|
|
12
|
+
"wait_ms": 800,
|
|
13
|
+
"network_mocks": [
|
|
14
|
+
{
|
|
15
|
+
"label": "account-summary",
|
|
16
|
+
"url": "**/api/account/summary",
|
|
17
|
+
"method": "GET",
|
|
18
|
+
"status": 200,
|
|
19
|
+
"content_type": "application/json",
|
|
20
|
+
"required_hit_count": 3,
|
|
21
|
+
"json": {
|
|
22
|
+
"available_time": "4h 0m",
|
|
23
|
+
"active_jobs": 2
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"label": "recent-jobs",
|
|
28
|
+
"url": "**/api/jobs?limit=10",
|
|
29
|
+
"method": "GET",
|
|
30
|
+
"status": 200,
|
|
31
|
+
"content_type": "application/json",
|
|
32
|
+
"required_hit_count": 3,
|
|
33
|
+
"json": {
|
|
34
|
+
"jobs": [
|
|
35
|
+
{
|
|
36
|
+
"id": "job_recovery_template_survives",
|
|
37
|
+
"status": "completed"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"label": "saved-items-unavailable-load",
|
|
44
|
+
"url": "**/api/saved-items",
|
|
45
|
+
"method": "GET",
|
|
46
|
+
"status": 503,
|
|
47
|
+
"content_type": "application/json",
|
|
48
|
+
"required_hit_count": 3,
|
|
49
|
+
"json": {
|
|
50
|
+
"error": "Synthetic saved items unavailable"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"setup_actions": [
|
|
55
|
+
{ "type": "clear_storage", "storage": "both", "reload": true },
|
|
56
|
+
{ "type": "wait_for_selector", "selector": "[data-testid='account-page']", "timeout_ms": 30000 },
|
|
57
|
+
{ "type": "wait_for_text", "selector": "body", "text": "4h 0m", "timeout_ms": 30000 },
|
|
58
|
+
{ "type": "wait_for_text", "selector": "body", "text": "job_recovery_template_survives", "timeout_ms": 30000 },
|
|
59
|
+
{ "type": "wait_for_text", "selector": "body", "text": "Failed to load saved items", "timeout_ms": 30000 },
|
|
60
|
+
{ "type": "screenshot", "label": "saved-items-malformed-load-visible-recovery" },
|
|
61
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "No saved items yet", "timeout_ms": 1000 },
|
|
62
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "Synthetic saved items unavailable", "timeout_ms": 1000 },
|
|
63
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "saved_items_temporarily_unavailable", "timeout_ms": 1000 },
|
|
64
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "Expected property name", "timeout_ms": 1000 },
|
|
65
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "SyntaxError", "timeout_ms": 1000 },
|
|
66
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "[object Object]", "timeout_ms": 1000 }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"checks": [
|
|
70
|
+
{ "type": "route_loaded", "expected_path": "/account" },
|
|
71
|
+
{ "type": "selector_visible", "selector": "[data-testid='account-page']" },
|
|
72
|
+
{ "type": "selector_visible", "selector": "[data-testid='saved-items-error']" },
|
|
73
|
+
{ "type": "text_visible", "text": "4h 0m" },
|
|
74
|
+
{ "type": "text_visible", "text": "2 active" },
|
|
75
|
+
{ "type": "text_visible", "text": "job_recovery_template_survives" },
|
|
76
|
+
{ "type": "text_visible", "text": "Failed to load saved items" },
|
|
77
|
+
{ "type": "text_absent", "text": "No saved items yet" },
|
|
78
|
+
{ "type": "text_absent", "text": "Synthetic saved items unavailable" },
|
|
79
|
+
{ "type": "text_absent", "text": "saved_items_temporarily_unavailable" },
|
|
80
|
+
{ "type": "text_absent", "text": "Expected property name" },
|
|
81
|
+
{ "type": "text_absent", "text": "SyntaxError" },
|
|
82
|
+
{ "type": "text_absent", "text": "[object Object]" },
|
|
83
|
+
{ "type": "text_absent", "text": "Application error" },
|
|
84
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='saved-items-error']", "expected_count": 1 },
|
|
85
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='recent-job-row']", "expected_count": 1 },
|
|
86
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='saved-item-row']", "expected_count": 0 },
|
|
87
|
+
{ "type": "no_horizontal_overflow", "max_overflow_px": 1 },
|
|
88
|
+
{ "type": "no_fatal_console_errors" },
|
|
89
|
+
{ "type": "no_console_warnings" }
|
|
90
|
+
],
|
|
91
|
+
"artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
|
|
92
|
+
"baseline_policy": "invariant_only",
|
|
93
|
+
"failure_policy": {
|
|
94
|
+
"environment_blocked": "neutral",
|
|
95
|
+
"proof_insufficient": "fail",
|
|
96
|
+
"product_regression": "fail"
|
|
97
|
+
},
|
|
98
|
+
"metadata": {
|
|
99
|
+
"purpose": "Template for handled list-load recovery: prove independent page data still renders, the failed list shows one recovery message, contradictory empty-state copy, raw backend text, parser text, and object leakage stay absent, and browser console evidence remains clean. Do not add max_hit_count to idempotent GET mocks unless exact call count is the product contract."
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# mobile-layout-smoke
|
|
2
|
+
|
|
3
|
+
Mobile Layout Smoke proof pack profile. Include this profile JSON directly in any profile-mode execution path.
|
|
4
|
+
|
|
5
|
+
## Proof claims and evidence roles
|
|
6
|
+
|
|
7
|
+
- evidence_role: `current_target`
|
|
8
|
+
- atomic claim
|
|
9
|
+
- claim: the target renders without layout clipping at mobile viewport size.
|
|
10
|
+
- target: `/` route on the configured target URL.
|
|
11
|
+
- setup/actions: standard mobile viewport load and baseline wait.
|
|
12
|
+
- evidence: root visibility, copy presence, overflow checks, and no-fatal console checks.
|
|
13
|
+
- verdict: pass when critical copy and layout remain visible/usable without overflow.
|
|
14
|
+
- does not prove
|
|
15
|
+
- tablet/desktop responsive behavior.
|
|
16
|
+
- interaction correctness or route mutations.
|
|
17
|
+
- protected feature behavior behind auth gates.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Load the profile JSON from `profile.json` and supply it to profile mode or a local runner input file.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "mobile-layout-smoke",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{
|
|
8
|
+
"name": "mobile",
|
|
9
|
+
"width": 390,
|
|
10
|
+
"height": 844
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"auth": "none",
|
|
14
|
+
"wait_for_selector": "body",
|
|
15
|
+
"setup_actions": [
|
|
16
|
+
{
|
|
17
|
+
"type": "wait",
|
|
18
|
+
"ms": 250
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"checks": [
|
|
23
|
+
{
|
|
24
|
+
"type": "route_loaded",
|
|
25
|
+
"expected_path": "/"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "selector_visible",
|
|
29
|
+
"selector": "body"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "text_visible",
|
|
33
|
+
"text": "Example"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "no_mobile_horizontal_overflow"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "no_fatal_console_errors"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"artifacts": [
|
|
43
|
+
"screenshot",
|
|
44
|
+
"console",
|
|
45
|
+
"dom_summary",
|
|
46
|
+
"proof_json"
|
|
47
|
+
],
|
|
48
|
+
"failure_policy": {
|
|
49
|
+
"environment_blocked": "neutral",
|
|
50
|
+
"proof_insufficient": "fail",
|
|
51
|
+
"product_regression": "fail"
|
|
52
|
+
},
|
|
53
|
+
"metadata": {
|
|
54
|
+
"pack_id": "layout_mobile",
|
|
55
|
+
"pack_public_name": "Mobile Layout Pack",
|
|
56
|
+
"purpose": "Template for high-signal mobile layout smoke checks.",
|
|
57
|
+
"required_receipts": [
|
|
58
|
+
"primary visible root on mobile viewport",
|
|
59
|
+
"no horizontal overflow",
|
|
60
|
+
"critical copy presence",
|
|
61
|
+
"clean browser console"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# page-content-basic
|
|
2
|
+
|
|
3
|
+
Page Content Basic proof pack profile. Include this profile JSON directly in any profile-mode execution path.
|
|
4
|
+
|
|
5
|
+
## Proof claims and evidence roles
|
|
6
|
+
|
|
7
|
+
- evidence_role: `current_target`
|
|
8
|
+
- atomic claim
|
|
9
|
+
- claim: the configured route renders expected baseline content and remains visually and console-clean.
|
|
10
|
+
- target: `/` route on the configured target URL.
|
|
11
|
+
- setup/actions: basic load/visibility setup without route transitions.
|
|
12
|
+
- evidence: route/text/viewport visibility checks plus overflow and console safety assertions.
|
|
13
|
+
- verdict: pass when baseline content is present and no fatal runtime errors are observed.
|
|
14
|
+
- does not prove
|
|
15
|
+
- feature behavior beyond baseline smoke checks.
|
|
16
|
+
- dynamic state transitions or stateful business logic.
|
|
17
|
+
- multi-step auth or account-specific behavior.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Load the profile JSON from `profile.json` and supply it to profile mode or a local runner input file.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "page-content-basic",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{ "name": "mobile", "width": 390, "height": 844 },
|
|
8
|
+
{ "name": "desktop", "width": 1440, "height": 1000 }
|
|
9
|
+
],
|
|
10
|
+
"auth": "none",
|
|
11
|
+
"wait_for_selector": "body",
|
|
12
|
+
"setup_actions": [
|
|
13
|
+
{ "type": "wait", "ms": 250 }
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"checks": [
|
|
17
|
+
{ "type": "route_loaded", "expected_path": "/" },
|
|
18
|
+
{ "type": "selector_visible", "selector": "body" },
|
|
19
|
+
{ "type": "text_visible", "text": "Example" },
|
|
20
|
+
{ "type": "no_mobile_horizontal_overflow" },
|
|
21
|
+
{ "type": "no_fatal_console_errors" }
|
|
22
|
+
],
|
|
23
|
+
"artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
|
|
24
|
+
"failure_policy": {
|
|
25
|
+
"environment_blocked": "neutral",
|
|
26
|
+
"proof_insufficient": "fail",
|
|
27
|
+
"product_regression": "fail"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# route-inventory-basic
|
|
2
|
+
|
|
3
|
+
Route Inventory Basic proof pack profile. Include this profile JSON directly in any profile-mode execution path.
|
|
4
|
+
|
|
5
|
+
## Proof claims and evidence roles
|
|
6
|
+
|
|
7
|
+
- evidence_role: `current_target`
|
|
8
|
+
- atomic claim
|
|
9
|
+
- claim: expected route inventory is present and navigable from the configured route list.
|
|
10
|
+
- target: `/` route list source with route inventory checks.
|
|
11
|
+
- setup/actions: wait for route inventory container and validate expected entries.
|
|
12
|
+
- evidence: route inventory receipt, overflow checks, and no-fatal console checks.
|
|
13
|
+
- verdict: pass when listed routes are discoverable with stable inventory output.
|
|
14
|
+
- does not prove
|
|
15
|
+
- the full routing graph or server-side route auth correctness.
|
|
16
|
+
- behavior after navigating into each listed route.
|
|
17
|
+
- route accessibility/accessibility quality across all devices.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Load the profile JSON from `profile.json` and supply it to profile mode or a local runner input file.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "route-inventory-basic",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{ "name": "desktop", "width": 1280, "height": 900 },
|
|
8
|
+
{ "name": "mobile", "width": 390, "height": 844 }
|
|
9
|
+
],
|
|
10
|
+
"wait_for_selector": "[data-testid='route-list']",
|
|
11
|
+
"timeout_sec": 180
|
|
12
|
+
},
|
|
13
|
+
"checks": [
|
|
14
|
+
{
|
|
15
|
+
"type": "route_inventory",
|
|
16
|
+
"expected_routes": [
|
|
17
|
+
{ "name": "Example Route", "path": "/example" }
|
|
18
|
+
],
|
|
19
|
+
"link_selector": "a[href='/example']",
|
|
20
|
+
"source_selector": "[data-testid='route-list']",
|
|
21
|
+
"route_path_prefix": "/example",
|
|
22
|
+
"timeout_ms": 30000
|
|
23
|
+
},
|
|
24
|
+
{ "type": "no_mobile_horizontal_overflow", "max_overflow_px": 1 },
|
|
25
|
+
{ "type": "no_fatal_console_errors" }
|
|
26
|
+
],
|
|
27
|
+
"artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
|
|
28
|
+
"baseline_policy": "invariant_only"
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# spa-route-exit-state-hygiene
|
|
2
|
+
|
|
3
|
+
Spa Route Exit State Hygiene proof pack profile. Include this profile JSON directly in any profile-mode execution path.
|
|
4
|
+
|
|
5
|
+
## Proof claims and evidence roles
|
|
6
|
+
|
|
7
|
+
- evidence_role: `interaction_snapshots`
|
|
8
|
+
- atomic claim
|
|
9
|
+
- claim: route-local state is established on entry and removed after navigation cleanup.
|
|
10
|
+
- target: `/games/example?proof=1` and the resulting home route after exit.
|
|
11
|
+
- setup/actions: capture pre-action active-route state, navigate home, then capture post-action cleanup state.
|
|
12
|
+
- evidence: pre/post runtime globals, screenshots at route-active/route-exit boundaries, DOM/route checks, and console warnings/fatal checks.
|
|
13
|
+
- verdict: pass when route state remains active only while expected and stale state is not retained after exit.
|
|
14
|
+
- does not prove
|
|
15
|
+
- that all routes share the same cleanup contract.
|
|
16
|
+
- backend persistence cleanup or cache invalidation guarantees.
|
|
17
|
+
- security boundaries across route transitions.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Load the profile JSON from `profile.json` and supply it to profile mode or a local runner input file.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "spa-route-exit-state-hygiene",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/games/example?proof=1",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{ "name": "phone", "width": 390, "height": 844 },
|
|
8
|
+
{ "name": "ipad-mini", "width": 768, "height": 1024 },
|
|
9
|
+
{ "name": "ipad", "width": 820, "height": 1180 },
|
|
10
|
+
{ "name": "desktop", "width": 1440, "height": 1000 }
|
|
11
|
+
],
|
|
12
|
+
"timeout_sec": 300,
|
|
13
|
+
"wait_for_selector": "#game-root",
|
|
14
|
+
"screenshot_mode": "viewport",
|
|
15
|
+
"setup_actions": [
|
|
16
|
+
{ "type": "clear_storage", "storage": "both", "reload": true },
|
|
17
|
+
{ "type": "wait_for_selector", "selector": "#game-root", "timeout_ms": 20000 },
|
|
18
|
+
{ "type": "wait_for_selector", "selector": "#game-root canvas, #game-root [data-proof-ready='true']", "timeout_ms": 20000 },
|
|
19
|
+
{
|
|
20
|
+
"type": "window_eval",
|
|
21
|
+
"label": "capture-route-active-state",
|
|
22
|
+
"timeout_ms": 10000,
|
|
23
|
+
"store_return_to": "__rpRouteExit.active",
|
|
24
|
+
"script": "const proof=window.__exampleRouteProof?.read?.()||{};const watched=['__exampleRouteProof','__exampleProofLastReceipt','exampleTouchState'];const activeGlobals=watched.filter((name)=>window[name]!==undefined);const out={ready:proof.ready===true,route:location.pathname,activeGlobals,activeGlobalCount:activeGlobals.length,receiptId:String(proof.receiptId||''),mode:String(proof.mode||'')};out.ok=out.ready===true&&out.activeGlobalCount>0;window.__rpRouteExit={...(window.__rpRouteExit||{}),active:out};return out;",
|
|
25
|
+
"return_summary_fields": [
|
|
26
|
+
{ "path": "ok" },
|
|
27
|
+
{ "path": "ready" },
|
|
28
|
+
{ "path": "route" },
|
|
29
|
+
{ "path": "activeGlobalCount" },
|
|
30
|
+
{ "path": "activeGlobals" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{ "type": "assert_window_value", "path": "__rpRouteExit.active.ok", "expected_value": true, "timeout_ms": 10000 },
|
|
34
|
+
{ "type": "screenshot", "label": "route-active-state", "mode": "viewport" },
|
|
35
|
+
{ "type": "click", "selector": "[data-testid='nav-home'], .nav-logo, a[href='/']", "timeout_ms": 10000 },
|
|
36
|
+
{ "type": "wait_for_selector", "selector": "[data-testid='home-page'], main, [data-route='home']", "timeout_ms": 20000 },
|
|
37
|
+
{
|
|
38
|
+
"type": "window_eval",
|
|
39
|
+
"label": "capture-route-exit-cleanup",
|
|
40
|
+
"timeout_ms": 10000,
|
|
41
|
+
"store_return_to": "__rpRouteExit.cleanup",
|
|
42
|
+
"script": "const watched=['__exampleRouteProof','__exampleProofLastReceipt','exampleTouchState'];const staleNames=watched.filter((name)=>window[name]!==undefined);const out={ok:location.pathname==='/'&&staleNames.length===0,route:location.pathname,staleNames,staleCount:staleNames.length};window.__rpRouteExit={...(window.__rpRouteExit||{}),cleanup:out};return out;",
|
|
43
|
+
"return_summary_fields": [
|
|
44
|
+
{ "path": "ok" },
|
|
45
|
+
{ "path": "route" },
|
|
46
|
+
{ "path": "staleCount" },
|
|
47
|
+
{ "path": "staleNames" }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{ "type": "assert_window_value", "path": "__rpRouteExit.cleanup.ok", "expected_value": true, "timeout_ms": 10000 },
|
|
51
|
+
{ "type": "assert_window_number", "path": "__rpRouteExit.cleanup.staleCount", "expected_value": 0, "timeout_ms": 10000 },
|
|
52
|
+
{ "type": "screenshot", "label": "home-after-route-exit-cleanup", "mode": "viewport" }
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"checks": [
|
|
56
|
+
{ "type": "route_loaded", "expected_path": "/" },
|
|
57
|
+
{ "type": "selector_visible", "selector": "[data-testid='home-page'], main, [data-route='home']" },
|
|
58
|
+
{ "type": "text_absent", "pattern": "\\bNaN\\b" },
|
|
59
|
+
{ "type": "text_absent", "pattern": "undefined", "flags": "i" },
|
|
60
|
+
{ "type": "text_absent", "pattern": "\\[object Object\\]" },
|
|
61
|
+
{ "type": "no_horizontal_overflow", "max_overflow_px": 1 },
|
|
62
|
+
{ "type": "no_mobile_horizontal_overflow", "max_overflow_px": 1 },
|
|
63
|
+
{ "type": "no_fatal_console_errors" },
|
|
64
|
+
{ "type": "no_console_warnings" }
|
|
65
|
+
],
|
|
66
|
+
"artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
|
|
67
|
+
"baseline_policy": "invariant_only",
|
|
68
|
+
"failure_policy": {
|
|
69
|
+
"environment_blocked": "neutral",
|
|
70
|
+
"proof_insufficient": "fail",
|
|
71
|
+
"product_regression": "fail"
|
|
72
|
+
},
|
|
73
|
+
"metadata": {
|
|
74
|
+
"pack_id": "state_hygiene",
|
|
75
|
+
"pack_public_name": "State Hygiene Pack",
|
|
76
|
+
"required_receipts": [
|
|
77
|
+
"active route-local proof helpers and route state receipt",
|
|
78
|
+
"route-exit affordance inventory before cleanup",
|
|
79
|
+
"route or mode exit action receipt through visible UI",
|
|
80
|
+
"post-cleanup stale-state inventory after route cleanup",
|
|
81
|
+
"screenshots at active and post-cleanup boundaries",
|
|
82
|
+
"console and warning accounting",
|
|
83
|
+
"proof JSON and artifact links"
|
|
84
|
+
],
|
|
85
|
+
"purpose": "Template for SPA route-exit hygiene profiles. Replace the example route, selectors, and watched globals with route-local proof helpers, receipts, timers, input state, or touch state that must exist while the feature route is active and must be removed after visible UI navigation returns home."
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# terminal-result-partial-evidence
|
|
2
|
+
|
|
3
|
+
Terminal Result Partial Evidence proof pack profile. Include this profile JSON directly in any profile-mode execution path.
|
|
4
|
+
|
|
5
|
+
## Proof claims and evidence roles
|
|
6
|
+
|
|
7
|
+
- evidence_role: `interaction_snapshots`
|
|
8
|
+
- atomic claim
|
|
9
|
+
- claim: partial terminal evidence path is honest when a run finishes in an error/timeout state.
|
|
10
|
+
- target: `/playground` console workflow.
|
|
11
|
+
- setup/actions: submit a terminal payload that returns partial evidence and capture pre-action and post-action result evidence.
|
|
12
|
+
- evidence: screenshot/log/ HAR indicators, status text polarity, and explicit no-failure copy checks.
|
|
13
|
+
- verdict: pass when terminal result markers align with the returned contract and all artifact classes are present.
|
|
14
|
+
- does not prove
|
|
15
|
+
- successful terminal execution path.
|
|
16
|
+
- correctness of backend command execution semantics.
|
|
17
|
+
- long-running timeout recovery workflows.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Load the profile JSON from `profile.json` and supply it to profile mode or a local runner input file.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.profile.v1",
|
|
3
|
+
"name": "terminal-result-partial-evidence",
|
|
4
|
+
"target": {
|
|
5
|
+
"route": "/playground",
|
|
6
|
+
"viewports": [
|
|
7
|
+
{ "name": "mobile", "width": 390, "height": 844 },
|
|
8
|
+
{ "name": "tablet", "width": 820, "height": 1180 },
|
|
9
|
+
{ "name": "desktop", "width": 1440, "height": 1000 }
|
|
10
|
+
],
|
|
11
|
+
"timeout_sec": 300,
|
|
12
|
+
"wait_ms": 800,
|
|
13
|
+
"network_mocks": [
|
|
14
|
+
{
|
|
15
|
+
"label": "api-console-sync-terminal-error-with-partial-evidence",
|
|
16
|
+
"url": "**/v1/run",
|
|
17
|
+
"method": "POST",
|
|
18
|
+
"status": 200,
|
|
19
|
+
"content_type": "application/json",
|
|
20
|
+
"required_hit_count": 3,
|
|
21
|
+
"max_hit_count": 3,
|
|
22
|
+
"capture_request_body": true,
|
|
23
|
+
"request_body_contains": [
|
|
24
|
+
"\"sync\":true",
|
|
25
|
+
"\"include\":[\"screenshots\",\"console\",\"har\"]",
|
|
26
|
+
"terminal-result-template-screenshot"
|
|
27
|
+
],
|
|
28
|
+
"json": {
|
|
29
|
+
"status": "completed_error",
|
|
30
|
+
"success": false,
|
|
31
|
+
"job_id": "job_terminal_result_template",
|
|
32
|
+
"error": {
|
|
33
|
+
"message": "Synthetic terminal result template failed after collecting partial evidence"
|
|
34
|
+
},
|
|
35
|
+
"screenshots": [
|
|
36
|
+
{
|
|
37
|
+
"name": "terminal-result-template-screenshot",
|
|
38
|
+
"url": "https://cdn.example.invalid/terminal-result-template-screenshot.png"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"console": [
|
|
42
|
+
{
|
|
43
|
+
"type": "log",
|
|
44
|
+
"text": "terminal result template collected console evidence"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"har": {
|
|
48
|
+
"log": {
|
|
49
|
+
"entries": [
|
|
50
|
+
{
|
|
51
|
+
"request": {
|
|
52
|
+
"method": "GET",
|
|
53
|
+
"url": "https://example.com/terminal-result-template-resource"
|
|
54
|
+
},
|
|
55
|
+
"response": {
|
|
56
|
+
"status": 500
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"billing": {
|
|
63
|
+
"actual_seconds": 30,
|
|
64
|
+
"cost_usd": 0.004
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"setup_actions": [
|
|
70
|
+
{ "type": "clear_storage", "storage": "both", "reload": true },
|
|
71
|
+
{ "type": "wait_for_selector", "selector": "[data-testid='api-console-page']", "timeout_ms": 30000 },
|
|
72
|
+
{ "type": "fill", "selector": "[data-testid='api-console-json']", "value": "{ \"steps\": [{ \"screenshot\": \"terminal-result-template-screenshot\" }], \"sync\": true, \"include\": [\"screenshots\", \"console\", \"har\"] }" },
|
|
73
|
+
{ "type": "clear_console" },
|
|
74
|
+
{ "type": "screenshot", "label": "terminal-result-before-submit" },
|
|
75
|
+
{ "type": "click", "selector": "[data-testid='run-api-console']", "text": "Run" },
|
|
76
|
+
{ "type": "wait_for_text", "selector": "body", "text": "Synthetic terminal result template failed after collecting partial evidence", "timeout_ms": 30000 },
|
|
77
|
+
{ "type": "wait_for_text", "selector": "body", "text": "partial results available", "timeout_ms": 30000 },
|
|
78
|
+
{ "type": "assert_text_visible", "selector": "body", "text": "terminal-result-template-screenshot", "timeout_ms": 5000 },
|
|
79
|
+
{ "type": "assert_text_visible", "selector": "body", "text": "terminal result template collected console evidence", "timeout_ms": 5000 },
|
|
80
|
+
{ "type": "assert_text_visible", "selector": "body", "text": "terminal-result-template-resource", "timeout_ms": 5000 },
|
|
81
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "Success", "timeout_ms": 1000 },
|
|
82
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "No screenshots captured", "timeout_ms": 1000 },
|
|
83
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "No console output captured", "timeout_ms": 1000 },
|
|
84
|
+
{ "type": "assert_text_absent", "selector": "body", "text": "No network requests captured", "timeout_ms": 1000 },
|
|
85
|
+
{ "type": "screenshot", "label": "terminal-result-partial-evidence-expanded" }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"checks": [
|
|
89
|
+
{ "type": "route_loaded", "expected_path": "/playground" },
|
|
90
|
+
{ "type": "selector_visible", "selector": "[data-testid='api-console-page']" },
|
|
91
|
+
{ "type": "text_visible", "text": "Error" },
|
|
92
|
+
{ "type": "text_visible", "text": "Synthetic terminal result template failed after collecting partial evidence" },
|
|
93
|
+
{ "type": "text_visible", "text": "partial results available" },
|
|
94
|
+
{ "type": "selector_text_visible", "selector": "[data-testid='api-console-screenshots']", "text": "terminal-result-template-screenshot" },
|
|
95
|
+
{ "type": "selector_text_visible", "selector": "[data-testid='api-console-output']", "text": "terminal result template collected console evidence" },
|
|
96
|
+
{ "type": "selector_text_visible", "selector": "[data-testid='api-console-har']", "text": "terminal-result-template-resource" },
|
|
97
|
+
{ "type": "text_absent", "text": "Success" },
|
|
98
|
+
{ "type": "text_absent", "text": "No screenshots captured" },
|
|
99
|
+
{ "type": "text_absent", "text": "No console output captured" },
|
|
100
|
+
{ "type": "text_absent", "text": "No network requests captured" },
|
|
101
|
+
{ "type": "text_absent", "text": "Application error" },
|
|
102
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='api-console-error-indicator']", "expected_count": 1 },
|
|
103
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='api-console-timeout-indicator']", "expected_count": 0 },
|
|
104
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='api-console-success-indicator']", "expected_count": 0 },
|
|
105
|
+
{ "type": "selector_count_equals", "selector": "[data-testid='api-console-screenshot-item']", "expected_count": 1 },
|
|
106
|
+
{ "type": "selector_count_at_least", "selector": "[data-testid='api-console-output']", "min_count": 1 },
|
|
107
|
+
{ "type": "selector_count_at_least", "selector": "[data-testid='api-console-har']", "min_count": 1 },
|
|
108
|
+
{ "type": "no_horizontal_overflow", "max_overflow_px": 1 },
|
|
109
|
+
{ "type": "no_fatal_console_errors" },
|
|
110
|
+
{ "type": "no_console_warnings" }
|
|
111
|
+
],
|
|
112
|
+
"artifacts": ["screenshot", "console", "dom_summary", "proof_json"],
|
|
113
|
+
"baseline_policy": "invariant_only",
|
|
114
|
+
"failure_policy": {
|
|
115
|
+
"environment_blocked": "neutral",
|
|
116
|
+
"proof_insufficient": "fail",
|
|
117
|
+
"product_regression": "fail"
|
|
118
|
+
},
|
|
119
|
+
"metadata": {
|
|
120
|
+
"purpose": "Template for API-console terminal result honesty: return a terminal error or timeout JSON response with partial screenshot, console, and HAR evidence; require visible status honesty, partial-results copy, each artifact class, correct success/error/timeout selector polarity, no contradictory empty-evidence copy, and clean browser evidence. For timeout variants, change the mocked status and visible status checks to the product's timeout indicator while preserving the same partial-evidence contract."
|
|
121
|
+
}
|
|
122
|
+
}
|