Skip to content

fix: support Windows paths in media extraction - #34021

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

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
Contributor

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.

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused Windows regression coverage. This is already implemented on current main by the broader fix for the same root cause.

  • Automated hermes-sweeper review verified 51d165a8e71ca84112708af4a9add7a71e4ee424 (fix(gateway): support Windows absolute paths in MEDIA tag regex and extract_local_files (#34632)) is contained in current main and in v2026.6.5.
  • gateway/platforms/base.py:1494 accepts X:\\... and X:/... MEDIA paths; gateway/platforms/base.py:3753 does the same for bare local-file extraction.
  • Current regression coverage includes both separator styles and drive-root cases in tests/gateway/test_platform_base.py:421 and tests/gateway/test_extract_local_files.py:352.
  • The merged fix also covered the gateway tool-result MEDIA matcher in gateway/run.py:1062, beyond this PR's three-file scope.

Closing as implemented on main.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 13, 2026
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 sweeper:implemented-on-main Sweeper: behavior already present on current main type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants