@riddledc/riddle-proof 0.7.225 → 0.7.227
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/dist/adapters/codex-exec-agent.cjs +893 -0
- package/dist/adapters/codex-exec-agent.d.cts +3 -0
- package/dist/adapters/codex-exec-agent.d.ts +3 -0
- package/dist/adapters/codex-exec-agent.js +13 -0
- package/dist/adapters/codex.cjs +893 -0
- package/dist/adapters/codex.d.cts +3 -0
- package/dist/adapters/codex.d.ts +3 -0
- package/dist/adapters/codex.js +13 -0
- package/dist/adapters/local-agent.cjs +893 -0
- package/dist/adapters/local-agent.d.cts +3 -0
- package/dist/adapters/local-agent.d.ts +3 -0
- package/dist/adapters/local-agent.js +13 -0
- package/dist/adapters/openclaw.cjs +213 -0
- package/dist/adapters/openclaw.d.cts +2 -0
- package/dist/adapters/openclaw.d.ts +2 -0
- package/dist/adapters/openclaw.js +17 -0
- package/dist/advanced/engine-harness.cjs +5701 -0
- package/dist/advanced/engine-harness.d.cts +2 -0
- package/dist/advanced/engine-harness.d.ts +2 -0
- package/dist/advanced/engine-harness.js +16 -0
- package/dist/advanced/index.cjs +6242 -0
- package/dist/advanced/index.d.cts +5 -0
- package/dist/advanced/index.d.ts +5 -0
- package/dist/advanced/index.js +23 -0
- package/dist/advanced/proof-run-core.cjs +1085 -0
- package/dist/advanced/proof-run-core.d.cts +1 -0
- package/dist/advanced/proof-run-core.d.ts +1 -0
- package/dist/advanced/proof-run-core.js +59 -0
- package/dist/advanced/proof-run-engine.cjs +2905 -0
- package/dist/advanced/proof-run-engine.d.cts +2 -0
- package/dist/advanced/proof-run-engine.d.ts +2 -0
- package/dist/advanced/proof-run-engine.js +10 -0
- package/dist/advanced/runner.cjs +833 -0
- package/dist/advanced/runner.d.cts +2 -0
- package/dist/advanced/runner.d.ts +2 -0
- package/dist/advanced/runner.js +12 -0
- package/dist/app-contract/index.cjs +24 -0
- package/dist/app-contract/index.d.cts +1 -0
- package/dist/app-contract/index.d.ts +1 -0
- package/dist/app-contract/index.js +2 -0
- package/dist/basic-gameplay.js +1 -0
- package/dist/checkpoint.js +1 -0
- package/dist/chunk-BHL4JSGM.js +1900 -0
- package/dist/chunk-BTN76IGW.js +115 -0
- package/dist/{chunk-TGHTM66Z.js → chunk-COERZX63.js} +10 -2
- package/dist/{chunk-4DRRIJDX.js → chunk-IWLQQ5S5.js} +27 -4
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-OFSECTSC.js +0 -0
- package/dist/{chunk-GBVEQQIM.js → chunk-TJ63IE65.js} +36 -1
- package/dist/chunk-VZD5LH7U.js +4138 -0
- package/dist/cli/index.cjs +18 -0
- package/dist/cli/index.d.cts +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +12 -0
- package/dist/cli.cjs +19 -2
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +8 -4139
- package/dist/codex-exec-agent.d.cts +1 -1
- package/dist/codex-exec-agent.d.ts +1 -1
- package/dist/codex-exec-agent.js +1 -0
- package/dist/diagnostics.js +1 -0
- package/dist/engine-harness-CMACHP6A.d.ts +96 -0
- package/dist/engine-harness-LBfqbFSe.d.cts +96 -0
- package/dist/engine-harness.cjs +19 -2
- package/dist/engine-harness.d.cts +2 -79
- package/dist/engine-harness.d.ts +2 -79
- package/dist/engine-harness.js +3 -2
- package/dist/index.cjs +19 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -3
- package/dist/local-agent.d.cts +1 -1
- package/dist/local-agent.d.ts +1 -1
- package/dist/local-agent.js +1 -0
- package/dist/openclaw.js +8 -107
- package/dist/playability.js +1 -0
- package/dist/profile/index.cjs +9403 -0
- package/dist/profile/index.d.cts +2 -0
- package/dist/profile/index.d.ts +2 -0
- package/dist/profile/index.js +53 -0
- package/dist/profile.js +1 -0
- package/dist/proof-run-core-CE0jx7wL.d.cts +359 -0
- package/dist/proof-run-core-CE0jx7wL.d.ts +359 -0
- package/dist/proof-run-core.d.cts +1 -322
- package/dist/proof-run-core.d.ts +1 -322
- package/dist/proof-run-core.js +2 -1
- package/dist/proof-run-engine-CSSc0mNn.d.ts +764 -0
- package/dist/proof-run-engine-HSRpUeBi.d.cts +764 -0
- package/dist/proof-run-engine.cjs +4 -0
- package/dist/proof-run-engine.d.cts +2 -757
- package/dist/proof-run-engine.d.ts +2 -757
- package/dist/proof-run-engine.js +5 -1881
- package/dist/proof-session.js +1 -0
- package/dist/result.js +1 -0
- package/dist/riddle-client.js +1 -0
- package/dist/run-card.js +1 -0
- package/dist/runner-4LJ5z0D-.d.cts +29 -0
- package/dist/runner-BdQpOkZD.d.ts +29 -0
- package/dist/runner.d.cts +2 -22
- package/dist/runner.d.ts +2 -22
- package/dist/runner.js +3 -2
- package/dist/runtime/index.cjs +528 -0
- package/dist/runtime/index.d.cts +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +37 -0
- package/dist/runtime/riddle-client.cjs +528 -0
- package/dist/runtime/riddle-client.d.cts +1 -0
- package/dist/runtime/riddle-client.d.ts +1 -0
- package/dist/runtime/riddle-client.js +37 -0
- package/dist/spec/checkpoint.cjs +807 -0
- package/dist/spec/checkpoint.d.cts +2 -0
- package/dist/spec/checkpoint.d.ts +2 -0
- package/dist/spec/checkpoint.js +34 -0
- package/dist/spec/index.cjs +1510 -0
- package/dist/spec/index.d.cts +5 -0
- package/dist/spec/index.d.ts +5 -0
- package/dist/spec/index.js +80 -0
- package/dist/spec/result.cjs +259 -0
- package/dist/spec/result.d.cts +2 -0
- package/dist/spec/result.d.ts +2 -0
- package/dist/spec/result.js +21 -0
- package/dist/spec/run-card.cjs +287 -0
- package/dist/spec/run-card.d.cts +2 -0
- package/dist/spec/run-card.d.ts +2 -0
- package/dist/spec/run-card.js +11 -0
- package/dist/spec/state.cjs +541 -0
- package/dist/spec/state.d.cts +2 -0
- package/dist/spec/state.d.ts +2 -0
- package/dist/spec/state.js +28 -0
- package/dist/spec/types.cjs +18 -0
- package/dist/spec/types.d.cts +1 -0
- package/dist/spec/types.d.ts +1 -0
- package/dist/spec/types.js +1 -0
- package/dist/state.js +1 -0
- package/package.json +95 -2
- package/runtime/lib/verify.py +53 -3
- package/runtime/pipelines/riddle-proof-setup.lobster +45 -41
- package/runtime/tests/recon_verify_smoke.py +41 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riddledc/riddle-proof",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.227",
|
|
4
4
|
"description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RiddleDC",
|
|
@@ -54,6 +54,36 @@
|
|
|
54
54
|
"import": "./dist/engine-harness.js",
|
|
55
55
|
"require": "./dist/engine-harness.cjs"
|
|
56
56
|
},
|
|
57
|
+
"./spec": {
|
|
58
|
+
"types": "./dist/spec/index.d.ts",
|
|
59
|
+
"import": "./dist/spec/index.js",
|
|
60
|
+
"require": "./dist/spec/index.cjs"
|
|
61
|
+
},
|
|
62
|
+
"./spec/types": {
|
|
63
|
+
"types": "./dist/spec/types.d.ts",
|
|
64
|
+
"import": "./dist/spec/types.js",
|
|
65
|
+
"require": "./dist/spec/types.cjs"
|
|
66
|
+
},
|
|
67
|
+
"./spec/result": {
|
|
68
|
+
"types": "./dist/spec/result.d.ts",
|
|
69
|
+
"import": "./dist/spec/result.js",
|
|
70
|
+
"require": "./dist/spec/result.cjs"
|
|
71
|
+
},
|
|
72
|
+
"./spec/state": {
|
|
73
|
+
"types": "./dist/spec/state.d.ts",
|
|
74
|
+
"import": "./dist/spec/state.js",
|
|
75
|
+
"require": "./dist/spec/state.cjs"
|
|
76
|
+
},
|
|
77
|
+
"./spec/checkpoint": {
|
|
78
|
+
"types": "./dist/spec/checkpoint.d.ts",
|
|
79
|
+
"import": "./dist/spec/checkpoint.js",
|
|
80
|
+
"require": "./dist/spec/checkpoint.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./spec/run-card": {
|
|
83
|
+
"types": "./dist/spec/run-card.d.ts",
|
|
84
|
+
"import": "./dist/spec/run-card.js",
|
|
85
|
+
"require": "./dist/spec/run-card.cjs"
|
|
86
|
+
},
|
|
57
87
|
"./codex-exec-agent": {
|
|
58
88
|
"types": "./dist/codex-exec-agent.d.ts",
|
|
59
89
|
"import": "./dist/codex-exec-agent.js",
|
|
@@ -108,6 +138,66 @@
|
|
|
108
138
|
"types": "./dist/riddle-client.d.ts",
|
|
109
139
|
"import": "./dist/riddle-client.js",
|
|
110
140
|
"require": "./dist/riddle-client.cjs"
|
|
141
|
+
},
|
|
142
|
+
"./runtime": {
|
|
143
|
+
"types": "./dist/runtime/index.d.ts",
|
|
144
|
+
"import": "./dist/runtime/index.js",
|
|
145
|
+
"require": "./dist/runtime/index.cjs"
|
|
146
|
+
},
|
|
147
|
+
"./runtime/riddle-client": {
|
|
148
|
+
"types": "./dist/runtime/riddle-client.d.ts",
|
|
149
|
+
"import": "./dist/runtime/riddle-client.js",
|
|
150
|
+
"require": "./dist/runtime/riddle-client.cjs"
|
|
151
|
+
},
|
|
152
|
+
"./advanced": {
|
|
153
|
+
"types": "./dist/advanced/index.d.ts",
|
|
154
|
+
"import": "./dist/advanced/index.js",
|
|
155
|
+
"require": "./dist/advanced/index.cjs"
|
|
156
|
+
},
|
|
157
|
+
"./advanced/runner": {
|
|
158
|
+
"types": "./dist/advanced/runner.d.ts",
|
|
159
|
+
"import": "./dist/advanced/runner.js",
|
|
160
|
+
"require": "./dist/advanced/runner.cjs"
|
|
161
|
+
},
|
|
162
|
+
"./advanced/engine-harness": {
|
|
163
|
+
"types": "./dist/advanced/engine-harness.d.ts",
|
|
164
|
+
"import": "./dist/advanced/engine-harness.js",
|
|
165
|
+
"require": "./dist/advanced/engine-harness.cjs"
|
|
166
|
+
},
|
|
167
|
+
"./advanced/proof-run-core": {
|
|
168
|
+
"types": "./dist/advanced/proof-run-core.d.ts",
|
|
169
|
+
"import": "./dist/advanced/proof-run-core.js",
|
|
170
|
+
"require": "./dist/advanced/proof-run-core.cjs"
|
|
171
|
+
},
|
|
172
|
+
"./advanced/proof-run-engine": {
|
|
173
|
+
"types": "./dist/advanced/proof-run-engine.d.ts",
|
|
174
|
+
"import": "./dist/advanced/proof-run-engine.js",
|
|
175
|
+
"require": "./dist/advanced/proof-run-engine.cjs"
|
|
176
|
+
},
|
|
177
|
+
"./adapters/openclaw": {
|
|
178
|
+
"types": "./dist/adapters/openclaw.d.ts",
|
|
179
|
+
"import": "./dist/adapters/openclaw.js",
|
|
180
|
+
"require": "./dist/adapters/openclaw.cjs"
|
|
181
|
+
},
|
|
182
|
+
"./adapters/codex": {
|
|
183
|
+
"types": "./dist/adapters/codex.d.ts",
|
|
184
|
+
"import": "./dist/adapters/codex.js",
|
|
185
|
+
"require": "./dist/adapters/codex.cjs"
|
|
186
|
+
},
|
|
187
|
+
"./adapters/local-agent": {
|
|
188
|
+
"types": "./dist/adapters/local-agent.d.ts",
|
|
189
|
+
"import": "./dist/adapters/local-agent.js",
|
|
190
|
+
"require": "./dist/adapters/local-agent.cjs"
|
|
191
|
+
},
|
|
192
|
+
"./adapters/codex-exec-agent": {
|
|
193
|
+
"types": "./dist/adapters/codex-exec-agent.d.ts",
|
|
194
|
+
"import": "./dist/adapters/codex-exec-agent.js",
|
|
195
|
+
"require": "./dist/adapters/codex-exec-agent.cjs"
|
|
196
|
+
},
|
|
197
|
+
"./app-contract": {
|
|
198
|
+
"types": "./dist/app-contract/index.d.ts",
|
|
199
|
+
"import": "./dist/app-contract/index.js",
|
|
200
|
+
"require": "./dist/app-contract/index.cjs"
|
|
111
201
|
}
|
|
112
202
|
},
|
|
113
203
|
"bin": {
|
|
@@ -125,13 +215,16 @@
|
|
|
125
215
|
"engines": {
|
|
126
216
|
"node": ">=18"
|
|
127
217
|
},
|
|
218
|
+
"dependencies": {
|
|
219
|
+
"@riddledc/riddle-proof-app-contract": "^0.4.0"
|
|
220
|
+
},
|
|
128
221
|
"devDependencies": {
|
|
129
222
|
"@types/node": "^22.0.0",
|
|
130
223
|
"tsup": "^8.0.1",
|
|
131
224
|
"typescript": "^5.4.5"
|
|
132
225
|
},
|
|
133
226
|
"scripts": {
|
|
134
|
-
"build": "tsup src/index.ts src/types.ts src/result.ts src/state.ts src/checkpoint.ts src/run-card.ts src/runner.ts src/engine-harness.ts src/codex-exec-agent.ts src/local-agent.ts src/cli.ts src/diagnostics.ts src/proof-session.ts src/playability.ts src/basic-gameplay.ts src/profile.ts src/openclaw.ts src/proof-run-core.ts src/proof-run-engine.ts src/riddle-client.ts --format cjs,esm --dts --out-dir dist --clean",
|
|
227
|
+
"build": "tsup src/index.ts src/types.ts src/result.ts src/state.ts src/checkpoint.ts src/run-card.ts src/runner.ts src/engine-harness.ts src/codex-exec-agent.ts src/local-agent.ts src/cli.ts src/cli/index.ts src/diagnostics.ts src/proof-session.ts src/playability.ts src/basic-gameplay.ts src/profile.ts src/profile/index.ts src/openclaw.ts src/proof-run-core.ts src/proof-run-engine.ts src/riddle-client.ts src/runtime/riddle-client.ts src/spec/index.ts src/spec/types.ts src/spec/result.ts src/spec/state.ts src/spec/checkpoint.ts src/spec/run-card.ts src/runtime/index.ts src/app-contract/index.ts src/advanced/index.ts src/advanced/runner.ts src/advanced/engine-harness.ts src/advanced/proof-run-core.ts src/advanced/proof-run-engine.ts src/adapters/openclaw.ts src/adapters/local-agent.ts src/adapters/codex-exec-agent.ts src/adapters/codex.ts --format cjs,esm --dts --out-dir dist --clean",
|
|
135
228
|
"clean": "rm -rf dist",
|
|
136
229
|
"lint": "echo 'lint: (not configured)'",
|
|
137
230
|
"test": "npm run build && node test.js && node proof-run.test.js"
|
package/runtime/lib/verify.py
CHANGED
|
@@ -557,6 +557,50 @@ def extract_proof_evidence(payload):
|
|
|
557
557
|
return evidence
|
|
558
558
|
|
|
559
559
|
|
|
560
|
+
def proof_evidence_records(value):
|
|
561
|
+
if isinstance(value, dict):
|
|
562
|
+
return [value]
|
|
563
|
+
if isinstance(value, list):
|
|
564
|
+
records = []
|
|
565
|
+
for item in value:
|
|
566
|
+
records.extend(proof_evidence_records(item))
|
|
567
|
+
return records
|
|
568
|
+
return []
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
def static_audit_evidence_support(value):
|
|
572
|
+
for record in proof_evidence_records(value):
|
|
573
|
+
explicit_static = (
|
|
574
|
+
record.get('interactionNotRequired') is True
|
|
575
|
+
or record.get('interactionExpected') is False
|
|
576
|
+
or record.get('zeroInteractiveElementsExpected') is True
|
|
577
|
+
or record.get('staticPageExpected') is True
|
|
578
|
+
)
|
|
579
|
+
ready = record.get('proofReady') is True or record.get('staticAuditReady') is True
|
|
580
|
+
failed = any(record.get(key) is False for key in (
|
|
581
|
+
'proofReady',
|
|
582
|
+
'staticAuditReady',
|
|
583
|
+
'routeMatches',
|
|
584
|
+
'titleMatches',
|
|
585
|
+
'headingMatches',
|
|
586
|
+
'markerMatches',
|
|
587
|
+
'normalizedCopyVisible',
|
|
588
|
+
'noConsoleErrors',
|
|
589
|
+
'noPageErrors',
|
|
590
|
+
))
|
|
591
|
+
if explicit_static and ready and not failed:
|
|
592
|
+
return {
|
|
593
|
+
'ready': True,
|
|
594
|
+
'interaction_not_required': True,
|
|
595
|
+
'source': str(record.get('version') or record.get('mode') or 'proof_evidence'),
|
|
596
|
+
}
|
|
597
|
+
return {
|
|
598
|
+
'ready': False,
|
|
599
|
+
'interaction_not_required': False,
|
|
600
|
+
'source': '',
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
|
|
560
604
|
PLAYABILITY_EVIDENCE_VERSION = 'riddle-proof.playability.v1'
|
|
561
605
|
PLAYABILITY_ASSESSMENT_VERSION = 'riddle-proof.playability.assessment.v1'
|
|
562
606
|
PLAYABILITY_CONTAINER_KEYS = (
|
|
@@ -2012,6 +2056,8 @@ def evaluate_capture_quality(payload, expected_path, verification_mode='proof'):
|
|
|
2012
2056
|
payload = enrich_capture_payload(payload)
|
|
2013
2057
|
mode = normalized_verification_mode(verification_mode)
|
|
2014
2058
|
supporting = collect_supporting_artifacts(payload)
|
|
2059
|
+
proof_evidence = extract_proof_evidence(payload)
|
|
2060
|
+
static_audit_support = static_audit_evidence_support(proof_evidence)
|
|
2015
2061
|
structured_ready = bool(supporting.get('has_structured_payload'))
|
|
2016
2062
|
playability_ready = mode in PLAYABILITY_MODES and bool(supporting.get('playability_ready'))
|
|
2017
2063
|
screenshot_required = screenshot_required_for_mode(mode)
|
|
@@ -2023,6 +2069,8 @@ def evaluate_capture_quality(payload, expected_path, verification_mode='proof'):
|
|
|
2023
2069
|
'structured_evidence_present': structured_ready,
|
|
2024
2070
|
'proof_evidence_present': bool(supporting.get('proof_evidence_present')),
|
|
2025
2071
|
'playability_ready': playability_ready,
|
|
2072
|
+
'static_audit_ready': bool(static_audit_support.get('ready')),
|
|
2073
|
+
'static_audit_support_source': static_audit_support.get('source', ''),
|
|
2026
2074
|
'canvas_capture_ready': False,
|
|
2027
2075
|
'large_canvas_area': 0,
|
|
2028
2076
|
'min_canvas_area': MIN_CANVAS_AREA,
|
|
@@ -2110,13 +2158,15 @@ def evaluate_capture_quality(payload, expected_path, verification_mode='proof'):
|
|
|
2110
2158
|
|
|
2111
2159
|
should_enforce_visual_readiness = screenshot_required or (details['has_screenshot'] and not structured_ready)
|
|
2112
2160
|
canvas_ready = bool(details.get('canvas_capture_ready'))
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2161
|
+
static_audit_ready = bool(static_audit_support.get('ready'))
|
|
2162
|
+
body_text_ready = details['body_text_length'] >= MIN_BODY_TEXT_LENGTH or canvas_ready or playability_ready or static_audit_ready
|
|
2163
|
+
interactive_ready = details['interactive_elements'] >= MIN_INTERACTIVE_ELEMENTS or canvas_ready or playability_ready or static_audit_ready
|
|
2164
|
+
semantic_ready = (not has_enriched_page_state(page_state)) or details['semantic_anchor_count'] >= 1 or canvas_ready or playability_ready or static_audit_ready
|
|
2116
2165
|
details['body_text_ready'] = body_text_ready
|
|
2117
2166
|
details['interactive_ready'] = interactive_ready
|
|
2118
2167
|
details['semantic_ready'] = semantic_ready
|
|
2119
2168
|
details['canvas_or_playability_override'] = bool(should_enforce_visual_readiness and (canvas_ready or playability_ready))
|
|
2169
|
+
details['static_audit_readiness_override'] = bool(should_enforce_visual_readiness and static_audit_ready)
|
|
2120
2170
|
|
|
2121
2171
|
if should_enforce_visual_readiness and not body_text_ready:
|
|
2122
2172
|
reasons.append(f'blank/near-blank page (text length: {details["body_text_length"]})')
|
|
@@ -101,48 +101,52 @@ steps:
|
|
|
101
101
|
command: |
|
|
102
102
|
python3 << 'PYEOF'
|
|
103
103
|
import json, os
|
|
104
|
-
raw_server_path = """${server_path}""".strip()
|
|
105
|
-
args = {
|
|
106
|
-
'mode': """${mode}""".strip() or 'server',
|
|
107
|
-
'reference': """${reference}""".strip() or 'both',
|
|
108
|
-
'repo': """${repo}""".strip(),
|
|
109
|
-
'branch': """${branch}""".strip(),
|
|
110
|
-
'change_request': """${change_request}""".strip(),
|
|
111
|
-
'commit_message': """${commit_message}""".strip(),
|
|
112
|
-
'prod_url': """${prod_url}""".strip(),
|
|
113
|
-
'capture_script': """${capture_script}""".strip(),
|
|
114
|
-
'success_criteria': """${success_criteria}""".strip(),
|
|
115
|
-
'assertions_json': """${assertions_json}""".strip(),
|
|
116
|
-
'verification_mode': """${verification_mode}""".strip() or 'proof',
|
|
117
|
-
'context': """${context}""".strip(),
|
|
118
|
-
'reviewer': """${reviewer}""".strip() or 'davisdiehl',
|
|
119
|
-
'base_branch': """${base_branch}""".strip() or 'main',
|
|
120
|
-
'before_ref': """${before_ref}""".strip(),
|
|
121
|
-
'allow_static_preview_fallback': """${allow_static_preview_fallback}""".strip(),
|
|
122
|
-
'implementation_mode': """${implementation_mode}""".strip(),
|
|
123
|
-
'require_diff': """${require_diff}""".strip(),
|
|
124
|
-
'allow_code_changes': """${allow_code_changes}""".strip(),
|
|
125
|
-
'build_command': """${build_command}""".strip() or 'npm run build',
|
|
126
|
-
'build_output': """${build_output}""".strip() or 'build',
|
|
127
|
-
'server_image': """${server_image}""".strip() or 'node:20-slim',
|
|
128
|
-
'server_command': """${server_command}""".strip() or 'npm start',
|
|
129
|
-
'server_port': """${server_port}""".strip() or '3000',
|
|
130
|
-
'server_path': raw_server_path,
|
|
131
|
-
'server_path_source': 'user' if raw_server_path else '',
|
|
132
|
-
'use_auth': """${use_auth}""".strip(),
|
|
133
|
-
'auth_localStorage_json': """${auth_localStorage_json}""".strip(),
|
|
134
|
-
'auth_cookies_json': """${auth_cookies_json}""".strip(),
|
|
135
|
-
'auth_headers_json': """${auth_headers_json}""".strip(),
|
|
136
|
-
'color_scheme': """${color_scheme}""".strip(),
|
|
137
|
-
'wait_for_selector': """${wait_for_selector}""".strip(),
|
|
138
|
-
'discord_channel': """${discord_channel}""".strip(),
|
|
139
|
-
'discord_thread_id': """${discord_thread_id}""".strip(),
|
|
140
|
-
'discord_message_id': """${discord_message_id}""".strip(),
|
|
141
|
-
'discord_source_url': """${discord_source_url}""".strip(),
|
|
142
|
-
}
|
|
143
104
|
args_file = os.environ.get('RIDDLE_PROOF_ARGS_FILE', '/tmp/riddle-proof-args.json')
|
|
144
|
-
|
|
145
|
-
|
|
105
|
+
if os.environ.get('RIDDLE_PROOF_ARGS_FILE') and os.path.exists(args_file):
|
|
106
|
+
with open(args_file) as f:
|
|
107
|
+
json.load(f)
|
|
108
|
+
else:
|
|
109
|
+
raw_server_path = '''${server_path}'''.strip()
|
|
110
|
+
args = {
|
|
111
|
+
'mode': '''${mode}'''.strip() or 'server',
|
|
112
|
+
'reference': '''${reference}'''.strip() or 'both',
|
|
113
|
+
'repo': '''${repo}'''.strip(),
|
|
114
|
+
'branch': '''${branch}'''.strip(),
|
|
115
|
+
'change_request': '''${change_request}'''.strip(),
|
|
116
|
+
'commit_message': '''${commit_message}'''.strip(),
|
|
117
|
+
'prod_url': '''${prod_url}'''.strip(),
|
|
118
|
+
'capture_script': '''${capture_script}'''.strip(),
|
|
119
|
+
'success_criteria': '''${success_criteria}'''.strip(),
|
|
120
|
+
'assertions_json': '''${assertions_json}'''.strip(),
|
|
121
|
+
'verification_mode': '''${verification_mode}'''.strip() or 'proof',
|
|
122
|
+
'context': '''${context}'''.strip(),
|
|
123
|
+
'reviewer': '''${reviewer}'''.strip() or 'davisdiehl',
|
|
124
|
+
'base_branch': '''${base_branch}'''.strip() or 'main',
|
|
125
|
+
'before_ref': '''${before_ref}'''.strip(),
|
|
126
|
+
'allow_static_preview_fallback': '''${allow_static_preview_fallback}'''.strip(),
|
|
127
|
+
'implementation_mode': '''${implementation_mode}'''.strip(),
|
|
128
|
+
'require_diff': '''${require_diff}'''.strip(),
|
|
129
|
+
'allow_code_changes': '''${allow_code_changes}'''.strip(),
|
|
130
|
+
'build_command': '''${build_command}'''.strip() or 'npm run build',
|
|
131
|
+
'build_output': '''${build_output}'''.strip() or 'build',
|
|
132
|
+
'server_image': '''${server_image}'''.strip() or 'node:20-slim',
|
|
133
|
+
'server_command': '''${server_command}'''.strip() or 'npm start',
|
|
134
|
+
'server_port': '''${server_port}'''.strip() or '3000',
|
|
135
|
+
'server_path': raw_server_path,
|
|
136
|
+
'server_path_source': 'user' if raw_server_path else '',
|
|
137
|
+
'use_auth': '''${use_auth}'''.strip(),
|
|
138
|
+
'auth_localStorage_json': '''${auth_localStorage_json}'''.strip(),
|
|
139
|
+
'auth_cookies_json': '''${auth_cookies_json}'''.strip(),
|
|
140
|
+
'auth_headers_json': '''${auth_headers_json}'''.strip(),
|
|
141
|
+
'color_scheme': '''${color_scheme}'''.strip(),
|
|
142
|
+
'wait_for_selector': '''${wait_for_selector}'''.strip(),
|
|
143
|
+
'discord_channel': '''${discord_channel}'''.strip(),
|
|
144
|
+
'discord_thread_id': '''${discord_thread_id}'''.strip(),
|
|
145
|
+
'discord_message_id': '''${discord_message_id}'''.strip(),
|
|
146
|
+
'discord_source_url': '''${discord_source_url}'''.strip(),
|
|
147
|
+
}
|
|
148
|
+
with open(args_file, 'w') as f:
|
|
149
|
+
json.dump(args, f, indent=2)
|
|
146
150
|
PYEOF
|
|
147
151
|
RP="${RIDDLE_PROOF_DIR:-/root/.openclaw/extensions/openclaw-riddle-proof/node_modules/@riddledc/riddle-proof/runtime}"
|
|
148
152
|
python3 "${RP}/lib/preflight.py"
|
|
@@ -562,6 +562,47 @@ def run_verify_quality_ignores_proof_telemetry_console_text():
|
|
|
562
562
|
assert missing_query_quality['valid'] is False
|
|
563
563
|
assert 'wrong route' in missing_query_quality['reason']
|
|
564
564
|
|
|
565
|
+
static_audit_payload = {
|
|
566
|
+
'bodyTextLength': 61,
|
|
567
|
+
'visibleTextSample': 'Riddle static preview smoke Static preview marker is visible.',
|
|
568
|
+
'interactiveElements': 0,
|
|
569
|
+
'visibleInteractiveElements': 0,
|
|
570
|
+
'pathname': '/s/ps_b7b5f0dc/',
|
|
571
|
+
'title': 'Riddle Preview Smoke',
|
|
572
|
+
'headings': ['Riddle static preview smoke'],
|
|
573
|
+
'buttons': [],
|
|
574
|
+
'links': [],
|
|
575
|
+
'canvasCount': 0,
|
|
576
|
+
'largeVisibleElements': [{'tag': 'h1', 'text': 'Riddle static preview smoke', 'area': 17208}],
|
|
577
|
+
}
|
|
578
|
+
static_audit_evidence = {
|
|
579
|
+
'version': 'riddle-proof.static-smoke.v4',
|
|
580
|
+
'proofReady': True,
|
|
581
|
+
'staticAuditReady': True,
|
|
582
|
+
'interactionExpected': False,
|
|
583
|
+
'interactionNotRequired': True,
|
|
584
|
+
'zeroInteractiveElementsExpected': True,
|
|
585
|
+
'routeMatches': True,
|
|
586
|
+
'titleMatches': True,
|
|
587
|
+
'headingMatches': True,
|
|
588
|
+
'markerMatches': True,
|
|
589
|
+
'normalizedCopyVisible': True,
|
|
590
|
+
'noConsoleErrors': True,
|
|
591
|
+
'noPageErrors': True,
|
|
592
|
+
}
|
|
593
|
+
static_audit_quality = namespace['evaluate_capture_quality']({
|
|
594
|
+
'ok': True,
|
|
595
|
+
'screenshots': [{'name': 'after-proof.png', 'url': 'https://cdn.example.com/static-after.png'}],
|
|
596
|
+
'outputs': [{'name': 'after-proof.png', 'url': 'https://cdn.example.com/static-after.png'}],
|
|
597
|
+
'console': [
|
|
598
|
+
'RIDDLE_PROOF_STATE:' + json.dumps(static_audit_payload),
|
|
599
|
+
'RIDDLE_PROOF_EVIDENCE:' + json.dumps(static_audit_evidence),
|
|
600
|
+
],
|
|
601
|
+
}, '/s/ps_b7b5f0dc/', 'visual')
|
|
602
|
+
assert static_audit_quality['valid'] is True, static_audit_quality
|
|
603
|
+
assert static_audit_quality['details']['interactive_ready'] is True
|
|
604
|
+
assert static_audit_quality['details']['static_audit_readiness_override'] is True
|
|
605
|
+
|
|
565
606
|
strong_delta = namespace['extract_visual_delta']({
|
|
566
607
|
'ok': True,
|
|
567
608
|
'result': {
|