mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
fix(server): make local service-health probes dual-stack and bounded
Try both loopback families for IPv6 wildcard listeners without changing explicit or IPv4-only binds. Reserve each family a share of the API deadline, keep all later checks on the responding address, and retry a failed observation once with a fresh bounded budget in the telemetry background runner. Keep genuine API, UI and asset failures visible and report only a closed timeout category, never transport details. Cover both real listener families, startup recovery, failure and privacy boundaries; synchronise the disclosure and subsystem contract. Change-source: pulse-maintainer
This commit is contained in:
@@ -595,6 +595,27 @@ class TelemetryAdoptionReportTest(unittest.TestCase):
|
||||
{"healthy": 1, "frontend_assets": 1},
|
||||
)
|
||||
|
||||
def test_target_release_service_health_keeps_timeouts_distinct_from_connectivity(self) -> None:
|
||||
now = datetime(2026, 9, 30, 20, tzinfo=timezone.utc)
|
||||
rows = {
|
||||
category: {
|
||||
"received_at": "2026-09-30 19:00:00",
|
||||
"version": "6.4.6",
|
||||
"service_health_observed": 1,
|
||||
"service_health_healthy": 0,
|
||||
"service_health_failure_category": category,
|
||||
}
|
||||
for category in ("timeout", "api_connectivity")
|
||||
}
|
||||
summary = report.summarize_target_release_service_health(
|
||||
rows, {"6.4.6"}, "6.4.6", now=now
|
||||
)
|
||||
self.assertEqual(summary["unhealthy_installs"], 2)
|
||||
self.assertEqual(
|
||||
{entry["category"]: entry["installs"] for entry in summary["failure_categories"]},
|
||||
{"timeout": 1, "api_connectivity": 1},
|
||||
)
|
||||
|
||||
def test_target_release_followup_excludes_first_heartbeat_baselines_and_flags_rollbacks(self) -> None:
|
||||
now = datetime(2026, 8, 19, 12, tzinfo=timezone.utc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user