fix(telegram): salvage docker-only MEDIA path diagnostics#12465
Merged
Conversation
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.
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
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:
Tightening added on top of the original PR
Current-main follow-up fixes included in this salvage:
/outputs/...alongside/output/.../outputs/...and non-document media coverageFiles changed
gateway/platforms/telegram.pygateway/run.pyhermes_cli/config.pytests/gateway/test_runner_startup_failures.pytests/gateway/test_telegram_documents.pywebsite/docs/user-guide/configuration.mdwebsite/docs/user-guide/messaging/telegram.mdVerification
Focused tests:
python -m pytest tests/gateway/test_telegram_documents.py tests/gateway/test_runner_startup_failures.py -o "addopts=" -q42 passedSyntax/smoke:
python3 -m py_compile gateway/run.pypython3 -m py_compile gateway/platforms/telegram.pypython3 -m py_compile tests/gateway/test_runner_startup_failures.pypython3 -m py_compile tests/gateway/test_telegram_documents.pyContributor credit
This PR cherry-picks helix4u's original commit from #6392 so rebase-merge preserves their authorship in git history.