{"id":"watchdog-long-running-automation-context","text":"FTL2 automation contexts can be held open for hours in watchdog/monitoring loops. The context manages SSH connections and state for the lifetime of the `async with` block.","truth_value":"IN","source":"repo:ftl2-servercraft/ftl2_servercraft/watchdog.py","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"async with automation(\n    state_file=str(config.state_path),\n    fail_fast=True,\n    quiet=True,\n    auto_install_deps=True,\n) as ftl:\n    while state.watchdog_active:\n        count = await script.get_player_count(ftl, config)\n        # ... handle count, teardown on failures\n        await asyncio.sleep(config.poll_interval)"},"explanation":{"steps":[{"node":"watchdog-long-running-automation-context","truth_value":"IN","reason":"premise"}]}}