Files
marqdo/tests/applications/routes/producer.py
cflmyandCursor 8f1010f967 Ship oracle journal values, bytecode/frontend hardening, and replay-policy Lean.
Host exposes oracle journals as language values with refuse/copy gates; bytecode and foreign session paths get modularized; applications and verification replay-policy sources land with Lake builds ignored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-06 15:04:27 +08:00

9 lines
458 B
Python

minimum = {}
for edge in data['edges']:
if edge['weight'] >= 0:
key = (edge['from'], edge['to'])
minimum[key] = min(minimum.get(key, edge['weight']), edge['weight'])
bridge = {'source': data['source'], 'nodes': sorted(data['nodes'], key=lambda n:n.encode('utf-8')),
'edges': [{'from': a, 'to': b, 'weight': w} for (a,b), w in sorted(minimum.items(), key=lambda kv: (kv[0][0].encode('utf-8'), kv[0][1].encode('utf-8')))]}
bridge