Skip to content

fix: support Windows paths in media extraction#34021

Open
likaiprime wants to merge 1 commit into
NousResearch:mainfrom
likaiprime:fix/windows-media-paths
Open

fix: support Windows paths in media extraction#34021
likaiprime wants to merge 1 commit into
NousResearch:mainfrom
likaiprime:fix/windows-media-paths

Conversation

@likaiprime

Copy link
Copy Markdown

Summary

  • Support Windows drive-letter paths (D:/... and D:\\...) in MEDIA: tag extraction.
  • Support Windows drive-letter paths in bare local file auto-detection.
  • Add regression coverage for Windows forward-slash and backslash paths.

Motivation

On Windows hosts, responses like:

MEDIA:D:/hermes-workspace/media-send-tests/productmanager-media-allow-test.txt

were delivered as literal text instead of native attachments because the media path regex only accepted ~/... and POSIX absolute /... paths. This also affected bare local-file auto-detection for Windows paths.

Test plan

  • pytest -q -o addopts='' tests/gateway/test_platform_base.py::TestExtractMedia tests/gateway/test_extract_local_files.py
  • Result: 62 passed in 1.08s

Note: -o addopts='' was used on Windows because the configured pytest-timeout --timeout-method=signal uses SIGALRM, which is unavailable on Windows.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing with #30778 and #24049 — all fix Windows drive-letter path parsing in MEDIA: tag extraction and extract_local_files. #30778 and #24049 are also open. Maintainer should pick one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants