Skip to content

fix(channels): release inbound debounce at admission - #115603

Merged
steipete merged 1 commit into
mainfrom
steipete/inbound-debounce-lane-admission
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/inbound-debounce-lane-admission

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Fixes #113180

What Problem This Solves

Fixes an issue where users sending a follow-up message while an inbound-debounced turn was still running could have that message held behind the entire prior turn instead of steering the active run. WhatsApp exposed the regression directly, and the shared debounce contract affected every channel adapter using that path.

Why This Change Was Made

The shared inbound debounce contract now separates session-lane admission from full dispatch completion. A keyed debounce lane is released as soon as the message is admitted, while completion remains tracked for error reporting and shutdown drain; abandoned work also releases the lane. The implementation migrates every current channel consumer to that one typed lifecycle boundary instead of leaving channel-specific timing behavior.

Prior art: #113312 identified the WhatsApp failure mode. Its contributor is preserved in the commit's Co-authored-by trailer.

Channel-consumer survey:

Channel Admission/completion lifecycle
Discord Migrated
Feishu Migrated
iMessage Migrated
Mattermost Migrated
Microsoft Teams Migrated
Signal Migrated
Slack Migrated
Telegram Migrated
WhatsApp Migrated, including steering, close-drain, and reused-key regressions

User Impact

Follow-up messages can reach active-run steering after debounce admission rather than waiting for the earlier turn to finish. Channel shutdown still drains admitted work, failures are still surfaced, and a reused conversation key cannot inherit stale completion state.

Evidence

  • 12 focused Vitest shards passed on the reviewed branch: the core inbound debounce lifecycle, channel debounce policy, plugin runtime test helpers, plus Discord, Feishu, iMessage, Mattermost, Microsoft Teams, Signal, Slack, Telegram, and WhatsApp adapter coverage.
  • The WhatsApp shard specifically covers active-run steering, close-drain behavior, and reused-key sequencing.
  • Full repository check lanes passed, including production/test type checks, lint, guards, dependency checks, and generated/public-surface checks.
  • Autoreview completed clean with confidence 0.91 and no accepted/actionable findings.
  • Rebase onto current origin/main completed without conflicts; the pre/post-rebase stable patch ID is identical (a9b1fb0c2d2024d41270ea543ea19594b8a5d3ef).

Track full dispatch completion separately for error handling and shutdown drain while allowing same-session follow-ups to steer active runs. Fixes #113180.

Co-authored-by: Taksh <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web channel: feishu Channel integration: feishu labels Jul 29, 2026
@steipete
steipete marked this pull request as ready for review July 29, 2026 05:17
@openclaw-barnacle openclaw-barnacle Bot added size: XL maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete
steipete merged commit a24c1ce into main Jul 29, 2026
177 of 186 checks passed
@steipete
steipete deleted the steipete/inbound-debounce-lane-admission branch July 29, 2026 05:38
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: imessage Channel integration: imessage channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web docs Improvements or additions to documentation maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: WhatsApp inbound debounce blocks active-run steering

1 participant