@riddledc/riddle-proof 0.7.121 → 0.7.122
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
CHANGED
|
@@ -222,6 +222,7 @@ The package includes generic starter profiles:
|
|
|
222
222
|
- `examples/profiles/route-inventory-basic.json` for source-link and direct-route audits.
|
|
223
223
|
- `examples/profiles/handled-recovery-list-load.json` for failed or malformed list-load recovery profiles.
|
|
224
224
|
- `examples/profiles/handled-recovery-action-malformed-success.json` for action recovery profiles where the request succeeds at HTTP level but returns an unusable body.
|
|
225
|
+
- `examples/profiles/terminal-result-partial-evidence.json` for API-console terminal error or timeout receipts that preserve partial screenshot, console, and HAR evidence.
|
|
225
226
|
|
|
226
227
|
Copy one of those shapes into a repository profile directory and replace the
|
|
227
228
|
routes, selectors, mock URLs, and text checks with app-specific invariants.
|
|
@@ -254,6 +255,16 @@ message, captures a recovery screenshot, and keeps parser text plus browser
|
|
|
254
255
|
console/page errors out of the final proof. This catches action paths that look
|
|
255
256
|
recovered to a user but still poison the browser evidence stream.
|
|
256
257
|
|
|
258
|
+
For terminal result profiles, prove status honesty separately from artifact
|
|
259
|
+
presence. A page can preserve screenshots, console output, HAR, billing, and raw
|
|
260
|
+
response evidence while still lying about the terminal state or omitting that
|
|
261
|
+
the evidence is partial. Return a terminal `completed_error` or
|
|
262
|
+
`completed_timeout` response with partial evidence, require the visible status
|
|
263
|
+
and `partial results available` copy, assert each artifact class, reject Success
|
|
264
|
+
and contradictory empty-evidence copy, assert success/error/timeout selector
|
|
265
|
+
polarity, and keep `no_horizontal_overflow`, `no_fatal_console_errors`, and
|
|
266
|
+
`no_console_warnings` in the same profile.
|
|
267
|
+
|
|
257
268
|
Checks normally apply to every captured viewport. Add `viewports` (or
|
|
258
269
|
`viewport_names`) to a check when responsive UI intentionally exposes an
|
|
259
270
|
invariant only on named viewports, such as desktop-only helper copy while phone
|
|
@@ -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;
|
|
@@ -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
|
+
}
|