feat(gateway): WhatsApp inbound plain-text batching (Telegram-style) - #17165
Closed
keiravoss94 wants to merge 3 commits into
Closed
feat(gateway): WhatsApp inbound plain-text batching (Telegram-style)#17165keiravoss94 wants to merge 3 commits into
keiravoss94 wants to merge 3 commits into
Conversation
github-actions Bot
pushed a commit
to pebble-tech/hermes-agent
that referenced
this pull request
Apr 30, 2026
…TURE_BRANCHES Cherry-picks after busy-path stack tip; update FORK.md upstream PR table.
keiravoss94
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 1, 2026 07:25
5d15931 to
889ff6a
Compare
github-actions
Bot
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 1, 2026 14:19
889ff6a to
c41808b
Compare
github-actions
Bot
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 2, 2026 05:41
c41808b to
7f4938b
Compare
github-actions
Bot
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 3, 2026 06:08
7f4938b to
3c6ef34
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 3, 2026 15:00
3c6ef34 to
644578e
Compare
github-actions
Bot
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 4, 2026 06:17
644578e to
a7ad276
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 6, 2026 07:02
a7ad276 to
8fedd1d
Compare
github-actions
Bot
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 13, 2026 07:45
79c164d to
91b235d
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 13, 2026 07:51
91b235d to
3745bf5
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 13, 2026 16:33
3745bf5 to
3f68ca0
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 13, 2026 17:12
3f68ca0 to
344c3e2
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 13, 2026 18:34
344c3e2 to
b35ca60
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 24, 2026 08:35
b35ca60 to
0934407
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 25, 2026 07:18
84ba5d4 to
1638e04
Compare
vKongv
force-pushed
the
feature/whatsapp-inbound-text-batch
branch
from
May 26, 2026 06:50
1638e04 to
c6b486d
Compare
Merge rapid text bubbles after a configurable quiet period (env: HERMES_WHATSAPP_TEXT_BATCH_*). Adaptive delay near split threshold. Docs + tests for adapter-level batching.
- enqueue photo bursts like Telegram; flush after HERMES_WHATSAPP_MEDIA_BATCH_DELAY_SECONDS (default 0.8) - cancel photo batch tasks on disconnect alongside text batches - docs and tests
_make_adapter bypasses __init__ but disconnect cancels text/photo batch timers; stub the dicts the production path expects. Pin ACP model-switch test via _resolve_model_selection to avoid provider-registry flakes.
This was referenced May 30, 2026
Contributor
|
Superseded by PR #35391 (merged, commit cddb728), which adds text-debounce batching to both WhatsApp and Weixin. The implementation was salvaged from @redpiggy-cyber's PR #35302 (both adapters) and adapted to the config.yaml path. Thanks for the earlier WhatsApp-only proposal here — closing as covered by the merged change. |
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.
What does this PR do?
Adds adapter-level text batching for the WhatsApp gateway adapter so multiple plain-text bubbles (or rapid follow-ups) merge into one agent turn after a quiet period, matching the debounce behavior already used on Telegram, Discord, and Matrix.
Related Issue
Fixes #
Type of Change
Changes Made
gateway/platforms/whatsapp.py— debounced text batching withHERMES_WHATSAPP_TEXT_BATCH_DELAY_SECONDS(default0.6)tests/gateway/test_text_batching.py— batching behavior teststests/gateway/test_whatsapp_connect.py— disconnect cleanup for batch timerswebsite/docs/reference/environment-variables.md— document batch delay env varwebsite/docs/user-guide/messaging/whatsapp.md— document batching behaviorHow to Test
uv run pytest -o addopts= tests/gateway/test_text_batching.py tests/gateway/test_whatsapp_connect.py -qChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
N/A — delete this section otherwise.
Screenshots / Logs
N/A