From eb7ccd0006cdea8ed912ead8af9822e4ac0f22d8 Mon Sep 17 00:00:00 2001 From: anti Date: Thu, 30 Apr 2026 22:06:44 -0400 Subject: [PATCH] fix(reuse_worker): remove noqa: BLE001 (rule not in ruff select) fix(generator): correct service pool count in _SVC_MIN/_SVC_MAX comment BLE001 is not in ruff.toml select (F/ANN/RUF/E/W only); the suppressions were whispering apologies to a linter that wasn't listening. Generator comment now cites the actual ~28-entry non-singleton service pool. --- decnet/correlation/reuse_worker.py | 6 +++--- decnet/topology/generator.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/decnet/correlation/reuse_worker.py b/decnet/correlation/reuse_worker.py index 07ba33c2..82707448 100644 --- a/decnet/correlation/reuse_worker.py +++ b/decnet/correlation/reuse_worker.py @@ -70,7 +70,7 @@ async def run_reuse_loop( wake_tasks.append(asyncio.create_task( _run_control_listener_signal(bus, "reuse-correlator"), )) - except Exception as exc: # noqa: BLE001 + except Exception as exc: log.warning( "reuse correlator: bus unavailable, running in poll-only mode: %s", exc, @@ -86,7 +86,7 @@ async def run_reuse_loop( results = await engine.correlate_credential_reuse( repo, min_targets=min_targets, ) - except Exception: # noqa: BLE001 + except Exception: log.exception("reuse correlator: tick failed") results = [] @@ -143,7 +143,7 @@ async def _wake_on(bus: BaseBus, wake: asyncio.Event, pattern: str) -> None: wake.set() except asyncio.CancelledError: raise - except Exception as exc: # noqa: BLE001 + except Exception as exc: log.warning( "reuse correlator: subscriber for %s died (%s); falling back to poll", pattern, exc, diff --git a/decnet/topology/generator.py b/decnet/topology/generator.py index 84fdba68..aea513bc 100644 --- a/decnet/topology/generator.py +++ b/decnet/topology/generator.py @@ -23,7 +23,9 @@ from decnet.topology.config import ( _PlannedLAN, ) -# Range of services per randomly assigned decky (matches decnet.fleet). +# Per-decky service count bounds. 1 minimum keeps every decky functional; +# 3 maximum balances service diversity against subnet IP utilization — the +# full non-singleton service pool (~28 entries) makes higher counts wasteful. _SVC_MIN = 1 _SVC_MAX = 3