fix(channels): ensure feature parity across all 7 channels (#1978)#2018
Merged
fix(channels): ensure feature parity across all 7 channels (#1978)#2018
Conversation
… AppChannel AnyChannel and AppChannel were missing explicit forwardings for send_thinking_chunk, send_stop_hint, send_usage, and send_tool_start. These fell through to trait defaults (no-ops), silently dropping events even when the underlying channel implements them. Add forwarding for all 4 missing methods in both dispatchers using the existing dispatch_channel! / dispatch_app_channel! macros. Add exhaustive channel method tests in both any.rs and src/channel.rs to prevent future drift. (CHAN-01, epic #1978)
…ract CONFIRM_TIMEOUT constant Discord and Slack confirm() implementations previously blocked indefinitely waiting for user input, diverging from the existing Telegram behavior (30s timeout with deny-on-expiry). Extract a shared CONFIRM_TIMEOUT constant (30s) to zeph-channels crate. Update Telegram to reference it. Add 30s timeout to Discord and Slack confirm() with warn-and-deny on expiry. Document the known limitation that confirm() consumes the next message regardless of intent. (CHAN-02, epic #1978)
…pplications/{id}/commands
Discord slash commands (/reset, /skills, /agent) are now registered at
DiscordChannel startup using a fire-and-forget background task. The PUT
endpoint is idempotent — safe to call on every restart. If registration
fails, a warning is logged and the bot continues normally.
Note: Slack slash commands are configured via the Slack App Manifest and
cannot be registered via runtime API. A documentation comment explains this.
(CHAN-05, epic #1978)
…en confirm() tests
IMP-02: Discord slash commands now work end-to-end. The gateway handles
INTERACTION_CREATE events by parsing APPLICATION_COMMAND interactions (type 2),
ACKing them via POST /interactions/{id}/{token}/callback with type 5
(DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE) to prevent "This interaction failed",
and injecting the command as a /<name> text message into the existing rx
channel so the agent loop processes it uniformly.
IMP-01: Replace confirm() tests that bypassed the method entirely with:
- confirm_returns_err_without_active_channel: calls confirm() directly;
verifies the method is invocable and propagates send() errors correctly
- confirm_timeout_logic_denies_on_timeout: uses tokio::time::pause() +
advance() to verify the CONFIRM_TIMEOUT deadline logic in isolation
Full integration testing of confirm() (REST send + timeout) requires a
mock HTTP server and is deferred to live agent testing.
This was
linked to
issues
Mar 19, 2026
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
Resolves epic #1978: Channel Consistency and Feature Parity
This PR implements three fixes across all channel implementations:
send_thinking_chunk,send_stop_hint,send_usage,send_tool_start)confirm()now timeout after 30s and deny (matches Telegram behavior). Remote channels no longer auto-approve destructive confirmations./reset,/skills,/agent) registered at startup and are fully functional via new gateway INTERACTION_CREATE handler.Changes
Phase 1: AnyChannel Method Forwarding
AnyChannel(any.rs) andAppChannel(src/channel.rs)Phase 2: Remote Channel Confirmations
CONFIRM_TIMEOUTconstant (30s) to zeph-channels crateconfirm()now timeout and deny on timeout.text, Discord:.content)Phase 3: Discord Slash Commands
INTERACTION_CREATEevents (type 2)/<command_name>) into the agent loopDocumentation & Specs
.local/specs/007-channels/spec.mdwith complete feature matrix and findingsQuality Gates
cargo +nightly fmt --checkPASScargo clippy --workspace --all-features -- -D warningsPASS (0 warnings)cargo nextest run --workspace --all-features --lib --binsPASS (5940 tests, +2 new timeout tests)Validators
Deferred to Future PRs
Notes
zeph-channelscrate (and zeph binary for AppChannel) — no changes to core agent logic