@riddledc/riddle-proof 0.7.125 → 0.7.127
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 +34 -2
- package/dist/{chunk-JVZWSI55.js → chunk-JLINSUKO.js} +460 -7
- package/dist/cli.cjs +478 -8
- package/dist/cli.js +19 -2
- package/dist/index.cjs +460 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/profile.cjs +460 -7
- package/dist/profile.d.cts +29 -1
- package/dist/profile.d.ts +29 -1
- package/dist/profile.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -346,6 +346,16 @@ cycle instead of reusing the final response, for example to repeat a fail-then-
|
|
|
346
346
|
success pair across multiple viewports. Repeated sequences also record
|
|
347
347
|
`sequence_cycle: true` after the first cycle.
|
|
348
348
|
|
|
349
|
+
For full viewport-matrix retry profiles, set `sequence_scope: "viewport"` when
|
|
350
|
+
each viewport should get its own first response, second response, and so on.
|
|
351
|
+
This keeps a fail-then-success retry sequence from being consumed by the first
|
|
352
|
+
viewport before phone or tablet runs begin. The mock evidence records both the
|
|
353
|
+
global `hit_index` and viewport-local `sequence_hit_index`, plus the active
|
|
354
|
+
`viewport`, so a run can show that each viewport exercised the same sequence.
|
|
355
|
+
Use `required_hit_count` when the total expected calls matter, such as
|
|
356
|
+
`responses.length * viewports.length` for a two-step retry across four
|
|
357
|
+
viewports.
|
|
358
|
+
|
|
349
359
|
Use `max_hit_count` / `max_hits` when a profile needs to prove a request does
|
|
350
360
|
not run too many times. Use `forbidden: true` as shorthand for
|
|
351
361
|
`max_hit_count: 0` and `required: false`, for example when a chat failure must
|
|
@@ -582,13 +592,35 @@ JSON, YAML, robots, sitemap, or other machine-readable endpoint:
|
|
|
582
592
|
}
|
|
583
593
|
```
|
|
584
594
|
|
|
595
|
+
For JSON responses, prefer `body_json_assertions` when the durable contract is
|
|
596
|
+
a field value rather than a raw substring:
|
|
597
|
+
|
|
598
|
+
```json
|
|
599
|
+
{
|
|
600
|
+
"type": "http_status",
|
|
601
|
+
"label": "proof artifact",
|
|
602
|
+
"url": "/proof/good-catches/artifacts/job_1234/proof.json.json",
|
|
603
|
+
"expected_status": 200,
|
|
604
|
+
"allowed_content_types": ["application/json"],
|
|
605
|
+
"body_json_assertions": [
|
|
606
|
+
{ "path": "status", "equals": "passed" },
|
|
607
|
+
{ "path": "checks[0].status", "equals": "passed" },
|
|
608
|
+
{ "path": "environment_blocker", "exists": false }
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
JSON paths support dot keys and array indexes such as `checks[0].status`, with
|
|
614
|
+
`$` as the root. Each assertion supports `exists`, `equals`, `not_equals`,
|
|
615
|
+
`contains`, and `type`.
|
|
616
|
+
|
|
585
617
|
`body_contains`, `body_patterns`, `body_not_contains`, and
|
|
586
618
|
`body_not_patterns` match the raw HTTP response body, not rendered browser
|
|
587
619
|
text. Use `text_visible` or `selector_text_visible` when CSS transforms,
|
|
588
620
|
hydration, client rendering, hidden elements, or layout-specific copy should be
|
|
589
621
|
judged exactly as the browser exposes it to users.
|
|
590
|
-
Hosted `summary.md` includes `http_status` body assertion pass counts
|
|
591
|
-
reviewer can see raw
|
|
622
|
+
Hosted `summary.md` includes `http_status` body and JSON assertion pass counts
|
|
623
|
+
so a reviewer can see raw response proof coverage without opening `proof.json`.
|
|
592
624
|
|
|
593
625
|
When the profile target is a mounted Riddle static Preview such as
|
|
594
626
|
`https://preview.riddledc.com/s/ps_1234abcd/docs/`, root-relative
|