from pathlib import Path
source=Path('/tmp/codex/ltb1021/2026-09-26_linear-scale_r01/trial.py').read_text()
source=source.replace("exec(compile(source,__file__,'exec'))", """source=source.replace("        stage['frames']=frame_probe(ORDER[:level])", "        stage['frames']=frame_probe(ORDER[:level])\\n        from retention import retention\\n        stage['retention']=retention(ORDER[:level])")
source=source.replace("and not v['metadata_path']['freshness_enabled']", "and not v['metadata_path']['freshness_enabled'] and v['metadata_path']['event_cooldown']['seconds']==10")
exec(compile(source,__file__,'exec'))""")
exec(compile(source,__file__,'exec'))
