Skip to content

fix: validate sandbox path as POSIX for Windows compatibility (#138)#170

Open
shivashanmugam wants to merge 2 commits into
mainfrom
siva/windows_log_analysis_bot_issue_fix
Open

fix: validate sandbox path as POSIX for Windows compatibility (#138)#170
shivashanmugam wants to merge 2 commits into
mainfrom
siva/windows_log_analysis_bot_issue_fix

Conversation

@shivashanmugam

@shivashanmugam shivashanmugam commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes : #138

@codecov-commenter

codecov-commenter commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.24%. Comparing base (628923c) to head (b7f8f3d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #170      +/-   ##
==========================================
- Coverage   65.28%   65.24%   -0.05%     
==========================================
  Files          34       34              
  Lines        2394     2394              
==========================================
- Hits         1563     1562       -1     
- Misses        831      832       +1     
Flag Coverage Δ
ghcp 29.90% <100.00%> (ø)
integration 34.58% <100.00%> (+0.16%) ⬆️
ollama_local 31.95% <100.00%> (+0.16%) ⬆️
slow-browser 27.06% <66.66%> (ø)
slow-other 38.47% <100.00%> (ø)
unit 59.56% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/microbots/extras/mount.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Windows-specific validation failure when creating Mount objects with POSIX container paths (e.g., "/var/log"), which previously were interpreted as relative on Windows due to pathlib.Path selecting WindowsPath.

Changes:

  • Interpret sandbox_path using PurePosixPath so POSIX absolute paths remain absolute on Windows hosts.
  • Add in-code rationale explaining why POSIX semantics are required for sandbox/container paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +60 to +65
# The sandbox is always a POSIX (Linux) container, so the sandbox
# path must be interpreted as a POSIX path regardless of the host OS.
# Using pathlib.Path here would resolve to WindowsPath on Windows,
# which incorrectly reports POSIX absolute paths like "/var/log" as
# relative (Windows requires a drive letter for an absolute path).
sandbox_path = PurePosixPath(self.sandbox_path)
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.

In Windows there is a mount issue faced when trying to use log Analysis Bot

3 participants