from pathlib import Path
import json, ast
R=Path(__file__).resolve().parent
cases=json.loads((R/'fixtures/cases.json').read_text(encoding='utf-8'))['cases']
assert len(cases)==8
required={'input_audio_order','intended_audio_index','mapped_audio_index','mapping_mode','expected_video_codec','observed_video_codec','filter_label_expected','filter_label_mapped','expected_sample_rate','observed_sample_rate','expected_channel_layout','observed_channel_layout','subtitle_mode','subtitle_source_type','subtitle_supported','target_container','container_supported'}
for c in cases:
    assert required.issubset(c), (c['id'], sorted(required-set(c)))
    assert c['target_container'] in {'mp4','mkv'}
text=(R/'starter.py').read_text(encoding='utf-8')
tree=ast.parse(text)
assert any(isinstance(n,ast.FunctionDef) and n.name=='evaluate_execution' for n in tree.body)
forbidden=['oracle'+'_expected','internal'+'_verification','answer'+'_key']
assert not any(x in text.lower() for x in forbidden)
print('PASS 8/8 learner fixture structural checks')
