Skip to content

fix(gateway): prevent Telegram photo burst interrupts#1422

Merged
teknium1 merged 2 commits into
mainfrom
fix/1409-photo-burst-interrupts
Mar 15, 2026
Merged

fix(gateway): prevent Telegram photo burst interrupts#1422
teknium1 merged 2 commits into
mainfrom
fix/1409-photo-burst-interrupts

Conversation

@teknium1

@teknium1 teknium1 commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • batch non-album Telegram photo bursts before they hit the gateway so rapid multi-photo sends become one logical event
  • queue photo follow-ups behind active runs instead of interrupting them at the adapter and gateway priority-interrupt layers
  • add stronger regression coverage for the reproduced failure modes, including non-album bursts and photo priority interrupts

Reproduction

I reproduced the bug on current main with focused gateway tests before applying the fix:

  • photo follow-ups during an active adapter session set the interrupt flag
  • non-album Telegram photo bursts forwarded each photo immediately instead of batching
  • the gateway priority path called the running agent interrupt hook for photo events

Test plan

  • source .venv/bin/activate && python -m pytest tests/gateway/test_interrupt_key_match.py tests/gateway/test_telegram_documents.py tests/gateway/test_telegram_photo_interrupts.py tests/gateway/test_image_enrichment.py -n0 -q
  • source .venv/bin/activate && python -m pytest tests/gateway/ -n0 -q

Credit

jplew and others added 2 commits March 15, 2026 03:49
Add regression coverage for non-album Telegram photo burst batching, photo follow-ups that should queue without interrupting active runs, and the gateway priority-interrupt path for photo events.
@teknium1 teknium1 merged commit 2b8fd9a into main Mar 15, 2026
1 check passed
teknium1 pushed a commit that referenced this pull request Mar 16, 2026
…richment

Salvaged from PR #1428 by jplew.

Removes Athabasca-specific persistence guidance accidentally merged
in PR #1422:
- Drop Athabasca docstring and injected note from _enrich_message_with_vision
- Delete tests/gateway/test_image_enrichment.py (asserted app-specific behavior)
teknium1 added a commit that referenced this pull request Mar 16, 2026
…richment (#1529)

Salvaged from PR #1428 by jplew.

Removes Athabasca-specific persistence guidance accidentally merged
in PR #1422:
- Drop Athabasca docstring and injected note from _enrich_message_with_vision
- Delete tests/gateway/test_image_enrichment.py (asserted app-specific behavior)

Co-authored-by: jplew <jplew@users.noreply.github.com>
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…-burst-interrupts

fix(gateway): prevent Telegram photo burst interrupts
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…richment (NousResearch#1529)

Salvaged from PR NousResearch#1428 by jplew.

Removes Athabasca-specific persistence guidance accidentally merged
in PR NousResearch#1422:
- Drop Athabasca docstring and injected note from _enrich_message_with_vision
- Delete tests/gateway/test_image_enrichment.py (asserted app-specific behavior)

Co-authored-by: jplew <jplew@users.noreply.github.com>
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…-burst-interrupts

fix(gateway): prevent Telegram photo burst interrupts
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…richment (NousResearch#1529)

Salvaged from PR NousResearch#1428 by jplew.

Removes Athabasca-specific persistence guidance accidentally merged
in PR NousResearch#1422:
- Drop Athabasca docstring and injected note from _enrich_message_with_vision
- Delete tests/gateway/test_image_enrichment.py (asserted app-specific behavior)

Co-authored-by: jplew <jplew@users.noreply.github.com>
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…-burst-interrupts

fix(gateway): prevent Telegram photo burst interrupts
olympus-terminal pushed a commit to olympus-terminal/hermes-agent that referenced this pull request May 16, 2026
…richment (NousResearch#1529)

Salvaged from PR NousResearch#1428 by jplew.

Removes Athabasca-specific persistence guidance accidentally merged
in PR NousResearch#1422:
- Drop Athabasca docstring and injected note from _enrich_message_with_vision
- Delete tests/gateway/test_image_enrichment.py (asserted app-specific behavior)

Co-authored-by: jplew <jplew@users.noreply.github.com>
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…-burst-interrupts

fix(gateway): prevent Telegram photo burst interrupts
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…richment (NousResearch#1529)

Salvaged from PR NousResearch#1428 by jplew.

Removes Athabasca-specific persistence guidance accidentally merged
in PR NousResearch#1422:
- Drop Athabasca docstring and injected note from _enrich_message_with_vision
- Delete tests/gateway/test_image_enrichment.py (asserted app-specific behavior)

Co-authored-by: jplew <jplew@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants