Skip to content

Type in-container paths as POSIX on every host - #136

Merged
lexoliu merged 1 commit into
devfrom
fix/135-container-posix-paths
Oct 15, 2026
Merged

lexoliu merged 1 commit into
devfrom
fix/135-container-posix-paths

Conversation

@lexoliu

@lexoliu lexoliu commented Oct 15, 2026

Copy link
Copy Markdown
Owner

In-container paths were built with host PathBufs, so on a Windows host the tool mount became /opt/aither/tools\<key>\bin inside a Linux container.

  • New public ContainerPath (wrapping typed-path 0.12's POSIX path): absolute only, always joined with /. Used for the tool mount directory and its bin, the container side of MountSpec/MountRoot, the missing read-only mount error and the container mount check — a host path no longer type-checks there.
  • Prepared tools are typed by where they run (host path for local/SSH, ContainerPath for containers); terminal.rs passes one value per backend instead of five optional fields, removing three runtime "missing runtime/target" errors.
  • Tests without a platform gate assert /opt/aither/tools/<key> and /opt/aither/tools/<key>/bin exactly, POSIX joins of a Windows-style relative segment, rejection of relative paths and JSON round-trip.

Downstream (May): profile mount container paths parse with ContainerPath::new (relative paths are rejected), and one .display() becomes .to_string().

fmt, workspace clippy -D warnings and aither-sandbox (175 tests) pass on macOS; Windows is covered by the portability CI job.

Closes #135

Container-side paths (the tool mount directory and its bin, mount
destinations, the missing read-only mount error, the container mount
check) were built with host PathBufs, so a Windows host produced
/opt/aither/tools\<key>\bin inside a Linux container. They are now a
ContainerPath (typed-path's POSIX path, absolute only, always joined with
/), so a host path cannot be used where a container path is expected.
Prepared tools are typed by where they run, and the terminal passes one
value per backend instead of five optional fields, which removes three
runtime "missing runtime" errors.

Closes #135
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 76.84564% with 69 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
sandbox/src/terminal.rs 34.66% 49 Missing ⚠️
sandbox/src/tool_environment.rs 75.55% 11 Missing ⚠️
sandbox/src/tool_runtime.rs 91.54% 6 Missing ⚠️
sandbox/src/container.rs 96.77% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lexoliu
lexoliu merged commit f485f9a into dev Oct 15, 2026
27 checks passed
This was referenced Oct 15, 2026
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.

Container tool mount path uses host path separators on Windows

2 participants