@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RiddleDC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# @riddledc/riddle-proof-packs
|
|
2
|
+
|
|
3
|
+
Reusable starter profile definitions and proof-pack metadata for Riddle Proof.
|
|
4
|
+
|
|
5
|
+
## Exports
|
|
6
|
+
|
|
7
|
+
- `RIDDLE_PROOF_PACK_PROFILES`:
|
|
8
|
+
- Canonical profile map keyed by profile name.
|
|
9
|
+
- `RIDDLE_PROOF_PACK_MANIFEST`:
|
|
10
|
+
- Array of normalized profile entries with optional `pack_id`, `pack_public_name`, `required_receipts`, and `purpose` metadata.
|
|
11
|
+
- `listRiddleProofPackProfiles()`:
|
|
12
|
+
- Returns all normalized profile manifests.
|
|
13
|
+
- `listRiddleProofPacks()`:
|
|
14
|
+
- Alias for pack listing used by downstream CLI helpers.
|
|
15
|
+
- `getRiddleProofPackProfile(name)`:
|
|
16
|
+
- Fetch a profile by name.
|
|
17
|
+
- `getRiddleProofProfilesByPackId(packId)`:
|
|
18
|
+
- Fetch all profiles tagged with a given pack id.
|
|
19
|
+
- `getPackEnabledRiddleProofPackProfiles()`:
|
|
20
|
+
- Filter manifest entries that include a pack id.
|
|
21
|
+
- `getRiddleProofPackProfileManifest(name)`:
|
|
22
|
+
- Fetch full profile manifest including `sourcePath`, `packPublicName`, and metadata.
|
|
23
|
+
- `getRiddleProofPackProfileByPackId(packId)`:
|
|
24
|
+
- Returns first manifest entry for a matching `pack_id`.
|
|
25
|
+
- `instantiateRiddleProofProfile(name, options)`:
|
|
26
|
+
- Returns a copy of a profile with optional `url`, `route`, and `target` overrides.
|
|
27
|
+
|
|
28
|
+
## Proof claims and evidence roles
|
|
29
|
+
|
|
30
|
+
Riddle Proof proves claims about a running browser/app target. A before/after change proof is one pattern built from smaller proof claims, not the core proof primitive.
|
|
31
|
+
|
|
32
|
+
### 1) Atomic proof
|
|
33
|
+
|
|
34
|
+
An atomic proof is the base unit:
|
|
35
|
+
|
|
36
|
+
- **claim**
|
|
37
|
+
- What the profile is asserting.
|
|
38
|
+
- **target**
|
|
39
|
+
- The URL/route/runtime state that is being tested.
|
|
40
|
+
- **setup/actions**
|
|
41
|
+
- The steps that drive the target to the evidence-bearing state.
|
|
42
|
+
- **evidence**
|
|
43
|
+
- Screenshots, assertions, console/HAR, route text, DOM checks, and any explicit output.
|
|
44
|
+
- **verdict**
|
|
45
|
+
- Pass/fail/review status based on whether each atomic evidence receipt is present and valid.
|
|
46
|
+
|
|
47
|
+
### 2) Evidence-role patterns
|
|
48
|
+
|
|
49
|
+
- `current_target` (current-target audit)
|
|
50
|
+
- One deployed/preview target. No implementation diff artifacts are required. No measured before/after visual delta is required.
|
|
51
|
+
- `reference_candidate` (reference/candidate change proof)
|
|
52
|
+
- Reference/prod/baseline evidence plus candidate/after evidence is compared inside the same workflow. Comparison supports a change claim.
|
|
53
|
+
- `interaction_snapshots` (interaction proof)
|
|
54
|
+
- A pre-action and post-action snapshot set is collected in one proof run, e.g. before clicking Play and after clicking Play.
|
|
55
|
+
|
|
56
|
+
### 3) Naming guidance
|
|
57
|
+
|
|
58
|
+
- Avoid using `before/after` alone in user-facing docs when describing proof purpose.
|
|
59
|
+
- Prefer:
|
|
60
|
+
- `reference_candidate` for change/variance proofs.
|
|
61
|
+
- `pre-action` / `post-action` for snapshots in a single run.
|
|
62
|
+
- `current_target` for audit/profile/no-diff proofs.
|
|
63
|
+
- If you encounter `before_cdn` / `after_cdn` in existing payloads, treat those as legacy artifact role names in the change workflow, not as universal proof terminology.
|
|
64
|
+
|
|
65
|
+
### 4) Pack/report declarations
|
|
66
|
+
|
|
67
|
+
Each proof pack sample report should state:
|
|
68
|
+
|
|
69
|
+
- Which evidence-role pattern it uses (`current_target`, `reference_candidate`, or `interaction_snapshots`).
|
|
70
|
+
- What the pack does **not** prove.
|
|
71
|
+
|
|
72
|
+
Profiles are stored under `packs/<slug>/profile.json` and mirrored into the runtime exports.
|
|
73
|
+
|
|
74
|
+
## Bundled profiles
|
|
75
|
+
|
|
76
|
+
- `page-content-basic`
|
|
77
|
+
- `route-inventory-basic`
|
|
78
|
+
- `handled-recovery-list-load`
|
|
79
|
+
- `handled-recovery-action-malformed-success`
|
|
80
|
+
- `terminal-result-partial-evidence`
|
|
81
|
+
- `gameplay-window-call-until`
|
|
82
|
+
- `spa-route-exit-state-hygiene`
|
|
83
|
+
- `canvas-gameplay`
|
|
84
|
+
- `mobile-layout-smoke`
|
|
85
|
+
- `auth-smoke`
|
|
86
|
+
|
|
87
|
+
## Usage
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
import {
|
|
91
|
+
getRiddleProofPackProfile,
|
|
92
|
+
getRiddleProofProfilesByPackId,
|
|
93
|
+
instantiateRiddleProofProfile,
|
|
94
|
+
} from "@riddledc/riddle-proof-packs";
|
|
95
|
+
|
|
96
|
+
const profile = getRiddleProofPackProfile("spa-route-exit-state-hygiene");
|
|
97
|
+
if (!profile) throw new Error("missing profile");
|
|
98
|
+
|
|
99
|
+
const hygieneProfiles = getRiddleProofProfilesByPackId("state_hygiene");
|
|
100
|
+
const instantiated = instantiateRiddleProofProfile("mobile-layout-smoke", {
|
|
101
|
+
url: "https://example.com",
|
|
102
|
+
route: "/",
|
|
103
|
+
target: { wait_for_selector: "body" },
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
console.log("Using profile", instantiated.name);
|
|
107
|
+
```
|