Fix Docker sandbox filesystem tool fallback - #1105
Conversation
Greptile SummaryThe PR fixes Docker sandbox filesystem fallback when translated host-mounted paths are inaccessible and adds regression coverage for workspace and
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| crates/tools/src/sandbox/docker.rs | Host-path read, write, and list failures now fall back to the corresponding container operations. |
| crates/tools/src/sandbox/file_system.rs | Adds strict Docker listing behavior and non-empty diagnostics for OCI copy failures. |
| crates/tools/src/sandbox/tests/core.rs | Covers inaccessible and dangling translated list roots as well as write fallback through a fake Docker CLI. |
| crates/tools/src/fs/contract_tests.rs | Adds registry-level coverage proving sandbox routing for workspace and /home/sandbox filesystem operations. |
Reviews (5): Last reviewed commit: "fix(sandbox): make translated list fallb..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance
Comparing Footnotes
|
|
This would indeed fix #1096 I think |
Docker read fallback propagated errors from the native host helper even though write and list operations retried inside the container. Catch those errors consistently and add regression coverage proving an inaccessible translated list root returns the container listing.
|
@IlyaBizyaev ok looking at making greptile 5/5 and merging |
|
@greptile review |
Explicitly verify the translated host path fails with a non-NotFound error before exercising the container fallback, so the regression test cannot pass through an empty host listing.
|
@greptile review |
The generic native list helper intentionally maps missing paths to an empty result, which prevented Docker-in-Docker mounts that are inaccessible to the gateway from reaching the container fallback. Probe translated list roots first, treat probe and path-conversion failures as fallback conditions, and cover a nonexistent host root.
|
@greptile review |
A preflight metadata check could still accept symlink roots or race with their removal before traversal. Add a strict native listing mode for Docker that treats missing and symlinked roots as fallback errors while preserving the existing empty-result contract for direct host callers.
|
@greptile review |
Summary
Read/Write/Edittools don't work in Docker #1096Validation
Completed
cargo test -p moltis-tools fs::contract_tests::sandbox_cargo test -p moltis-tools sandbox::tests::core::test_docker_cargo test -p moltis-tools sandbox::file_system::tests::cargo test -p moltis-tools(1,064 passed)cargo clippy -p moltis-tools --all-targets -- -D warningscargo fmt --all -- --check./scripts/check-file-size.sh./scripts/local-validate.sh 1105: build, lint, full tests, macOS app, iOS app, formatting, Biome, TypeScript, i18n, lockfile, file size, install names/docs, web assets, and zizmor passedRemaining
./scripts/local-validate.sh 1105:local/e2ereported 411 passed, 7 skipped, and 2 unrelated failures: OAuth disconnect UI state did not refresh, and the Daytona live API returned HTTP 401Manual QA