Skip to content

fix(dcode): use managed Python venv on PATH - #5816

Merged
cv merged 4 commits into
mainfrom
codex/fix-dcode-managed-venv-path
Jun 26, 2026
Merged

fix(dcode): use managed Python venv on PATH#5816
cv merged 4 commits into
mainfrom
codex/fix-dcode-managed-venv-path

Conversation

@cv

@cv cv commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Installs Deep Agents Code into a managed /opt/venv Python environment and makes the sandbox PATH resolve python3 and pip3 there before system Python.
This also protects the managed venv with policy/read-only coverage and documents the new user-visible Python environment contract.

Related Issue

Fixes #5782

Changes

  • Create /opt/venv with python3 -m venv --copies and install the hash-locked Deep Agents Code requirements through /opt/venv/bin/pip3.
  • Use one canonical Deep Agents Code PATH across the base image, final image, shell startup files, generated runtime env, and wrapper.
  • Remove upstream dcode and deepagents-code console scripts from both /usr/local/bin and /opt/venv/bin before installing the NemoClaw-managed wrapper.
  • Move package registry and network-policy Python/pip binaries to /opt/venv, make /opt/venv read-only, and extend live e2e probes for the PATH/readlink acceptance criteria.
  • Add docs for the managed Deep Agents Code Python environment and the agent-specific PATH hardening exception.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: self-reviewed the sandbox image PATH, wrapper bypass boundary, package registry binary, Landlock read-only policy, and network policy binary changes; added focused unit/static/e2e acceptance coverage.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior
  • Full npm test passes (broad runtime changes only)
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Verification detail:

  • npx vitest run test/langchain-deepagents-code-image.test.ts test/dcode-start-keepalive.test.ts test/policies.test.ts --project cli passed (158 tests).
  • npm run typecheck:cli passed.
  • SKIP=test-cli npx prek run --files ... passed for the touched files, covering formatting, SPDX, YAML checks, shellcheck, hadolint, gitleaks, source-shape, and file-size hooks.
  • npm run docs passed with 0 errors and 2 pre-existing Fern warnings.
  • Full touched-file pre-commit without SKIP=test-cli hit unrelated local rlimit fork-resource failures in test/sandbox-init.test.ts and test/sandbox-rlimit-hooks.test.ts, matching the local environment issue already observed on this machine.
  • Commit 98abfba3a4c31c821018e0a73490eb602c7400ad is GitHub Verified (reason: valid).

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features

    • Deep Agents Code now uses a managed virtual environment at /opt/venv and a consistent hardened PATH that prioritizes /opt/venv/bin.
    • Project-specific dependencies can still be isolated in a separate /sandbox virtual environment.
  • Bug Fixes

    • Sandbox policy and egress validation are now scoped to the /opt/venv Python/pip.
    • Read-only enforcement now covers /opt/venv.
  • Documentation

    • Updated quickstart and security guidance to describe the /opt/venv runtime and fixed PATH behavior.
  • Tests

    • Strengthened e2e and image checks for canonical PATH, tool availability, and /opt/venv behavior.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e514cb56-f1e7-4c85-855c-b5f8b65d18fd

📥 Commits

Reviewing files that changed from the base of the PR and between e4828f4 and a129520.

📒 Files selected for processing (2)
  • test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh
  • test/langchain-deepagents-code-image.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh
  • test/langchain-deepagents-code-image.test.ts

📝 Walkthrough

Walkthrough

The PR moves Deep Agents Code to a managed Python virtualenv at /opt/venv, updates PATH handling across image and launcher artifacts, aligns policy and manifest paths with the new environment, and updates docs and tests to assert the runtime contract.

Changes

Deep Agents Code venv PATH hardening

Layer / File(s) Summary
Build image and install into venv
agents/langchain-deepagents-code/Dockerfile.base, agents/langchain-deepagents-code/Dockerfile, agents/langchain-deepagents-code/manifest.yaml
The base image creates /opt/venv, installs dependencies with the venv pip, removes old entrypoints from system and venv locations, and points the package registry at /opt/venv/bin/pip3.
Launchers export fixed PATH
agents/langchain-deepagents-code/start.sh, agents/langchain-deepagents-code/dcode-wrapper.sh
start.sh and dcode-wrapper.sh export the fixed PATH value, and start.sh writes the same PATH into the generated runtime env script.
Sandbox policy targets /opt/venv
agents/langchain-deepagents-code/policy-additions.yaml
The read-only filesystem policy includes /opt/venv, and the managed-inference, GitHub, and PyPI binary allowlists now reference Python and pip paths from the virtualenv.
Docs and e2e checks
docs/get-started/quickstart-langchain-deepagents-code.mdx, docs/security/best-practices.mdx, test/e2e/e2e-cloud-experimental/checks/05-deepagents-code-landlock-readonly.sh, test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh
The quickstart and security docs describe the managed virtualenv and fixed PATH, and the e2e scripts verify /opt/venv is read-only and that python3 and pip3 resolve from the virtualenv.
Image contract tests
test/langchain-deepagents-code-image.test.ts
The TypeScript contract suite now asserts the canonical PATH, wrapper cleanup, virtualenv-first PATH across artifacts, policy expectations, live e2e path checks, and hash-locked venv install behavior.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5197: Earlier Deep Agents Code harness work on the same Docker, start, and wrapper artifacts is directly related to these venv/PATH contract updates.

