@riddledc/riddle-proof 0.7.119 → 0.7.120

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
@@ -202,7 +202,7 @@ The package includes generic starter profiles:
202
202
 
203
203
  - `examples/profiles/page-content-basic.json` for route/content/layout smoke profiles.
204
204
  - `examples/profiles/route-inventory-basic.json` for source-link and direct-route audits.
205
- - `examples/profiles/handled-recovery-list-load.json` for malformed list-load recovery profiles.
205
+ - `examples/profiles/handled-recovery-list-load.json` for failed or malformed list-load recovery profiles.
206
206
  - `examples/profiles/handled-recovery-action-malformed-success.json` for action recovery profiles where the request succeeds at HTTP level but returns an unusable body.
207
207
 
208
208
  Copy one of those shapes into a repository profile directory and replace the
@@ -210,13 +210,19 @@ routes, selectors, mock URLs, and text checks with app-specific invariants.
210
210
 
211
211
  For handled recovery profiles, prefer proving the whole boundary instead of
212
212
  only checking that an error message appears. Mock one dependent endpoint into a
213
- malformed or failed response, keep independent endpoints healthy, and assert
214
- that the page still renders the independent evidence. Capture a setup
213
+ failed HTTP response, transport failure, or malformed body, keep independent
214
+ endpoints healthy, and assert that the page still renders the independent
215
+ evidence. For idempotent GET mocks, use `required_hit_count` to prove the mock
216
+ was exercised, but avoid `max_hit_count` unless exact request count is itself
217
+ the product contract; multi-viewport runs, React Strict Mode, retries, and
218
+ client refreshes can legitimately call the same GET more than once. Capture a setup
215
219
  screenshot immediately after the recovery state appears, before high-risk
216
220
  absence assertions, so failing runs keep durable visual evidence. Then reject
217
- raw parser text such as `SyntaxError`, `Expected property name`, and
218
- `[object Object]`; reject contradictory empty-state copy such as `No items yet`
219
- when the list failed to load; and keep `no_fatal_console_errors` plus
221
+ raw backend text and error codes as well as parser text such as `SyntaxError`,
222
+ `Expected property name`, and `[object Object]`; reject contradictory empty-state
223
+ copy such as `No items yet` when the list failed to load; require the failed
224
+ list's explicit unavailable message and error element count; and keep
225
+ `no_fatal_console_errors` plus
220
226
  `no_console_warnings` in the final checks. This pattern catches both visible
221
227
  recovery-quality bugs and hidden browser-health debt without requiring a
222
228
  separate CI or wrapper-specific path.
@@ -40,13 +40,15 @@
40
40
  }
41
41
  },
42
42
  {
43
- "label": "saved-items-malformed-load",
43
+ "label": "saved-items-unavailable-load",
44
44
  "url": "**/api/saved-items",
45
45
  "method": "GET",
46
- "status": 200,
46
+ "status": 503,
47
47
  "content_type": "application/json",
48
48
  "required_hit_count": 3,
49
- "body": "{not valid saved items json"
49
+ "json": {
50
+ "error": "Synthetic saved items unavailable"
51
+ }
50
52
  }
51
53
  ],
52
54
  "setup_actions": [
@@ -57,6 +59,8 @@
57
59
  { "type": "wait_for_text", "selector": "body", "text": "Failed to load saved items", "timeout_ms": 30000 },
58
60
  { "type": "screenshot", "label": "saved-items-malformed-load-visible-recovery" },
59
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 },
60
64
  { "type": "assert_text_absent", "selector": "body", "text": "Expected property name", "timeout_ms": 1000 },
61
65
  { "type": "assert_text_absent", "selector": "body", "text": "SyntaxError", "timeout_ms": 1000 },
62
66
  { "type": "assert_text_absent", "selector": "body", "text": "[object Object]", "timeout_ms": 1000 }
@@ -71,6 +75,8 @@
71
75
  { "type": "text_visible", "text": "job_recovery_template_survives" },
72
76
  { "type": "text_visible", "text": "Failed to load saved items" },
73
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" },
74
80
  { "type": "text_absent", "text": "Expected property name" },
75
81
  { "type": "text_absent", "text": "SyntaxError" },
76
82
  { "type": "text_absent", "text": "[object Object]" },
@@ -90,6 +96,6 @@
90
96
  "product_regression": "fail"
91
97
  },
92
98
  "metadata": {
93
- "purpose": "Template for handled malformed list-load recovery: prove independent page data still renders, the failed list shows one recovery message, contradictory empty-state copy and raw parser text stay absent, and browser console evidence remains clean."
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."
94
100
  }
95
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.119",
3
+ "version": "0.7.120",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",