fix(channels): track JoinHandles for Discord gateway and Slack event server#4501
Merged
Conversation
…server Store the JoinHandle returned by spawn_gateway in DiscordChannel and the handle from spawn_event_server in SlackChannel. Both are aborted on Drop via JoinHandle ownership semantics, giving the supervisor visibility into task lifecycle and clean shutdown behaviour. Slash-command registration spawn is intentionally fire-and-forget (let _handle) — registration failure is non-fatal by design. Closes #4493
830a71c to
bd0368d
Compare
bug-ops
added a commit
that referenced
this pull request
May 28, 2026
…server (#4501) Store the JoinHandle returned by spawn_gateway in DiscordChannel and the handle from spawn_event_server in SlackChannel. Both are aborted on Drop via JoinHandle ownership semantics, giving the supervisor visibility into task lifecycle and clean shutdown behaviour. Slash-command registration spawn is intentionally fire-and-forget (let _handle) — registration failure is non-fatal by design. Closes #4493
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
DiscordChannelnow stores theJoinHandlereturned byspawn_gateway; aborted on Drop.SlackChannelnow stores theJoinHandlereturned byspawn_event_server; aborted on Drop.spawn_event_serverreturn type changed fromReceiver<IncomingMessage>to(JoinHandle<()>, Receiver<IncomingMessage>).let _handle(intentional fire-and-forget; non-fatal by design) with doc comment.Test plan
cargo nextest run -p zeph-channels --all-features— 241/241 passcargo clippy -p zeph-channels --all-features -- -D warnings— 0 warningscargo clippy --workspace -- -D warnings— cleanRUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler --locked— cleanzeph-coreconfirmed pre-existing (pass in isolation, timeout under full workspace parallel run; unrelated tozeph-channelschanges)Closes #4493