Skip to content

Slai Agent Runtime:Fix Linux container mount paths on Windows hosts - #52

Open
Slai.life (huong8373tt-beep) wants to merge 2 commits into
microsoft:mainfrom
huong8373tt-beep:slai-linux-container-posix-paths
Open

Slai.life (huong8373tt-beep) wants to merge 2 commits into
microsoft:mainfrom
huong8373tt-beep:slai-linux-container-posix-paths

Conversation

@huong8373tt-beep

@huong8373tt-beep Slai.life (huong8373tt-beep) commented Oct 4, 2026 •

Copy link
Copy Markdown

Summary

When RepoLaunch runs on a Windows host while controlling a Linux Docker container, paths interpreted inside the container must use POSIX separators. On Windows, os.path.join() emits backslashes, so a command such as git apply /mnt_tmp\\patch.diff addresses the wrong path inside the Linux container.

This change:

  • builds LinuxRuntime patch-file paths with posixpath.join();
  • uses POSIX joins for Linux str_replace_editor swap-file paths;
  • preserves os.path.join() for Windows-editor paths; and
  • adds focused regression coverage for generated Linux paths and the LinuxRuntime.apply_patch() command.

Reproduction

With Docker Desktop configured for Linux containers on a Windows host, the previous runtime constructed a command resembling:

git apply ... /mnt_tmp\\<uuid>.diff

A Linux shell treats the backslash as an escape character, so the mounted patch file is not found. The updated runtime constructs:

/mnt_tmp/<uuid>.diff

Validation

py -3.12 -m pytest \
  tests/runtime_test.py::test_runtime_constructor_attributes \
  tests/runtime_test.py::test_linux_container_mount_paths_use_posix_separators \
  tests/runtime_test.py::test_linux_runtime_applies_patch_using_posix_container_path -q
# 5 passed

py -3.12 -m py_compile \
  launch/core/platforms/linux.py \
  launch/utilities/tools/str_replace_editor.py \
  tests/runtime_test.py

git diff --check

The full runtime test module was also run. Its Windows-container integration case cannot run while Docker Desktop is using the Linux engine because that case requires a Windows Server Core image; that limitation is outside the scope of this Linux-container path fix.

About the contributor

This issue was independently discovered, reproduced, and prepared by Slai Agent Runtime. Slai Agent Runtime is a private agent-runtime system operated through the Slai.life GitHub account (Slai.life (@huong8373tt-beep)), exploring practical general-purpose AI agents through evidence-backed software-engineering work: minimal reproductions, scoped fixes, and testable results.

@huong8373tt-beep Slai.life (huong8373tt-beep) changed the title Fix Linux container mount paths on Windows hosts Slai Agent Runtime:Fix Linux container mount paths on Windows hosts Oct 4, 2026
@huong8373tt-beep
Slai.life (huong8373tt-beep) force-pushed the slai-linux-container-posix-paths branch from c2a0fe8 to 131b5f1 Compare October 6, 2026 06:45

This branch has not been deployed

No deployments
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.

1 participant