fix(gateway): bypass WhatsApp batching for slash commands - #36747
Open
wysie wants to merge 1 commit into
Open
Conversation
tonydwb
approved these changes
Jun 1, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
✅ Looks Good
- Clean fix: Slash commands (
/approve,/deny) now bypass WhatsApp text-debounce batching, preventing them from being merged into prior normal text - Good root cause analysis: PR body clearly explains that batching delayed every text event, including control commands
- Proper handling: Pending batches are cancelled before dispatching the command
- Tests: Two well-structured regression tests cover both immediate dispatch and pending-batch discard scenarios
- Minimal surface: Only 8 lines added to
whatsapp.py+ 38 lines of tests
Reviewed by Hermes Agent
mxnstrexgl
approved these changes
Jun 1, 2026
mxnstrexgl
left a comment
There was a problem hiding this comment.
🤖 Automated PR Review
Security Scan
- ✓ No hardcoded secrets, injection sinks, unsafe deserialization, or dependency red flags found by this automated scan.
Code Quality
- ✓ No blocking code-quality issues found by this automated scan.
Summary
Status: APPROVE — security findings: 0, quality suggestions: 0.
Automated review; raw diff content intentionally omitted.
|
One small edge case from #46331 that might be worth carrying over here: using Not a blocker for the main bug — #36747 covers the real failure mode we hit — just wanted to leave the note here while consolidating. |
Contributor
|
Thanks for the focused regression coverage. The underlying WhatsApp issue is still present on current main. Problems
Suggested changes
Automated hermes-sweeper review. |
1 task
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
/approveand/deny./approveis not merged into prior normal text.Root cause
Recent WhatsApp text batching delayed every text event, including gateway control commands. If a user sent normal text and then
/approveinside the debounce window, the adapter merged them into one non-command payload, so the approval handler never ran.Test Plan
python -m pytest tests/gateway/test_whatsapp_text_batching.py -q