fix(state): list only the writable holders the live-handles count names

Since #110934 the warning counts writable handles only; joining every
member's creation site put read-only attaches (dashboard routers, one-shot
lookups) in a list meant to explain that number. Filter the listing with
the same predicate as the count, and pin it in the test with a read-only
attach that must stay out of the warning.
This commit is contained in:
Austin Pickett
2026-09-17 16:36:01 -04:00
parent e088a092f8
commit 77fb7f0a70
2 changed files with 11 additions and 1 deletions

View File

@@ -167,7 +167,11 @@ class _PathReadBudget:
warn = (handles > _HANDLES_PER_PATH_WARN and not self._duplicate_handles_warned)
if warn:
self._duplicate_handles_warned = True
creation_sites = ", ".join(sorted(member._creation_site for member in self._members))
# Same population as `handles`: the read-only attaches the count skips
# must not reappear in the list, or the list no longer explains the number.
creation_sites = ", ".join(sorted(
member._creation_site for member in self._members if not member.read_only
))
if warn:
# Writer connections cannot be capped; the only bound is not opening
# redundant handles, so make the duplicate visible before it's an incident.