From 2ff983f5f42b088ecf324ec1982ff024e80dcc56 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:05:40 +0000 Subject: [PATCH 1/4] Initial plan From 1b2c0f2c1ce651f1c00321842cbeb20b38794a72 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:08:02 +0000 Subject: [PATCH 2/4] Fix inactive domain services health to show needs_attention on domain/port issues Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/0baad662-d798-4d3e-a079-eefece637ab7 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/server.py | 41 ++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 19d792b..a864466 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -2421,7 +2421,37 @@ async def api_services(): sync_headers = sync.get("headers", 0) sync_ibd = True elif status == "inactive": - health = "inactive" + # For enabled services that are inactive (e.g. socket-activated PHP-FPM), + # still check domain/port health so status remains consistent with + # other domain services when there are actionable issues. + has_domain_issues_inactive = False + if needs_domain: + has_domain_issues_inactive = await loop.run_in_executor( + None, + _check_domain_health_fast, + domain, + _cached_external_ip, + ) + if not has_domain_issues_inactive and domain: + cached_reachable = _is_domain_reachable_cached(domain) + if cached_reachable is False: + has_domain_issues_inactive = True + has_port_issues_inactive = False + if port_requirements: + for p in port_requirements: + ps = _check_port_status( + str(p.get("port", "")), + str(p.get("protocol", "TCP")), + listening_ports, + firewall_ports, + ) + if ps == "closed": + has_port_issues_inactive = True + break + if has_domain_issues_inactive or has_port_issues_inactive: + health = "needs_attention" + else: + health = "inactive" elif status == "failed": health = "failed" else: @@ -2649,7 +2679,14 @@ async def api_service_detail(unit: str, icon: str | None = None): sync_headers = sync.get("headers", 0) sync_ibd = True elif status == "inactive": - health = "inactive" + # For enabled services that are inactive (e.g. socket-activated PHP-FPM), + # still check domain/port health so detail health is consistent. + has_domain_issues_inactive = has_domain_issues + has_port_issues_inactive = any(p["status"] == "closed" for p in port_statuses) if port_statuses else False + if has_domain_issues_inactive or has_port_issues_inactive: + health = "needs_attention" + else: + health = "inactive" elif status == "failed": health = "failed" else: From 1651f8de374b873d5adc343cc2b3ad65a4a63f4f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:09:21 +0000 Subject: [PATCH 3/4] Clean up inactive health variable naming in service detail Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/0baad662-d798-4d3e-a079-eefece637ab7 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/server.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index a864466..84a59c0 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -2681,9 +2681,8 @@ async def api_service_detail(unit: str, icon: str | None = None): elif status == "inactive": # For enabled services that are inactive (e.g. socket-activated PHP-FPM), # still check domain/port health so detail health is consistent. - has_domain_issues_inactive = has_domain_issues - has_port_issues_inactive = any(p["status"] == "closed" for p in port_statuses) if port_statuses else False - if has_domain_issues_inactive or has_port_issues_inactive: + has_port_issues = any(p["status"] == "closed" for p in port_statuses) if port_statuses else False + if has_domain_issues or has_port_issues: health = "needs_attention" else: health = "inactive" From 2073303b1887e050d1e99cc05ce04486617c6763 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 17:10:45 +0000 Subject: [PATCH 4/4] Refine inactive branch variable naming in services health logic Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/0baad662-d798-4d3e-a079-eefece637ab7 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/server.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/sovran_systemsos_web/server.py b/app/sovran_systemsos_web/server.py index 84a59c0..e6cc92c 100644 --- a/app/sovran_systemsos_web/server.py +++ b/app/sovran_systemsos_web/server.py @@ -2424,19 +2424,19 @@ async def api_services(): # For enabled services that are inactive (e.g. socket-activated PHP-FPM), # still check domain/port health so status remains consistent with # other domain services when there are actionable issues. - has_domain_issues_inactive = False + has_domain_issues = False if needs_domain: - has_domain_issues_inactive = await loop.run_in_executor( + has_domain_issues = await loop.run_in_executor( None, _check_domain_health_fast, domain, _cached_external_ip, ) - if not has_domain_issues_inactive and domain: + if not has_domain_issues and domain: cached_reachable = _is_domain_reachable_cached(domain) if cached_reachable is False: - has_domain_issues_inactive = True - has_port_issues_inactive = False + has_domain_issues = True + has_port_issues = False if port_requirements: for p in port_requirements: ps = _check_port_status( @@ -2446,9 +2446,9 @@ async def api_services(): firewall_ports, ) if ps == "closed": - has_port_issues_inactive = True + has_port_issues = True break - if has_domain_issues_inactive or has_port_issues_inactive: + if has_domain_issues or has_port_issues: health = "needs_attention" else: health = "inactive"