Skip to content

Fix #8: Docker sandbox mounts workspace read-only, breaking test writes - #33

Open
Sasank1236 wants to merge 1 commit into
sreerevanth:mainfrom
Sasank1236:fix/docker-sandbox-readonly-mount-issue-8
Open

Fix #8: Docker sandbox mounts workspace read-only, breaking test writes#33
Sasank1236 wants to merge 1 commit into
sreerevanth:mainfrom
Sasank1236:fix/docker-sandbox-readonly-mount-issue-8

Conversation

@Sasank1236

Copy link
Copy Markdown

Closes #8

Problem

modules/sandbox.py line 253 mounted the workspace as read-only:

"-v", f"{self.working_dir}:/workspace:ro",

Any test that writes files during a run — .pyc bytecode, coverage
reports, temp fixtures, log files — would fail inside the Docker
sandbox, even when the test logic itself was correct.

Fix

Changed the mount flag from :ro to :rw, so the container can
write to the workspace the same way the SubprocessSandbox fallback
already can.

Verified

Ran the mount directly with Docker to confirm the before/after
behavior:

docker run --rm --network=none --memory=512m --cpus=1 \
  -v "${PWD}\sample_repo:/workspace:ro" -w /workspace \
  python:3.11-slim sh -c "touch /workspace/write_test.txt && echo WRITE_OK"
  • Before fix (:ro): fails with Read-only file system
  • After fix (:rw): succeeds with WRITE_OK

Note

This issue was assigned to @sasikumar161106, but had no linked PR or
visible activity, so I picked it up. Happy to close in favor of
theirs if they're already working on it.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sasank1236, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bb9b62d9-6f41-4658-a02f-94c0173a8c8f

📥 Commits

Reviewing files that changed from the base of the PR and between 51e34d5 and 39f53ac.

📒 Files selected for processing (1)
  • modules/sandbox.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Bug: Docker sandbox mounts workspace as read-only, breaking test writes

1 participant