Skip to content

Slai-Agent-Runtime-Fix-Windows-runtime-command-capture-and-patch-paths - #44

Open
Slai.life (huong8373tt-beep) wants to merge 1 commit into
microsoft:mainfrom
huong8373tt-beep:slai-fix-windows-runtime-command-capture
Open

Slai.life (huong8373tt-beep) wants to merge 1 commit into
microsoft:mainfrom
huong8373tt-beep:slai-fix-windows-runtime-command-capture

Conversation

@huong8373tt-beep

Copy link
Copy Markdown

Provenance

This Windows runtime issue was identified while reproducing SWE-bench-Live Windows execution failures through Slai Agent Runtime.

Summary

The Windows runtime used a persistent attached PowerShell/ConPTY session for commands. That path could leave commands in an idle prompt and produce incomplete or zero-byte captures. It also inherited Linux patch-path assumptions, which are invalid for native Windows containers.

Changes

  • Execute Windows commands through Docker's non-TTY exec_run API with an explicit PowerShell script and structured exit metadata.
  • Use UTF-8 output handling, including BOM-aware decoding, so Go JSON output is not lost through encoding conversion.
  • Apply patches through a native C:\\mnt_tmp path and write patch files with LF endings.
  • Add conservative helpers for wrapped structured output recovery.
  • Use process isolation for native Windows Docker execution and allow explicit container proxy/GOPROXY configuration while bypassing the local fakerepo endpoint.
  • Use POSIX paths and LF-only patch files for Linux containers launched from Windows hosts.

Validation

  • python -m py_compile launch/core/platforms/linux.py launch/core/platforms/windows.py tests/runtime_test.py
  • git diff --check
  • python -m pytest -q tests/runtime_test.py -k runtime_constructor_attributes — 3 passed, 3 deselected

The full Docker integration matrix was not claimed because it requires a Windows Docker engine and matching Windows container image on the current host.

This PR is intentionally focused on runtime execution/capture and patch transport; it does not modify SWE-bench evaluator metadata or candidate patches.

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