From 2c26cb18ef32a71f88f2d9d4390bc47cfb1a3c84 Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Thu, 6 Aug 2026 14:32:29 -0500 Subject: [PATCH] sweep: tolerate per-candidate network errors instead of dying an unreachable PDS or a plc.directory timeout killed the whole run; the candidate cohort is guaranteed to contain dead hosts. count as probe-failed and continue. (operator patch while running the sweep) Co-Authored-By: Claude Fable 5 --- scripts/sweep_stale_upstream.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/sweep_stale_upstream.py b/scripts/sweep_stale_upstream.py index 036745e..2f88184 100644 --- a/scripts/sweep_stale_upstream.py +++ b/scripts/sweep_stale_upstream.py @@ -88,13 +88,23 @@ def main() -> None: break checked += 1 - pds = resolve_pds(client, did) + try: + pds = resolve_pds(client, did) + except httpx.HTTPError as e: + failed += 1 + print(f" probe-failed uid={uid} {did}: resolve error: {type(e).__name__}") + continue if not pds: failed += 1 print(f" probe-failed uid={uid} {did}: no PDS resolved") continue - actual = fetch_status(client, pds, did) + try: + actual = fetch_status(client, pds, did) + except httpx.HTTPError as e: + failed += 1 + print(f" probe-failed uid={uid} {did} @ {pds}: {type(e).__name__}") + continue if actual is None: failed += 1 print(f" probe-failed uid={uid} {did} @ {pds}") -- 2.51.2