Add resource and workspace mount controls - #26
Open
abhishek-anand wants to merge 5 commits into
Open
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
Adds configurable resource limits and controlled host workspace mounts to the coderunner installer workflow, with persisted creation settings to prevent resuming a container under different constraints.
Changes:
- Added
--cpus,--memory, and--mountoptions (plus env var defaults) with validation and/workspace-scoped mount enforcement. - Added read-only-by-default mount behavior with explicit
:rwopt-in and persisted container creation settings via~/.coderunner/container-config. - Documented resource limit and workspace mount usage in
README.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Documents CPU/memory flags/env vars and /workspace mount rules (ro default, :rw opt-in). |
| install.sh | Implements resource/mount parsing + validation, applies settings to container run, and persists/validates creation config for safe resume. |
Suppressed comments (1)
install.sh:246
- If
container start coderunnerfails but the container still exists (e.g., corrupted/unhealthy), this path proceeds tocontainer run --name coderunner, which will typically fail due to the existing name. Add a guard here to fail closed and instruct the user to delete/recreate the container instead of attempting a newrun.
echo "Starting coderunner with $CPUS CPUs and $MEMORY memory..."
if container run \
--volume "$ASSETS_SRC/skills/user:/app/uploads/skills/user" \
--volume "$ASSETS_SRC/outputs:/app/uploads/outputs" \
"${VOLUME_ARGS[@]}" \
--name coderunner \
--detach \
--cpus "$CPUS" \
--memory "$MEMORY" \
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
macOS ships bash 3.2, where expanding an empty array under 'set -u' is a fatal 'unbound variable' error. MOUNT_SPECS, NORMALIZED_MOUNTS and VOLUME_ARGS are all empty when no --mount is passed, which breaks once this branch is combined with the 'set -u' added in #24. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/workspace:rwopt-inTesting