"""Supported graph shape for the existing Java delivery interpreter. Preparation/read/policy atoms can have independent repeated instances. Artifact and model-producing stages remain unique because recovery and delivery refer to their single authoritative output. The compiler still enforces every data/gate. """ from collections import Counter def supported_graph(graph): counts = Counter((n.get('operation_ref') or '').split('@')[0] for n in graph['nodes'] if n['kind'] == 'operation') repeatable = {'AO01', 'AO02', 'AO03', 'AO07'} required = {f'AO{i:02}' for i in range(1, 12)} return (not set(counts) - required - {'AO13'} and all(counts[op] >= 1 if op in repeatable else counts[op] == 1 for op in required) and counts['AO13'] <= 1)