from __future__ import annotations from pathlib import Path ROOT = Path(__file__).resolve().parents[3] SCRIPT = ROOT / "scripts" / "reboot-recovery" / "post-start-quick-check.sh" def test_post_start_self_checks_can_run_locally_on_110() -> None: text = SCRIPT.read_text(encoding="utf-8") assert "is_local_target()" in text assert 'ips="$(local_ip_list)"' in text assert 'local_ip_list | grep' not in text assert 'bash -lc "$command"' in text assert 'ssh -o BatchMode=yes -o ConnectTimeout="$SSH_CONNECT_TIMEOUT" "$user_host" "$command"' in text def test_runner_pressure_is_capacity_evidence_after_routes_recover() -> None: text = SCRIPT.read_text(encoding="utf-8") assert "service_route_recovered()" in text assert "capacity_or_runner_issue()" in text assert "cold-start non-route blockers retained as capacity/freshness evidence" in text assert 'capacity_or_runner_issue "110 host pressure gate is blocking"' in text