chore(devcontainer): update development container configuration#753
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe PR updates devcontainer package installation, Git defaults, workspace paths, container mounts, repository cloning behavior, VS Code settings, extensions, workspace recommendations, and Pyright analysis paths. ChangesDevcontainer and workspace setup
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.devcontainer/gitignore-global (1)
4-5: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRemove the trailing blank line.
Keep exactly one newline after
_build/.As per coding guidelines, all text files must end with exactly one newline character, with no trailing blank lines or trailing whitespace on any line.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.devcontainer/gitignore-global around lines 4 - 5, Update .devcontainer/gitignore-global so _build/ is followed by exactly one newline, removing any additional blank lines or trailing whitespace.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.devcontainer/devcontainer.json:
- Line 16: Update the chat.agent.sandbox.enabled setting in the devcontainer
configuration from "off" to an isolation-preserving value, preferably "on" or
"allowNetwork", while leaving the surrounding container settings unchanged.
In @.devcontainer/setup-repos.sh:
- Around line 44-49: Ensure failures from clone_if_absent propagate through the
repository bootstrap script instead of being ignored. Update the four
clone_if_absent calls so any nonzero result terminates the script with failure,
and remove the unconditional exit 0 that masks those errors.
In `@pyproject.toml`:
- Line 23: Replace the globbed extraPaths entry in pyproject.toml with concrete
generated dependency paths that Pyright can resolve, covering the required
out/build dependency directories. No direct change is needed in
.devcontainer/codespace.code-workspace because pyproject.toml’s [tool.pyright]
configuration takes precedence.
- Around line 19-27: Move the Pylance policy into the existing [tool.pyright]
table in pyproject.toml alongside extraPaths, including typeCheckingMode,
include, exclude, and ignore. Update .devcontainer/codespace.code-workspace at
lines 76-80 and 90-108 to remove the now-duplicated python.analysis settings,
leaving pyproject.toml as the single source of truth.
---
Outside diff comments:
In @.devcontainer/gitignore-global:
- Around line 4-5: Update .devcontainer/gitignore-global so _build/ is followed
by exactly one newline, removing any additional blank lines or trailing
whitespace.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6cb7e404-6eee-43fe-a199-99eb98fc283f
📒 Files selected for processing (9)
.devcontainer/Dockerfile.devcontainer/codespace.code-workspace.devcontainer/devcontainer.json.devcontainer/docker-compose.yml.devcontainer/gitignore-global.devcontainer/post-create.sh.devcontainer/setup-repos.shphlex.code-workspacepyproject.toml
💤 Files with no reviewable changes (2)
- .devcontainer/post-create.sh
- phlex.code-workspace
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
*
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
All text files must end with exactly one newline character, with no trailing blank lines or trailing whitespace on any line
Files:
pyproject.toml
🔇 Additional comments (6)
.devcontainer/Dockerfile (1)
97-97: LGTM!Also applies to: 118-119
.devcontainer/devcontainer.json (1)
5-12: LGTM!Also applies to: 18-80, 104-104
.devcontainer/docker-compose.yml (1)
9-20: LGTM!Also applies to: 33-33
.devcontainer/setup-repos.sh (1)
18-42: LGTM!.devcontainer/codespace.code-workspace (2)
5-21: LGTM!
66-74: LGTM!
Improve the development container setup to better support co-located repositories and hybrid host/container workflows. Changes include: - Update `codespace.code-workspace` to use relative paths and workspace folder variables, ensuring compatibility with host-side checkouts. - Enhance `devcontainer.json` with dynamic workspace folder naming and comprehensive Python analysis paths, including build and dependency directories. - Update `docker-compose.yml` with SELinux `:Z` flags for all volume mounts and introduce a dedicated `phlex-kilo-data` volume for Kilo Code data. - Refine `setup-repos.sh` to mark cloned repositories as safe directories and ensure reliable execution. - Add a global `.gitignore` to the container image to reduce noise from build artifacts. - Clean up redundant extension recommendations in `phlex.code-workspace`.
Explicitly invoke bash for devcontainer lifecycle scripts to ensure consistent execution. Expand `extraPaths` in `pyproject.toml` for Pyright/Pylance to resolve dependencies from build directories and Spack environments within the devcontainer, improving IDE type checking and navigation.
Relocate the logic for rewriting Kilo's `baseURL` from `post-create.sh` to a dedicated script in `/etc/profile.d/`. This ensures that `KILO_CONFIG_CONTENT` is correctly exported for all shells and processes within the container runtime, rather than only being appended to `.bashrc` during container creation.
Pin the `phlex-dev` base image to a specific date tag to ensure build reproducibility. Additionally: - Fix the path for `kilo-env.sh` in the Dockerfile to remove the unnecessary `.devcontainer/` prefix during the COPY command. - Remove the read-only (`ro`) flag from the Kilo configuration mount in `docker-compose.yml` to allow the environment script to modify the configuration within the container.
090ef46 to
d9bb6cc
Compare
Changed from disabling the sandbox entirely to enabling it with network access allowed and weaker nested sandbox disabled for security. This aligns with the global Kilo configuration which requires sandbox enabled for proper Agent Manager operation.
Track repositories that fail to clone (non-repository files in place or checkout failures) in an array, and exit non-zero with a summary listing all failed repositories. This ensures failed companion repository clones are detected as build failures rather than silently ignored.
…l config Move Pyright configuration from .devcontainer/codespace.code-workspace and .devcontainer/devcontainer.json to pyproject.toml. The workspace-level settings are redundant since Pyright now reads configuration from the root pyproject.toml file. The changes: - Remove duplicate python.analysis.* settings from devcontainer configs - Add pyproject.toml sections: diagnosticMode, extraPaths, exclude, ignore typeCheckingMode - Update extraPaths to use specific build preset directories (default clang-tidy) instead of wildcard pattern
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #753 +/- ##
==========================================
- Coverage 83.88% 83.84% -0.05%
==========================================
Files 172 172
Lines 7203 7203
Branches 845 845
==========================================
- Hits 6042 6039 -3
- Misses 882 883 +1
- Partials 279 281 +2
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Devcontainer workflow
Development tooling
Repository configuration
build/,out/,_deps/, and_build/.pyproject.tomlPyrightextraPaths, including devcontainer and Spack site-packages.