Skip to content

fix(telegram): salvage docker-only MEDIA path diagnostics#12465

Merged
kshitijk4poor merged 2 commits into
mainfrom
salvage/helix4u-telegram-media
Apr 19, 2026
Merged

fix(telegram): salvage docker-only MEDIA path diagnostics#12465
kshitijk4poor merged 2 commits into
mainfrom
salvage/helix4u-telegram-media

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Summary

  • salvages helix4u's Telegram/Docker MEDIA path diagnostics from fix(telegram): warn on docker-only media paths #6392 onto current main
  • preserves the original contributor commit and adds a small current-main follow-up commit
  • improves both runtime diagnostics and docs for Docker-backed gateway file delivery

What this fixes

When the agent emits MEDIA:/... paths from a Docker-backed terminal, the gateway process runs on the host and cannot read container-local paths like /workspace/report.txt.

Current main only says File not found: ..., which hides the real problem.

This salvage adds:

  • clearer Telegram local-media errors when MEDIA points at container-local paths
  • a gateway startup warning when Docker-backed messaging has no explicit host-visible export mount
  • docs/config examples for the recommended host-visible export pattern
  • focused regression tests

Tightening added on top of the original PR

Current-main follow-up fixes included in this salvage:

  • reuse one helper for the Docker-local path hint across document/image/video/audio local-media send paths
  • include /outputs/... alongside /output/...
  • soften the startup warning so it does not falsely imply custom host-visible mounts are broken; it now warns specifically about the risky container-local MEDIA path pattern
  • add extra regressions for /outputs/... and non-document media coverage

Files changed

  • gateway/platforms/telegram.py
  • gateway/run.py
  • hermes_cli/config.py
  • tests/gateway/test_runner_startup_failures.py
  • tests/gateway/test_telegram_documents.py
  • website/docs/user-guide/configuration.md
  • website/docs/user-guide/messaging/telegram.md

Verification

Focused tests:

  • python -m pytest tests/gateway/test_telegram_documents.py tests/gateway/test_runner_startup_failures.py -o "addopts=" -q
  • result: 42 passed

Syntax/smoke:

  • python3 -m py_compile gateway/run.py
  • python3 -m py_compile gateway/platforms/telegram.py
  • python3 -m py_compile tests/gateway/test_runner_startup_failures.py
  • python3 -m py_compile tests/gateway/test_telegram_documents.py

Contributor credit

This PR cherry-picks helix4u's original commit from #6392 so rebase-merge preserves their authorship in git history.

helix4u and others added 2 commits April 19, 2026 13:56
Follow-up on top of the helix4u #6392 cherry-pick:
- reuse one helper for actionable Docker-local file-not-found errors
  across document/image/video/audio local-media send paths
- include /outputs/... alongside /output/... in the container-local
  path hint
- soften the gateway startup warning so it does not imply custom
  host-visible mounts are broken; the warning now targets the specific
  risky pattern of emitting container-local MEDIA paths without an
  explicit export mount
- add focused regressions for /outputs/... and non-document media hint
  coverage

This keeps the salvage aligned with the actual MEDIA delivery problem on
current main while reducing false-positive operator messaging.
@kshitijk4poor kshitijk4poor merged commit ff63e2e into main Apr 19, 2026
6 of 8 checks passed
@kshitijk4poor kshitijk4poor deleted the salvage/helix4u-telegram-media branch April 19, 2026 08:55
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