@riddledc/riddle-proof 0.8.76 → 0.8.78
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 +74 -5
- package/dist/advanced/index.d.cts +1 -1
- package/dist/advanced/index.d.ts +1 -1
- package/dist/advanced/proof-run-engine.d.cts +1 -1
- package/dist/advanced/proof-run-engine.d.ts +1 -1
- package/dist/change-proof.cjs +991 -7
- package/dist/change-proof.d.cts +157 -1
- package/dist/change-proof.d.ts +157 -1
- package/dist/change-proof.js +25 -3
- package/dist/{chunk-B2DP2LET.js → chunk-5IFZSUPF.js} +52 -13
- package/dist/chunk-6VFS2JFR.js +886 -0
- package/dist/{chunk-CWRIXP5H.js → chunk-7N6X54WG.js} +181 -17
- package/dist/{chunk-GG2D3MFZ.js → chunk-FCSJZBC5.js} +26 -1
- package/dist/{chunk-AK2EPEVO.js → chunk-HSGZV2NK.js} +221 -63
- package/dist/chunk-MEVVL4TI.js +258 -0
- package/dist/{chunk-UE4I7RTI.js → chunk-RQPCKRKT.js} +1 -1
- package/dist/cli/index.js +7 -6
- package/dist/cli.cjs +1678 -361
- package/dist/cli.js +7 -6
- package/dist/index.cjs +1242 -42
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +46 -10
- package/dist/pr-comment.cjs +481 -17
- package/dist/pr-comment.d.cts +6 -1
- package/dist/pr-comment.d.ts +6 -1
- package/dist/pr-comment.js +6 -1
- package/dist/profile/index.cjs +26 -1
- package/dist/profile/index.js +1 -1
- package/dist/profile-suggestions.js +2 -2
- package/dist/profile.cjs +26 -1
- package/dist/profile.d.cts +7 -0
- package/dist/profile.d.ts +7 -0
- package/dist/profile.js +1 -1
- package/dist/{proof-run-engine-MiKZt9oY.d.ts → proof-run-engine-CsQshTUX.d.ts} +3 -3
- package/dist/{proof-run-engine-Baiv6l3A.d.cts → proof-run-engine-DmUqh7Cw.d.cts} +3 -3
- package/dist/proof-run-engine.d.cts +1 -1
- package/dist/proof-run-engine.d.ts +1 -1
- package/dist/receipts.cjs +286 -0
- package/dist/receipts.d.cts +115 -0
- package/dist/receipts.d.ts +115 -0
- package/dist/receipts.js +15 -0
- package/dist/riddle-client.cjs +98 -13
- package/dist/riddle-client.d.cts +18 -5
- package/dist/riddle-client.d.ts +18 -5
- package/dist/riddle-client.js +4 -1
- package/dist/runtime/index.cjs +98 -13
- package/dist/runtime/index.d.cts +5 -1
- package/dist/runtime/index.d.ts +5 -1
- package/dist/runtime/index.js +4 -1
- package/dist/runtime/riddle-client.cjs +98 -13
- package/dist/runtime/riddle-client.d.cts +5 -1
- package/dist/runtime/riddle-client.d.ts +5 -1
- package/dist/runtime/riddle-client.js +4 -1
- package/package.json +7 -2
- package/dist/chunk-6S7DZWVC.js +0 -167
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ import { runRiddleProof } from "@riddledc/riddle-proof/runner";
|
|
|
50
50
|
import { createCaptureDiagnostic } from "@riddledc/riddle-proof/diagnostics";
|
|
51
51
|
import { toRiddleProofRunParams } from "@riddledc/riddle-proof/openclaw";
|
|
52
52
|
import { assessRiddleProofChange } from "@riddledc/riddle-proof/change-proof";
|
|
53
|
+
import { createRiddleProofObservationReceipt } from "@riddledc/riddle-proof/receipts";
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
The root export provides generic contracts and helpers. Integration-specific
|
|
@@ -57,6 +58,35 @@ adapters are exposed through subpaths such as
|
|
|
57
58
|
`@riddledc/riddle-proof/openclaw`, so wrappers can reuse the mapping logic
|
|
58
59
|
without depending on another plugin runtime.
|
|
59
60
|
|
|
61
|
+
### Compositional Receipts
|
|
62
|
+
|
|
63
|
+
Riddle records four different facts instead of flattening every run into one
|
|
64
|
+
surface label:
|
|
65
|
+
|
|
66
|
+
- `riddle.preview-receipt.v1` identifies immutable deployed content by Preview
|
|
67
|
+
ID, URL, expiration, content digest, and source Git identity.
|
|
68
|
+
- `riddle-proof.observation-receipt.v1` records an executor, target, comparison
|
|
69
|
+
role, artifacts, optional profile result, publication, and execution telemetry.
|
|
70
|
+
- `riddle-proof.change-receipt.v2` composes before and after Observation
|
|
71
|
+
receipts and evaluates only the declared delta and source-binding contract.
|
|
72
|
+
- `riddle-proof.handoff-receipt.v1` projects the Change verdict,
|
|
73
|
+
recommendation, and canonical screenshot pair for GitHub or another consumer.
|
|
74
|
+
|
|
75
|
+
Executor (`local_playwright`, `riddle_hosted`, or direct collection), target
|
|
76
|
+
(`url` or `preview`), proof contract, comparison role, publication, and source
|
|
77
|
+
identity are independent dimensions. A merge recommendation is evidence-based
|
|
78
|
+
advice; it does not grant shipping authorization.
|
|
79
|
+
|
|
80
|
+
Persist a deploy result and its immutable receipt for later Change Proof input:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
riddle-proof-loop riddle-preview-deploy build pr-123 --framework spa \
|
|
84
|
+
--output artifacts/riddle-proof/pr-123-preview
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
When the hosted service returns a receipt, this writes both
|
|
88
|
+
`preview-deploy-result.json` and `preview-receipt.json`.
|
|
89
|
+
|
|
60
90
|
### Change Proof Contracts
|
|
61
91
|
|
|
62
92
|
Use `assessRiddleProofChange` when one proof needs to compose two profile
|
|
@@ -86,6 +116,27 @@ group may be `passed` or `product_regression`, while the after group must be
|
|
|
86
116
|
`proof_insufficient`, and a missing or failed required delta cannot become a
|
|
87
117
|
passing change proof.
|
|
88
118
|
|
|
119
|
+
For a Preview-backed after state, require the immutable receipt and expected
|
|
120
|
+
revision in the change contract/input. Missing, dirty, digest-free, mismatched,
|
|
121
|
+
or expired required Preview evidence collapses to `proof_insufficient`:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
const result = assessRiddleProofChange({
|
|
125
|
+
name: "Hero art appears after change",
|
|
126
|
+
source_binding: { after: { preview_receipt_required: true } },
|
|
127
|
+
deltas: [{
|
|
128
|
+
type: "check_status_transition",
|
|
129
|
+
check_label: "hero-art-visible",
|
|
130
|
+
before_status: "failed",
|
|
131
|
+
after_status: "passed",
|
|
132
|
+
}],
|
|
133
|
+
}, {
|
|
134
|
+
before_observation: beforeObservation,
|
|
135
|
+
after_observation: afterObservation,
|
|
136
|
+
expected_source_revisions: { after: pullRequestHeadSha },
|
|
137
|
+
});
|
|
138
|
+
```
|
|
139
|
+
|
|
89
140
|
The CLI can collect the two sides against hosted Riddle targets and write one
|
|
90
141
|
change receipt:
|
|
91
142
|
|
|
@@ -95,6 +146,8 @@ riddle-proof-loop run-change-proof \
|
|
|
95
146
|
--change-contract .riddle-proof/change-contracts/hero-art-change.json \
|
|
96
147
|
--before-url https://example.com \
|
|
97
148
|
--after-url https://preview.example.com \
|
|
149
|
+
--after-preview-receipt artifacts/preview/preview-receipt.json \
|
|
150
|
+
--after-source-revision "$PR_HEAD_SHA" \
|
|
98
151
|
--output artifacts/riddle-proof/hero-art-change
|
|
99
152
|
```
|
|
100
153
|
|
|
@@ -109,11 +162,25 @@ riddle-proof-loop run-change-proof \
|
|
|
109
162
|
--result-format compact-json
|
|
110
163
|
```
|
|
111
164
|
|
|
165
|
+
Prefer `--before-observation` and `--after-observation` when source identity,
|
|
166
|
+
Preview binding, executor, publication, or hosted telemetry matters. Use
|
|
167
|
+
`--before-source-revision` and `--after-source-revision` to bind the comparison
|
|
168
|
+
to the expected commits.
|
|
169
|
+
|
|
112
170
|
When `--output` / `--output-dir` is set, the command writes
|
|
113
|
-
`change-proof-result.json`, `
|
|
114
|
-
`
|
|
115
|
-
|
|
116
|
-
|
|
171
|
+
`change-proof-result.json`, `change-proof-receipt.json`,
|
|
172
|
+
`change-proof-receipt.md`, `change-proof-receipt.html`,
|
|
173
|
+
`handoff-receipt.json`, `handoff-receipt.md`, `summary.md`, and
|
|
174
|
+
normalized copies of the `before/profile-result.json` and
|
|
175
|
+
`after/profile-result.json` inputs plus each side's `observation-receipt.json`.
|
|
176
|
+
The receipt files are the human-facing
|
|
177
|
+
handoff: they show the before/after evidence pair, delta verdicts, screenshot
|
|
178
|
+
links when hosted artifacts are available, explicit proof claims from
|
|
179
|
+
`metadata.required_receipts`, and limits from `metadata.does_not_prove`.
|
|
180
|
+
`riddle-proof-loop pr-comment --proof-dir <dir>` recognizes the receipt JSON
|
|
181
|
+
and uses it as the PR review summary. A non-passing change proof exits nonzero
|
|
182
|
+
so CI and on-demand PR automation can use the receipt as a gate without running
|
|
183
|
+
noisy scheduled workflows.
|
|
117
184
|
|
|
118
185
|
For a small hosted-preview dogfood target, see
|
|
119
186
|
`examples/profiles/hosted-change-proof-preview.json` and
|
|
@@ -1242,7 +1309,9 @@ human progress lines to stderr while waiting. The JSON result includes
|
|
|
1242
1309
|
`poll.timed_out`, `poll.elapsed_ms`, `poll.queue_elapsed_ms`,
|
|
1243
1310
|
`poll.pre_submission_elapsed_ms`, and `poll.running_without_submission` so
|
|
1244
1311
|
delayed dispatch is distinguishable from a terminal proof failure.
|
|
1245
|
-
|
|
1312
|
+
The progress snapshot also records the hosted `phase` and execution timestamps.
|
|
1313
|
+
`queue_elapsed_ms` ends when a worker claims the job; active browser execution
|
|
1314
|
+
is reported separately instead of being described as queue waiting.
|
|
1246
1315
|
`pre_submission_elapsed_ms` preserves how long the CLI actually observed the
|
|
1247
1316
|
job before `submitted_at` appeared. If `--wait` exhausts its attempts before a
|
|
1248
1317
|
terminal job status, the command exits non-zero and the result explains the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { b as runner } from '../runner-4LJ5z0D-.cjs';
|
|
2
2
|
export { l as engineHarness } from '../engine-harness-LBfqbFSe.cjs';
|
|
3
3
|
export { p as proofRunCore } from '../proof-run-core-7Dqm7RKM.cjs';
|
|
4
|
-
export { p as proofRunEngine } from '../proof-run-engine-
|
|
4
|
+
export { p as proofRunEngine } from '../proof-run-engine-DmUqh7Cw.cjs';
|
|
5
5
|
import '../types.cjs';
|
|
6
6
|
import '../public-state.cjs';
|
package/dist/advanced/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { b as runner } from '../runner-BdQpOkZD.js';
|
|
2
2
|
export { l as engineHarness } from '../engine-harness-CMACHP6A.js';
|
|
3
3
|
export { p as proofRunCore } from '../proof-run-core-7Dqm7RKM.js';
|
|
4
|
-
export { p as proofRunEngine } from '../proof-run-engine-
|
|
4
|
+
export { p as proofRunEngine } from '../proof-run-engine-CsQshTUX.js';
|
|
5
5
|
import '../types.js';
|
|
6
6
|
import '../public-state.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-
|
|
1
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-DmUqh7Cw.cjs';
|
|
2
2
|
import '../proof-run-core-7Dqm7RKM.cjs';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-
|
|
1
|
+
export { R as RiddleProofEngine, c as createRiddleProofEngine, e as executeWorkflow } from '../proof-run-engine-CsQshTUX.js';
|
|
2
2
|
import '../proof-run-core-7Dqm7RKM.js';
|