Skip to content

fix: accept absolute Windows attachment paths - #1091

Merged
evalstate merged 1 commit into
evalstate:mainfrom
Elon-Jiang:fix/attach-media-windows-paths
Nov 20, 2026
Merged

evalstate merged 1 commit into
evalstate:mainfrom
Elon-Jiang:fix/attach-media-windows-paths

Conversation

@Elon-Jiang

Copy link
Copy Markdown
Contributor

Drive-qualified absolute attachment paths such as C:\assets\pixel.png and C:/assets/pixel.png are rejected as URI scheme c. _classify_source checks urlparse().scheme before recognizing an absolute filesystem path. Classify absolute paths with Path first, then handle file/provider URIs and relative paths through the existing paths.

Regression tests call the real LocalFilesystemRuntime.attach_media, read a real temporary PNG, and verify its staged MIME type and pixels. On macOS, the Windows cases use the standard PureWindowsPath parser and map only filesystem resolution to that PNG. The original baseline fails both drive-path cases while the relative and native absolute controls pass. A Windows host and hosted model were not exercised.

Validation on Python 3.12 with the locked dependencies:

  • uv run pytest tests/unit/fast_agent/tools/test_local_filesystem_runtime.py tests/unit/fast_agent/tools/test_environment_filesystem_runtime.py tests/unit/fast_agent/tools/test_composite_filesystem_runtime.py -q: 96 passed.
  • uv run scripts/format.py --check: 1,742 files formatted.
  • uv run scripts/lint.py, uv run scripts/typecheck.py, uv run scripts/deadcode.py: passed.
  • uv run scripts/check_internal_resources.py: passed (4 resources).
  • Actual pre-commit Ruff lint/format and type-check hooks: passed.

The full unit/integration matrix was not run locally. Checks used UV_NO_SYNC=true with prepared dependencies whose wheels were verified against uv.lock hashes.

AI assistance: Codex was used for investigation, implementation and testing.

Wallet question, answered as the AI assistant preparing this change: I don't have personal feelings or use physical wallets.

@evalstate
evalstate merged commit 7652469 into evalstate:main Nov 20, 2026
11 checks passed
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