Skip to content

Reject colliding PythonInterpreter file mounts - #10205

Merged
isaacbmiller merged 4 commits into
mainfrom
deno-mount-safety
Aug 14, 2026
Merged

isaacbmiller merged 4 commits into
mainfrom
deno-mount-safety

Conversation

@isaacbmiller

@isaacbmiller isaacbmiller commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • reject distinct host files that would map to the same /sandbox/<basename>
  • allow the same canonical file to be configured for both reading and writing

Why

PythonInterpreter flattens configured file paths to basenames. Two files such as first/config.json and second/config.json therefore become one guest file, and sync can write that guest value back to both host paths.

Rejecting the ambiguous configuration preserves the existing guest path convention without adding a new mapping API in a patch release.

Size

The implementation is 8 added production lines. The remaining diff is focused regression coverage.

Verification

  • full Deno interpreter test file: 101 passed
  • collision and canonical-dedup regressions: 2 passed
  • CI-equivalent Ruff check and git diff --check passed

ampagent and others added 3 commits August 14, 2026 04:09
This reverts commit 8729b56.

Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
@isaacbmiller isaacbmiller changed the title Reject unsafe PythonInterpreter file mounts Reject colliding PythonInterpreter file mounts Aug 14, 2026
@isaacbmiller
isaacbmiller marked this pull request as ready for review August 14, 2026 10:49
@greptile-apps

greptile-apps Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The interpreter now rejects mount configurations that would expose different host files under the same sandbox filename, while preserving repeated references to the same canonical file.

Confidence Score: 5/5

No blocking failure remains.

The exercised alias and basename collision path is rejected during interpreter construction before sandbox mounting begins.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the interpreter-alias collision test script to validate that alias collisions prevent sandbox mounting, and observed a pre-mount rejection with a mounting-basename error.
  • Repeated the exact same collision test command and again saw a pre-mount rejection with the same error, confirming that the conflict cannot reach the sandbox mounting phase.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Handle aliased mount collisions" | Re-trigger Greptile

Comment thread dspy/primitives/python_interpreter.py Outdated
@isaacbmiller
isaacbmiller merged commit 072c721 into main Aug 14, 2026
20 checks passed
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.

2 participants