Skip to content

chore(devcontainer): update development container configuration#753

Merged
knoepfel merged 7 commits into
mainfrom
maintenance/devcontainer-kilo-logs-volume
Jul 24, 2026
Merged

chore(devcontainer): update development container configuration#753
knoepfel merged 7 commits into
mainfrom
maintenance/devcontainer-kilo-logs-volume

Conversation

@greenc-FNAL

@greenc-FNAL greenc-FNAL commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
  • Devcontainer workflow

    • Support co-located repositories and host/container workflows with relative workspace paths and dynamic workspace naming.
    • Configure Git safe directories and improve repository cloning with retries and failure handling.
    • Add SELinux relabeling to mounts and move Kilo data to a dedicated named volume.
    • Preserve Kilo authentication setup while improving post-create reliability.
  • Development tooling

    • Consolidate Docker package installation, remove obsolete Node.js/npm dependencies, and configure a global Git ignore file.
    • Expand Python/Pyright/Pylance analysis paths for build outputs, dependencies, and Spack environments.
    • Update CMake, C/C++, terminal, repository scanning, and language-server settings.
    • Explicitly include the C/C++ extension and remove workspace-level extension recommendations.
  • Repository configuration

    • Add global ignores for common build directories: build/, out/, _deps/, and _build/.
    • Document and expand pyproject.toml Pyright extraPaths, including devcontainer and Spack site-packages.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5d43314e-c0cb-481e-9e61-e6a8b55209b3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR updates devcontainer package installation, Git defaults, workspace paths, container mounts, repository cloning behavior, VS Code settings, extensions, workspace recommendations, and Pyright analysis paths.

Changes

Devcontainer and workspace setup

Layer / File(s) Summary
Container image and global Git defaults
.devcontainer/Dockerfile, .devcontainer/gitignore-global
Consolidates developer package installation, purges Node.js/npm, and configures global ignore patterns for build directories.
Container runtime and storage
.devcontainer/devcontainer.json, .devcontainer/docker-compose.yml, .devcontainer/post-create.sh
Makes the workspace identity dynamic, configures Git safe-directory handling, adds SELinux relabeling, changes Kilo storage to a named volume, and preserves the extension-install marker.
Repository bootstrap reliability
.devcontainer/setup-repos.sh
Refactors repository cloning to validate destinations, retry failures, return errors after exhausted attempts, and explicitly exit successfully after the clone sequence.
Workspace portability and analysis configuration
.devcontainer/codespace.code-workspace, .devcontainer/devcontainer.json, phlex.code-workspace, pyproject.toml
Replaces hardcoded workspace paths, expands Python analysis paths, adds C/C++ tooling, removes workspace extension recommendations, and updates Pyright extraPaths configuration.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: knoepfel

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title Check ✅ Passed Title check skipped as CodeRabbit has written the PR title.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch maintenance/devcontainer-kilo-logs-volume

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.

@coderabbitai coderabbitai Bot changed the title @coderabbitai chore(devcontainer): update development container configuration Jul 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Remove 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7b7fd8d and 090ef46.

📒 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.sh
  • phlex.code-workspace
  • pyproject.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!

Comment thread .devcontainer/devcontainer.json Outdated
Comment thread .devcontainer/setup-repos.sh Outdated
Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
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.
@greenc-FNAL
greenc-FNAL force-pushed the maintenance/devcontainer-kilo-logs-volume branch from 090ef46 to d9bb6cc Compare July 23, 2026 20:40
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

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

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     
Flag Coverage Δ
scripts 80.09% <ø> (ø)
unittests 85.72% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70ca87e...baac50f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@knoepfel
knoepfel merged commit 7fb0576 into main Jul 24, 2026
37 checks passed
@knoepfel
knoepfel deleted the maintenance/devcontainer-kilo-logs-volume branch July 24, 2026 20:52
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