@riddledc/riddle-proof 0.5.32 → 0.5.33
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/{chunk-R4BPJNAM.js → chunk-A5AWVY5A.js} +81 -6
- package/dist/{chunk-LIDYNU7Q.js → chunk-CHKYSZLU.js} +37 -0
- package/dist/engine-harness.cjs +117 -7
- package/dist/engine-harness.js +2 -1
- package/dist/index.cjs +117 -7
- package/dist/index.js +2 -1
- package/dist/proof-run-core.cjs +84 -6
- package/dist/proof-run-core.d.cts +8 -1
- package/dist/proof-run-core.d.ts +8 -1
- package/dist/proof-run-core.js +7 -1
- package/dist/proof-run-engine.cjs +81 -6
- package/dist/proof-run-engine.js +4 -1
- package/package.json +1 -1
- package/runtime/lib/ship.py +55 -1
- package/runtime/lib/verify.py +38 -4
- package/runtime/tests/recon_verify_smoke.py +61 -2
|
@@ -1200,17 +1200,19 @@ def run_verify_requests_supervisor_assessment():
|
|
|
1200
1200
|
artifact_contract = after_verify['proof_assessment_request']['artifact_contract']
|
|
1201
1201
|
assert artifact_contract['required']['baseline_context'] is True
|
|
1202
1202
|
assert artifact_contract['required']['screenshot'] is True
|
|
1203
|
+
assert artifact_contract['required']['visual_delta'] is True
|
|
1203
1204
|
artifact_production = after_verify['proof_assessment_request']['artifact_production']
|
|
1204
1205
|
assert artifact_production['image_output_count'] >= 1
|
|
1205
1206
|
assert artifact_production['proof_evidence_present'] is False
|
|
1206
1207
|
artifact_usage = after_verify['proof_assessment_request']['artifact_usage']
|
|
1207
|
-
assert artifact_usage['missing_required_signals'] == []
|
|
1208
|
+
assert artifact_usage['missing_required_signals'] == ['visual_delta']
|
|
1208
1209
|
assert 'after-capture' in artifact_usage['supervisor_review_signals']
|
|
1209
1210
|
assert 'baseline_context' in artifact_usage['required_signals']
|
|
1210
1211
|
assert 'route_semantics' in artifact_usage['available_signals']
|
|
1212
|
+
assert 'visual_delta.status=unmeasured' in after_verify['proof_assessment_request']['hard_blockers'][0]
|
|
1211
1213
|
assert after_verify['proof_assessment_request']['evidence_bundle']['artifact_contract']['required']['screenshot'] is True
|
|
1212
1214
|
assert after_verify['proof_assessment_request']['evidence_bundle']['artifact_production']['image_output_count'] >= 1
|
|
1213
|
-
assert after_verify['proof_assessment_request']['evidence_bundle']['artifact_usage']['missing_required_signals'] == []
|
|
1215
|
+
assert after_verify['proof_assessment_request']['evidence_bundle']['artifact_usage']['missing_required_signals'] == ['visual_delta']
|
|
1214
1216
|
assert 'capture success is not proof' in '\n'.join(after_verify['proof_assessment_request']['instructions'])
|
|
1215
1217
|
assert after_verify['verify_decision_request']['continue_with_stage'] is None
|
|
1216
1218
|
assert after_verify['verify_results']['baseline']['before']['source'] == 'recon'
|
|
@@ -1573,6 +1575,62 @@ def run_ship_missing_supervisor_gate():
|
|
|
1573
1575
|
shutil.rmtree(tempdir, ignore_errors=True)
|
|
1574
1576
|
|
|
1575
1577
|
|
|
1578
|
+
def run_ship_blocks_unmeasured_visual_delta():
|
|
1579
|
+
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-ship-visual-delta-'))
|
|
1580
|
+
state_path = tempdir / 'state.json'
|
|
1581
|
+
try:
|
|
1582
|
+
state = base_state(tempdir, reference='before')
|
|
1583
|
+
state.update({
|
|
1584
|
+
'recon_status': 'ready_for_proof_plan',
|
|
1585
|
+
'author_status': 'ready',
|
|
1586
|
+
'proof_plan_status': 'ready',
|
|
1587
|
+
'implementation_status': 'changes_detected',
|
|
1588
|
+
'verification_mode': 'visual',
|
|
1589
|
+
'verify_status': 'evidence_captured',
|
|
1590
|
+
'before_cdn': 'https://cdn.example.com/before.png',
|
|
1591
|
+
'after_cdn': 'https://cdn.example.com/after.png',
|
|
1592
|
+
'proof_assessment': {
|
|
1593
|
+
'decision': 'ready_to_ship',
|
|
1594
|
+
'summary': 'The screenshots look good.',
|
|
1595
|
+
'source': 'supervising_agent',
|
|
1596
|
+
},
|
|
1597
|
+
'proof_assessment_source': 'supervising_agent',
|
|
1598
|
+
'evidence_bundle': {
|
|
1599
|
+
'verification_mode': 'visual',
|
|
1600
|
+
'artifact_contract': {
|
|
1601
|
+
'required': {
|
|
1602
|
+
'baseline_context': True,
|
|
1603
|
+
'route_semantics': True,
|
|
1604
|
+
'screenshot': True,
|
|
1605
|
+
'visual_delta': True,
|
|
1606
|
+
},
|
|
1607
|
+
},
|
|
1608
|
+
'after': {
|
|
1609
|
+
'screenshot_url': 'https://cdn.example.com/after.png',
|
|
1610
|
+
'observation': {'valid': True, 'reason': 'ok'},
|
|
1611
|
+
'visual_delta': {
|
|
1612
|
+
'status': 'unmeasured',
|
|
1613
|
+
'passed': None,
|
|
1614
|
+
'reason': 'No measured before/after visual delta was found in proof evidence.',
|
|
1615
|
+
},
|
|
1616
|
+
},
|
|
1617
|
+
},
|
|
1618
|
+
})
|
|
1619
|
+
write_state(state_path, state)
|
|
1620
|
+
os.environ['RIDDLE_PROOF_STATE_FILE'] = str(state_path)
|
|
1621
|
+
|
|
1622
|
+
try:
|
|
1623
|
+
load_module('ship_blocks_unmeasured_visual_delta', SHIP_PATH)
|
|
1624
|
+
except SystemExit as exc:
|
|
1625
|
+
message = str(exc)
|
|
1626
|
+
assert 'visual_delta.status=unmeasured' in message, message
|
|
1627
|
+
assert 'blocks ready_to_ship' in message, message
|
|
1628
|
+
return {'ok': True, 'error': message}
|
|
1629
|
+
raise AssertionError('ship should have failed when visual delta was unmeasured')
|
|
1630
|
+
finally:
|
|
1631
|
+
shutil.rmtree(tempdir, ignore_errors=True)
|
|
1632
|
+
|
|
1633
|
+
|
|
1576
1634
|
def run_ship_accepts_structured_after_evidence():
|
|
1577
1635
|
tempdir = Path(tempfile.mkdtemp(prefix='riddle-proof-ship-structured-'))
|
|
1578
1636
|
state_path = tempdir / 'state.json'
|
|
@@ -1829,6 +1887,7 @@ if __name__ == '__main__':
|
|
|
1829
1887
|
'verify_capture_retry': run_verify_capture_retry(),
|
|
1830
1888
|
'missing_baseline_guard': run_verify_missing_baseline(),
|
|
1831
1889
|
'ship_supervisor_gate': run_ship_missing_supervisor_gate(),
|
|
1890
|
+
'ship_blocks_unmeasured_visual_delta': run_ship_blocks_unmeasured_visual_delta(),
|
|
1832
1891
|
'ship_structured_after_evidence': run_ship_accepts_structured_after_evidence(),
|
|
1833
1892
|
'ship_discord_thread_target': run_ship_discord_thread_target(),
|
|
1834
1893
|
'ship_filters_tool_noise_when_staging': run_ship_filters_tool_noise_when_staging(),
|