Skip chat channels whose listeners query fails in /listchatchannels - #12
Merged
dmccoystephenson merged 1 commit intoAug 15, 2026
Merged
Conversation
…loses #11 Each listeners query is turned into a null-on-failure future before the queries are awaited together, so one failing query no longer completes the combined future exceptionally and suppresses every channel line. The failure is logged with the chat channel name, which the getter's own log does not carry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dmccoystephenson
force-pushed
the
fix/listchatchannels-tolerate-failing-listeners-query
branch
from
August 15, 2026 03:22
b0bbb57 to
ce341b9
Compare
Member
Author
|
Self-review rubric, scored against the diff and the CI runs on this branch:
One observation folded in here rather than left inline, as it falls outside the diff hunks: the second added test, This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). |
dmccoystephenson
deleted the
fix/listchatchannels-tolerate-failing-listeners-query
branch
August 15, 2026 03:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ListChatChannelsCommandpreviously awaited every chat channel'slistenersfuture through a single
CompletableFuture.allOf. When any one of thosequeries completed exceptionally, the combined future did too, its
thenAcceptnever ran, and no channel line was sent — the player was shown only the
title. That regression was introduced by PR List chat channels in config order rather than query completion order #10 and disclosed on A failing listeners query now suppresses the whole /listchatchannels list #11.
listenersfuture is now mapped throughhandleinto a null-on-failurefuture before the futures are awaited together, so a chat channel whose
query fails is skipped and every other channel still prints, still in chat
channel service order.
SEVEREwith the chat channel's name.RPKChatChannelImpl.listenersalready logs"Failed to get listeners", butwithout naming which channel was being resolved; the command-level log adds
that context.
Decision recorded
Issue #11 left the expected behaviour open between two readings. Reading 1 —
"a channel whose listeners query fails is skipped, and the rest of the list
still prints in order" — was chosen, because it restores exactly the tolerance
that existed before PR #10 while keeping that PR's ordering fix. Reading 2
(printing the channel with a fallback mute component) would invent a mute state
that was never resolved, and is therefore not taken here. If reading 2 is
preferred instead, this change is a small edit away from it.
Out of scope
RPKChatChannelImpl.listeners,which predates both Keep chat channels in a consistent order when listing chat channels #9 and A failing listeners query now suppresses the whole /listchatchannels list #11.
is still sent in that case, which matches what A failing listeners query now suppresses the whole /listchatchannels list #11 describes; nothing beyond
that was requested.
Test plan
skip a chat channel whose listeners query fails and still send the rest in order— three channels, the middle one completed exceptionally; asserts the
surviving two lines are sent in service order and that the failure is
logged with the channel name.
send nothing but the title when every listeners query fails— pins theboundary case.
ListChatChannelsCommandTestsareunchanged, so the ordering guarantees from PR List chat channels in config order rather than query completion order #10 are still asserted.
./gradlew test— not runnable on the dispatching machine; theGradle wrapper reports
JVM: 21.0.10, and Gradle 7.6 with Kotlin 1.7.22requires a JDK in the 17-19 range. See the anchor note below.
Anchor
UNVERIFIED locally, deferred to CI. The
buildworkflow(
.github/workflows/build.yml, JDK 17, full-treecompileKotlin+test) isthe anchor for this PR, and its result on this PR's head commit is the verdict
that counts. This PR changes Kotlin source, so it is not eligible for merge on
a red or absent anchor.
Closes #11
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).