fix(whatsapp): bypass text batching for slash commands - #46331
fix(whatsapp): bypass text batching for slash commands#46331ardaaltinors wants to merge 1 commit into
Conversation
|
Thanks — agreed that this overlaps with #36747. I missed that PR when opening this one. I re-checked because we hit the bug on a recent post-#35391 build, and that still makes sense: #36747 is open and has not landed on I also tested #36747 in a separate worktree. It dispatches the slash command immediately and clears the pending normal-text batch, so it covers the actual failure mode better than this PR. This PR only has one tiny behavioral difference — it strips leading whitespace before checking Happy to close this one and continue on #36747 to avoid duplicate review effort. |
|
Closing this as a duplicate of #36747. I re-checked both branches, and #36747 is the better place to land this fix because it also clears any pending normal-text batch before dispatching the slash command. The only tiny thing from this PR that might still be useful is the leading-whitespace check for slash commands, so I left that note on #36747. |
Summary
WhatsApp text batching should collapse ordinary rapid-fire messages, but gateway slash commands need immediate handling. This keeps commands like
/new,/reset, and/stopout of the debounce queue so control-plane actions are not delayed or merged with follow-up text.Changes
/.Validation
8 passedviapython -m pytest tests/gateway/test_whatsapp_text_batching.py -q -o 'addopts='python -m py_compile gateway/platforms/whatsapp.pypassedgit diff --checkpassed