hermes - 💡(How to fix) Fix Telegram MEDIA audio attachment can report success while delivering no attachment [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • Ensure dropped media produces a warning/error in the returned result, not a false successful attachment claim.

Root Cause

Observed Evidence

  • User-visible failure: message said the official teaser was published, but no attachment appeared in Telegram.
  • Gateway log showed the real failure earlier in the path:
    • Skipping unsafe MEDIA directive path outside allowed roots
  • The tool response still surfaced success because the text portion was sent after media filtering removed the attachment.
  • Direct Telegram Bot API retry worked from the same file:
    • endpoint: sendVoice
    • result: ok: true
    • message_id: 1219
    • returned voice.duration: 152, mime_type: audio/ogg, file_size: 827183

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug Description

Telegram MEDIA:<path> delivery can report success while the user receives only text and no playable audio attachment. This is a regression in a high-value gateway capability: archived Chronicle/voice-episode audio must be attachable from the canonical archive path, not silently dropped.

Observed Evidence

  • User-visible failure: message said the official teaser was published, but no attachment appeared in Telegram.
  • Gateway log showed the real failure earlier in the path:
    • Skipping unsafe MEDIA directive path outside allowed roots
  • The tool response still surfaced success because the text portion was sent after media filtering removed the attachment.
  • Direct Telegram Bot API retry worked from the same file:
    • endpoint: sendVoice
    • result: ok: true
    • message_id: 1219
    • returned voice.duration: 152, mime_type: audio/ogg, file_size: 827183

Reproduction Shape

  1. Have a valid Ogg/Opus file under a durable archive path such as ~/.hermes/voice-episodes/.../teaser.ogg.
  2. Send a Telegram message through Hermes containing:
    • [[audio_as_voice]]
    • MEDIA:/home/<user>/.hermes/voice-episodes/.../teaser.ogg
  3. Observe whether Telegram receives a native voice/audio attachment.
  4. Compare the result to a direct sendVoice call with the same file.

Expected Behavior

  • If a MEDIA directive is accepted, Telegram receives a playable attachment.
  • If a MEDIA directive is rejected, the user/tool result must clearly report attachment failure, not plain-message success.
  • storage.safepath / operator-approved archival roots should be honored for media delivery after gateway/service restart.

Actual Behavior

  • The user got no attachment.
  • The assistant/tool reported success based on the text send.
  • The failure became visible only through gateway logs or direct user complaint.

Acceptance Criteria

  • Add a regression test for Telegram [[audio_as_voice]] + MEDIA:<canonical archive path> delivery or at least media extraction/filtering result propagation.
  • Ensure dropped media produces a warning/error in the returned result, not a false successful attachment claim.
  • Add an operator-facing self-test command/script or documented probe that performs a real Telegram sendVoice/sendAudio smoke test after updates.
  • Verify storage.safepath and HERMES_MEDIA_ALLOW_DIRS behavior in both gateway auto-delivery and send_message tool paths.

Timeline / Chronicle Note

This was encountered during Miadi Chronicle teaser publication and should remain part of the Iris/Hermes co-agency update timeline: an update/security tightening broke or obscured a core creative workflow until the user caught it in the field.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING