from pathlib import Path
import sys
label=sys.argv[1]
assert label in ('pose','pose-a','pose-drift','mixed')
mode='pose' if label.startswith('pose') else 'mixed'
source=Path('/tmp/codex/ltb1021/2026-09-27_pose-mixed-baseline_r01/trial.py').read_text()
source=source.replace('mode=sys.argv[1]', 'mode='+repr(mode))
source=source.replace("LEVELS=list(range(1,17))", "LEVELS="+repr([1,6,8] if label=='pose-drift' else [6,8,12,16]))
source=source.replace("and not v['metadata_path']['freshness_enabled']", "and not v['metadata_path']['freshness_enabled'] and v['metadata_path']['queue_max_age_s']=="+str(1 if label in ('pose-a','pose-drift') else 2))
exec(compile(source,__file__,'exec'))
