def runtime_risks(): risks = [ "Python threads cannot be force-killed safely", "yt-dlp may block despite socket_timeout", "HF Spaces may restart and kill background tasks" ] with open("artifacts/environment_risks.md", "w") as f: f.write("\n".join(f"- {r}" for r in risks)) return risks