Suggested labels

documentation, area: security

Suggested reviewers

  • prekshivyas

Poem

A bunny hopped by /opt/venv bright,
With PATH set straight and tidy right.
python3 and pip3 found their den,
No dusty old system paths again.
🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main fix: moving dcode to a managed Python venv on PATH.
Linked Issues check ✅ Passed [#5782] The PR adds /opt/venv to PATH, makes python3/pip3 resolve from the managed venv, and updates tests to enforce the expected PATH.
Out of Scope Changes check ✅ Passed All changes support the PATH/venv fix through image, policy, test, and docs updates; no unrelated code changes stand out.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-dcode-managed-venv-path

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

@github-code-quality

github-code-quality Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the codex/fix-dcode-mana... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main codex/fix-dcode-mana... a129520 +/-
nemoclaw/src/se...cret-scanner.ts 100%
nemoclaw/src/commands/slash.ts 100%
nemoclaw/src/li...bprocess-env.ts 100%
nemoclaw/src/bl...eprint/state.ts 98%
nemoclaw/src/onboard/config.ts 98%
nemoclaw/src/bl...int/snapshot.ts 97%
nemoclaw/src/bl...print/runner.ts 95%
nemoclaw/src/co...ration-state.ts 94%
nemoclaw/src/bl...ate-networks.ts 94%
nemoclaw/src/index.ts 94%

TypeScript / code-coverage/cli

The overall coverage in the codex/fix-dcode-mana... branch is 47%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main codex/fix-dcode-mana... a129520 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/inference/local.ts 76%
src/lib/sandbox/config.ts 72%
src/lib/actions...dbox/rebuild.ts 71%
src/lib/onboard/preflight.ts 64%
src/lib/actions...licy-channel.ts 60%
src/lib/state/sandbox.ts 56%
src/lib/policy/index.ts 49%
src/lib/onboard...er-gpu-patch.ts 44%
src/lib/onboard.ts 19%

Updated June 25, 2026 22:00 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: No advisor follow-up required beyond maintainer review.
Open items: 0 required · 0 warnings · 0 suggestions · 0 test follow-ups
Since last review: 1 prior item resolved · 0 still apply · 0 new items found

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-onboard-e2e, network-policy-e2e
Optional E2E: sandbox-survival-e2e

Dispatch hint: cloud-onboard-e2e,network-policy-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-onboard-e2e (high): Runs a real install/onboard/sandbox-health flow with hosted inference and the cloud-experimental checks directory that contains the Deep Agents Code Landlock and Python egress probes. This PR changes sandbox startup, managed inference environment, filesystem policy, and live Deep Agents check scripts, so a hosted onboarding path is required. For this PR the lane should be run against the langchain-deepagents-code agent so checks 05 and 06 do not skip.
  • network-policy-e2e (high): Required because policy-additions.yaml changes binary attribution and allow/deny behavior for Python, pip, managed inference, GitHub, and PyPI egress. The existing network-policy E2E is the closest live policy regression lane and should run to catch OpenShell policy enforcement regressions.

Optional E2E

  • sandbox-survival-e2e (medium): Useful adjacent confidence because start.sh and PATH/runtime environment changes can affect sandbox entrypoint stability and lifecycle survival, although this lane is not Deep Agents Code-specific.

New E2E recommendations

  • Deep Agents Code hosted onboarding (high): The existing cloud-onboard-e2e job appears to run the default agent, while the Deep Agents Code checks intentionally skip unless the sandbox has /sandbox/.deepagents and dcode. Add a selectable or dedicated job that sets NEMOCLAW_AGENT=langchain-deepagents-code and runs test/e2e/test-cloud-onboard-e2e.sh so the updated 05/06 Deep Agents Code checks execute in CI.
    • Suggested test: deepagents-code-cloud-onboard-e2e
  • Deep Agents Code image build (high): This PR changes agents/langchain-deepagents-code/Dockerfile.base and Dockerfile, but the inspected image workflows build the default and Hermes sandbox images, not the Deep Agents Code base/production image. Add a CI E2E image-build lane that builds the Deep Agents Code base image, builds the production image from it, and verifies dcode/deepagents-code wrapper replacement plus /opt/venv PATH resolution before live onboarding.
    • Suggested test: deepagents-code-image-build-e2e

Dispatch hint

  • Workflow: .github/workflows/nightly-e2e.yaml
  • jobs input: cloud-onboard-e2e,network-policy-e2e

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: None
Optional Vitest E2E scenarios: None

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • None. This PR changes the LangChain Deep Agents Code image, manifest, entrypoint, PATH/venv, and policy surfaces. The matching typed scenario is ubuntu-repo-cloud-langchain-deepagents-code, but it is not live-supported by the trusted runtime-support configuration, and there is no free-standing Deep Agents Code Vitest job wired in e2e-vitest-scenarios.yaml. No Vitest scenario dispatch can currently prove this surface.

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • agents/langchain-deepagents-code/Dockerfile
  • agents/langchain-deepagents-code/Dockerfile.base
  • agents/langchain-deepagents-code/dcode-wrapper.sh
  • agents/langchain-deepagents-code/manifest.yaml
  • agents/langchain-deepagents-code/policy-additions.yaml
  • agents/langchain-deepagents-code/start.sh

@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: 1

🧹 Nitpick comments (1)
test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh (1)

83-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the full canonical PATH, not only the prefix.

This probe still passes if an unexpected directory is inserted after /opt/venv/bin, because it only checks ^PATH=/usr/local/bin:/opt/venv/bin: plus USRLOCAL_COUNT=1. That leaves room for a PATH-construction regression while the test stays green. Please compare against the full ordered PATH contract, or at least validate every expected segment and count, so any extra entry fails the check.

🤖 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 `@test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh`
around lines 83 - 89, The PATH assertion in the e2e probe is too loose because
it only checks the prefix and a single /usr/local/bin count, so unexpected
entries can still slip through. Tighten the check in the sandbox_exec validation
by comparing the full ordered PATH contract, or explicitly verifying every
expected segment from the PATH/PYTHON/PIP probe output in
06-deepagents-code-python-egress.sh so any extra directory causes the test to
fail.
🤖 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 `@agents/langchain-deepagents-code/policy-additions.yaml`:
- Around line 93-97: The PyPI allowlist in the policy additions no longer covers
the supported `/sandbox` virtualenv path used by the documented quickstart flow.
Update the allowlist entries in the policy definition to include the
`/sandbox/.../bin/pip3` and `/sandbox/.../bin/python3*` executables, or
otherwise align the policy with the documented environment in the quickstart
docs and any related tests. Use the existing allowlist block in the policy file
as the reference point and keep the scope limited to the intended
package-install traffic.

---

Nitpick comments:
In `@test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh`:
- Around line 83-89: The PATH assertion in the e2e probe is too loose because it
only checks the prefix and a single /usr/local/bin count, so unexpected entries
can still slip through. Tighten the check in the sandbox_exec validation by
comparing the full ordered PATH contract, or explicitly verifying every expected
segment from the PATH/PYTHON/PIP probe output in
06-deepagents-code-python-egress.sh so any extra directory causes the test to
fail.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bd74ed99-864c-4731-9c34-60507c6be413

📥 Commits

Reviewing files that changed from the base of the PR and between 0803588 and 98abfba.

📒 Files selected for processing (11)
  • agents/langchain-deepagents-code/Dockerfile
  • agents/langchain-deepagents-code/Dockerfile.base
  • agents/langchain-deepagents-code/dcode-wrapper.sh
  • agents/langchain-deepagents-code/manifest.yaml
  • agents/langchain-deepagents-code/policy-additions.yaml
  • agents/langchain-deepagents-code/start.sh
  • docs/get-started/quickstart-langchain-deepagents-code.mdx
  • docs/security/best-practices.mdx
  • test/e2e/e2e-cloud-experimental/checks/05-deepagents-code-landlock-readonly.sh
  • test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh
  • test/langchain-deepagents-code-image.test.ts

Comment thread agents/langchain-deepagents-code/policy-additions.yaml
expect(landlockCheck).toContain("/opt/venv is Landlock read-only for Deep Agents Code");
expect(landlockCheck).toContain("/etc is Landlock read-only for Deep Agents Code");
expect(pythonEgressCheck).toContain(`DCODE_CANONICAL_PATH="${DCODE_CANONICAL_PATH}"`);
expect(pythonEgressCheck).toContain('grep -Fxq "PATH=${DCODE_CANONICAL_PATH}"');
Comment thread test/langchain-deepagents-code-image.test.ts Dismissed
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior labels Jun 25, 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: 1

🤖 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 `@test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh`:
- Around line 54-79: The reachability checks in python_probe are misclassifying
urllib.request.urlopen HTTPError responses as blocked, which can let egress slip
through when an endpoint returns a non-2xx status. Update python_probe so it
treats HTTPError as a reached host outcome (or explicitly inspects the status
code) and only reports BLOCKED for true connection-level failures; keep
expect_allowed and expect_blocked aligned with the output format emitted by
python_probe.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 84e033b5-2be0-419e-978d-2a2a58171acb

📥 Commits

Reviewing files that changed from the base of the PR and between de14031 and e4828f4.

📒 Files selected for processing (2)
  • test/e2e/e2e-cloud-experimental/checks/06-deepagents-code-python-egress.sh
  • test/langchain-deepagents-code-image.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/langchain-deepagents-code-image.test.ts

@cv cv self-assigned this Jun 25, 2026
@wscurran wscurran added the NV QA Bugs found by the NVIDIA QA Team label Jun 26, 2026
@cv cv added the v0.0.69 label Jun 26, 2026
@cv
cv merged commit 28a83b5 into main Jun 26, 2026
45 checks passed
@cv
cv deleted the codex/fix-dcode-managed-venv-path branch June 26, 2026 00:31
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Installs Deep Agents Code into a managed `/opt/venv` Python environment
and makes the sandbox PATH resolve `python3` and `pip3` there before
system Python.
This also protects the managed venv with policy/read-only coverage and
documents the new user-visible Python environment contract.

## Related Issue
Fixes NVIDIA#5782

## Changes
- Create `/opt/venv` with `python3 -m venv --copies` and install the
hash-locked Deep Agents Code requirements through `/opt/venv/bin/pip3`.
- Use one canonical Deep Agents Code PATH across the base image, final
image, shell startup files, generated runtime env, and wrapper.
- Remove upstream `dcode` and `deepagents-code` console scripts from
both `/usr/local/bin` and `/opt/venv/bin` before installing the
NemoClaw-managed wrapper.
- Move package registry and network-policy Python/pip binaries to
`/opt/venv`, make `/opt/venv` read-only, and extend live e2e probes for
the PATH/readlink acceptance criteria.
- Add docs for the managed Deep Agents Code Python environment and the
agent-specific PATH hardening exception.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: self-reviewed the
sandbox image PATH, wrapper bypass boundary, package registry binary,
Landlock read-only policy, and network policy binary changes; added
focused unit/static/e2e acceptance coverage.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [ ] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Verification detail:
- `npx vitest run test/langchain-deepagents-code-image.test.ts
test/dcode-start-keepalive.test.ts test/policies.test.ts --project cli`
passed (158 tests).
- `npm run typecheck:cli` passed.
- `SKIP=test-cli npx prek run --files ...` passed for the touched files,
covering formatting, SPDX, YAML checks, shellcheck, hadolint, gitleaks,
source-shape, and file-size hooks.
- `npm run docs` passed with 0 errors and 2 pre-existing Fern warnings.
- Full touched-file pre-commit without `SKIP=test-cli` hit unrelated
local rlimit fork-resource failures in `test/sandbox-init.test.ts` and
`test/sandbox-rlimit-hooks.test.ts`, matching the local environment
issue already observed on this machine.
- Commit `98abfba3a4c31c821018e0a73490eb602c7400ad` is GitHub Verified
(`reason: valid`).

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Deep Agents Code now uses a managed virtual environment at `/opt/venv`
and a consistent hardened `PATH` that prioritizes `/opt/venv/bin`.
* Project-specific dependencies can still be isolated in a separate
`/sandbox` virtual environment.

* **Bug Fixes**
* Sandbox policy and egress validation are now scoped to the `/opt/venv`
Python/pip.
  * Read-only enforcement now covers `/opt/venv`.

* **Documentation**
* Updated quickstart and security guidance to describe the `/opt/venv`
runtime and fixed `PATH` behavior.

* **Tests**
* Strengthened e2e and image checks for canonical `PATH`, tool
availability, and `/opt/venv` behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior NV QA Bugs found by the NVIDIA QA Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux][CLI&UX] dcode sandbox PATH does not include managed Python venv — python3 and pip3 resolve to system paths

3 participants