@riddledc/riddle-proof 0.5.25 → 0.5.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.5.25",
3
+ "version": "0.5.26",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",
@@ -375,6 +375,7 @@ def extract_page_state(payload):
375
375
 
376
376
 
377
377
  def extract_proof_evidence(payload):
378
+ payload = enrich_capture_payload(payload)
378
379
  evidence = []
379
380
  for text in iter_console_messages(payload.get('console') or []):
380
381
  raw_evidence = proof_evidence_console_payload(text)
@@ -154,11 +154,19 @@ class FakeRiddle:
154
154
  'ok': True,
155
155
  'outputs': [{'name': 'proof.json', 'url': 'https://cdn.example.com/proof.json'}],
156
156
  'result': {'pageState': page_state},
157
- 'console': [
158
- 'RIDDLE_PROOF_STATE:' + json.dumps(page_state),
159
- 'RIDDLE_PROOF_EVIDENCE:' + json.dumps(proof_evidence),
160
- ],
161
157
  '_artifact_json': {
158
+ 'console.json': {
159
+ 'summary': {'total_entries': 3, 'log_count': 2, 'warn_count': 0, 'error_count': 1, 'info_count': 0},
160
+ 'entries': {
161
+ 'log': [
162
+ {'message': 'RIDDLE_PROOF_STATE:' + json.dumps(page_state)},
163
+ {'message': 'RIDDLE_PROOF_EVIDENCE:' + json.dumps(proof_evidence)},
164
+ ],
165
+ 'warn': [],
166
+ 'error': [{'message': 'Uncaught exception: intentional capture script failure after evidence'}],
167
+ 'info': [],
168
+ },
169
+ },
162
170
  'proof.json': {
163
171
  'script_error': 'Error: intentional capture script failure after evidence',
164
172
  },
@@ -1309,6 +1317,8 @@ def run_verify_preserves_proof_evidence_on_capture_script_error():
1309
1317
  assert supporting['has_structured_payload'] is True
1310
1318
  assert supporting['proof_evidence_present'] is True
1311
1319
  assert 'Captured structured audio evidence before the capture script threw' in supporting['proof_evidence_sample']
1320
+ assert after_verify['evidence_bundle']['proof_evidence'] is not None
1321
+ assert after_verify['evidence_bundle']['proof_evidence']['proof_evidence_present'] is False
1312
1322
  capture_quality = after_verify['verify_decision_request']['capture_quality']
1313
1323
  assert capture_quality['decision'] == 'failed_proof_evidence'
1314
1324
  assert capture_quality['recommended_stage'] == 'author'