Skip to content

fix(e2e): avoid multiline Deep Agents secret probe - #5902

Merged
cv merged 3 commits into
mainfrom
fix/deepagents-secret-boundary-probe
Jun 27, 2026
Merged

fix(e2e): avoid multiline Deep Agents secret probe#5902
cv merged 3 commits into
mainfrom
fix/deepagents-secret-boundary-probe

Conversation

@cv

@cv cv commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the Deep Agents Code secret-boundary check so its dcode_secret_probe no longer sends a multi-line shell snippet as a single OpenShell exec argument. The post-#5899 rerun showed OpenShell now rejects those newline-bearing command arguments before the secret-boundary assertions can run.

Changes

  • Compacts dcode_secret_probe into a single-line remote shell command while preserving stdout/stderr capture and DCODE_EXIT reporting.
  • Updates the Deep Agents image contract test to assert the compact remote command shape.

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: live E2E harness behavior only.
  • 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-review; command-shape-only change preserves existing secret-boundary assertions.
  • 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)

Targeted verification:

bash -n test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh
npm test -- --run test/langchain-deepagents-code-image.test.ts
npm run typecheck:cli

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

Summary by CodeRabbit

  • Tests
    • Strengthened secret-boundary end-to-end checks with additional stdout assertions, including formatted command output and explicit captured exit-status markers.
    • Added/extended an opt-in self-test mode that validates the probe execution argument contains no newline characters and verifies the expected “no newline” marker.
    • Added a new cloud-experimental end-to-end scenario that runs the secret-boundary check in self-test mode, confirms successful execution, and checks for the new stdout marker.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The secret-boundary probe now uses separate helpers for runtime-env and env-file execution, adds a self-test that rejects newline-bearing commands, and updates the related tests to check the new output markers.

Changes

Deep Agents Secret Boundary Probe

Layer / File(s) Summary
Remote probe helpers
test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh
dcode_secret_probe_runtime_env and dcode_secret_probe_env_file each build a single-line remote_cmd, capture dcode output through a temp file, emit DCODE_EXIT:<status>, and exit 0 after invoking sandbox_exec.
Self-test and probe wiring
test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh, test/e2e-scenario/support-tests/platform-parity-cloud-experimental.test.ts
The secret-boundary script adds the newline-detecting sandbox_exec self-test, runs dcode_secret_probe_runtime_env in that mode, and switches the runtime-env and env-file flows to the new helper functions.
Output assertions
test/langchain-deepagents-code-image.test.ts
The image test adds assertions for remote_cmd=, the newline-rejection output, the self-test environment marker, NO_NEWLINE_IN_COMMAND, and the DCODE_EXIT:%s\n pattern.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5899: Adds the same probe-command-shape self-test path and updates the surrounding secret-boundary assertions.

Suggested labels

area: e2e, integration: dcode, bug-fix

🚥 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 summarizes the main change: fixing the Deep Agents secret probe to avoid multiline shell arguments.
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.
✨ 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 fix/deepagents-secret-boundary-probe

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

@github-code-quality

github-code-quality Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/deepagents-secre... 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 fix/deepagents-secre... b7bfba2 +/-
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 fix/deepagents-secre... 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 fix/deepagents-secre... b7bfba2 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/actions...dbox/rebuild.ts 73%
src/lib/sandbox/config.ts 72%
src/lib/onboard/preflight.ts 62%
src/lib/shields/index.ts 62%
src/lib/actions...licy-channel.ts 60%
src/lib/state/sandbox.ts 56%
src/lib/policy/index.ts 48%
src/lib/onboard...er-gpu-patch.ts 47%
src/lib/onboard.ts 18%

Updated June 27, 2026 08:46 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: ubuntu-repo-cloud-langchain-deepagents-code

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No merge-blocking E2E is required because this is tests-only and cannot change NemoClaw runtime behavior or user flows. The related live Deep Agents Code scenario is useful but optional to validate the modified E2E check itself.

Optional E2E

  • ubuntu-repo-cloud-langchain-deepagents-code (high): Optional validation that the modified 08-deepagents-code-secret-boundary.sh check still works in the real Deep Agents Code cloud onboarding scenario and that the single-line OpenShell exec probe shape is compatible with the live sandbox.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: ubuntu-repo-cloud-langchain-deepagents-code
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-langchain-deepagents-code

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • ubuntu-repo-cloud-langchain-deepagents-code: The PR changes the Deep Agents Code cloud-experimental secret-boundary check script and its Vitest parity guardrail. The live registry scenario for cloud-langchain-deepagents-code runs the cloud-experimental check list, including 08-deepagents-code-secret-boundary.sh, so this targeted scenario is the smallest live-supported dispatch that exercises the changed surface.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-langchain-deepagents-code

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • test/e2e-scenario/support-tests/platform-parity-cloud-experimental.test.ts
  • test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Consider PRA-1: Parameterized probe eliminated; two hardcoded functions replace single helper.
Open items: 0 required · 0 warnings · 1 suggestion · 0 test follow-ups
Since last review: 1 prior item resolved · 0 still apply · 0 new items found

Action checklist

  • PRA-1 In-scope improvement: Parameterized probe eliminated; two hardcoded functions replace single helper in test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:37

Findings index

ID Severity Category Location Required action
PRA-1 Improvement architecture test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:37 No action needed; the simplification is complete and correct.
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 1 in-scope improvement

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

  • None.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-1 Improvement — Parameterized probe eliminated; two hardcoded functions replace single helper

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:37
  • Category: architecture
  • Problem: The previous `dcode_secret_probe(command)` helper that interpolated a command parameter into a double-quoted string has been replaced by two dedicated functions `dcode_secret_probe_runtime_env()` and `dcode_secret_probe_env_file()` with hardcoded command strings. This removes the theoretical injection surface noted in PRA-1 and simplifies the code.
  • Impact: Positive - eliminates quoting assumption risk and reduces code complexity. No user input ever reached the helper; this is a defense-in-depth improvement.
  • Suggested action: No action needed; the simplification is complete and correct.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search for 'dcode_secret_probe' in the shell script; confirm only the two new dedicated functions exist and both contain hardcoded command strings with ${FAKE_SECRET@Q}.
  • Missing regression test: Contract test at test/langchain-deepagents-code-image.test.ts:382-386 validates the new function names and command shape patterns.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Lines 37-48: dcode_secret_probe_runtime_env() and dcode_secret_probe_env_file() each build a single-line remote_cmd with hardcoded commands. Calls at lines 207 and 240 invoke them directly.
Simplification opportunities: 1 possible cut, net -15 lines possible

These are safe simplification checks only. Do not remove validation, security controls, data-loss prevention, or required tests.

  • PRA-1 yagni (test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:37): Parameterized dcode_secret_probe(command) helper with ${command} interpolation
    • Replacement: Two dedicated functions with hardcoded single-line commands
    • Net: -15 lines
    • Safety boundary: Secret-boundary assertions (assert_secret_rejected, assert_no_rejected_interval_*) must remain unchanged
Since last review details

Current findings, using the urgency labels above:

PRA-1 Improvement — Parameterized probe eliminated; two hardcoded functions replace single helper

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:37
  • Category: architecture
  • Problem: The previous `dcode_secret_probe(command)` helper that interpolated a command parameter into a double-quoted string has been replaced by two dedicated functions `dcode_secret_probe_runtime_env()` and `dcode_secret_probe_env_file()` with hardcoded command strings. This removes the theoretical injection surface noted in PRA-1 and simplifies the code.
  • Impact: Positive - eliminates quoting assumption risk and reduces code complexity. No user input ever reached the helper; this is a defense-in-depth improvement.
  • Suggested action: No action needed; the simplification is complete and correct.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search for 'dcode_secret_probe' in the shell script; confirm only the two new dedicated functions exist and both contain hardcoded command strings with ${FAKE_SECRET@Q}.
  • Missing regression test: Contract test at test/langchain-deepagents-code-image.test.ts:382-386 validates the new function names and command shape patterns.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Lines 37-48: dcode_secret_probe_runtime_env() and dcode_secret_probe_env_file() each build a single-line remote_cmd with hardcoded commands. Calls at lines 207 and 240 invoke them directly.

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 27, 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.

@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/langchain-deepagents-code-image.test.ts`:
- Around line 436-437: The test is asserting shell-script implementation details
instead of observable behavior. Update the checks in the relevant
`secretBoundaryCheck` expectation so they verify the emitted `DCODE_EXIT:<n>`
output or the newline-free execution contract, and remove assertions tied to the
internal `remote_cmd` variable name or the exact `printf` template. Keep the
test focused on the public boundary in `langchain-deepagents-code-image.test.ts`
rather than source-text internals.
🪄 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: bfa5b4a9-a84a-4ddf-b569-9f480aefa27b

📥 Commits

Reviewing files that changed from the base of the PR and between 73a3a7a and ca55a72.

📒 Files selected for processing (2)
  • test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh
  • test/langchain-deepagents-code-image.test.ts

Comment on lines +436 to +437
expect(secretBoundaryCheck).toContain("remote_cmd=");
expect(secretBoundaryCheck).toContain("DCODE_EXIT:%s\\\\n");

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Avoid asserting shell implementation text here.

These checks lock the test to the script’s internal variable name and exact printf template instead of the public behavior. Assert the emitted DCODE_EXIT:<n> line or the newline-free execution contract instead. As per path instructions, “Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions.”

🤖 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/langchain-deepagents-code-image.test.ts` around lines 436 - 437, The
test is asserting shell-script implementation details instead of observable
behavior. Update the checks in the relevant `secretBoundaryCheck` expectation so
they verify the emitted `DCODE_EXIT:<n>` output or the newline-free execution
contract, and remove assertions tied to the internal `remote_cmd` variable name
or the exact `printf` template. Keep the test focused on the public boundary in
`langchain-deepagents-code-image.test.ts` rather than source-text internals.

Source: Path instructions

cv added 2 commits June 27, 2026 01:31
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

@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/08-deepagents-code-secret-boundary.sh`:
- Line 207: The command-shape self-test currently only exercises
dcode_secret_probe_runtime_env, so a newline regression in
dcode_secret_probe_env_file can slip past the lightweight OpenShell-boundary
check. Update the self-test around dcode_secret_probe_runtime_env to also invoke
dcode_secret_probe_env_file, or refactor both checks through a shared helper so
the command-shape validation covers both helpers consistently.
🪄 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: ab607c11-535a-4a05-baf4-3cd669362f71

📥 Commits

Reviewing files that changed from the base of the PR and between 8a63f84 and b7bfba2.

📒 Files selected for processing (2)
  • test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.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

;;
esac
}
dcode_secret_probe_runtime_env

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Exercise both helpers in the command-shape self-test.

Line 207 only probes dcode_secret_probe_runtime_env, so a future newline regression in dcode_secret_probe_env_file will bypass the lightweight OpenShell-boundary check and surface only in the heavier secret-boundary path. Add the env-file helper here too, or route both through one shared self-test helper.

Suggested change
-  dcode_secret_probe_runtime_env
+  dcode_secret_probe_runtime_env
+  dcode_secret_probe_env_file
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
dcode_secret_probe_runtime_env
dcode_secret_probe_runtime_env
dcode_secret_probe_env_file
🤖 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/08-deepagents-code-secret-boundary.sh`
at line 207, The command-shape self-test currently only exercises
dcode_secret_probe_runtime_env, so a newline regression in
dcode_secret_probe_env_file can slip past the lightweight OpenShell-boundary
check. Update the self-test around dcode_secret_probe_runtime_env to also invoke
dcode_secret_probe_env_file, or refactor both checks through a shared helper so
the command-shape validation covers both helpers consistently.

Source: Path instructions

@cv
cv enabled auto-merge (squash) June 27, 2026 08:50
@cv
cv disabled auto-merge June 27, 2026 17:05
@cv
cv merged commit 03d1cab into main Jun 27, 2026
45 checks passed
@cv
cv deleted the fix/deepagents-secret-boundary-probe branch June 27, 2026 17:05
cv added a commit that referenced this pull request Jun 27, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Compacts the remaining Deep Agents Code secret-boundary log marker
probes into single-line OpenShell exec commands. The post-#5902 rerun
showed the dcode probes now pass, but the log-marker helpers still used
newline-bearing sandbox exec arguments and were rejected by OpenShell.

## Changes
- Converts `mark_sandbox_logs` to build and run a single-line remote
command.
- Converts `sandbox_logs_since_marker` to build and run a single-line
remote command.
- Updates the Deep Agents image contract test to assert the log marker
output remains present.

## Type of Change

- [x] 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
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: live E2E harness behavior
only.
- [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-review;
command-shape-only change preserves existing log assertions.
- [ ] 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)

Targeted verification:

```bash
bash -n test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh
npm test -- --run test/langchain-deepagents-code-image.test.ts
npm run typecheck:cli
```

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


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved handling of sandbox log marker checks so secret-boundary
detection is more reliable.

* **Tests**
* Updated end-to-end coverage to verify the expected `LOG_MARKER_FOUND`
output in deep agent policy checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv added the v0.0.69 label Jun 27, 2026
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Fixes the Deep Agents Code secret-boundary check so its
`dcode_secret_probe` no longer sends a multi-line shell snippet as a
single OpenShell exec argument. The post-NVIDIA#5899 rerun showed OpenShell
now rejects those newline-bearing command arguments before the
secret-boundary assertions can run.

## Changes
- Compacts `dcode_secret_probe` into a single-line remote shell command
while preserving stdout/stderr capture and `DCODE_EXIT` reporting.
- Updates the Deep Agents image contract test to assert the compact
remote command shape.

## Type of Change

- [x] 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
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: live E2E harness behavior
only.
- [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-review;
command-shape-only change preserves existing secret-boundary assertions.
- [ ] 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)

Targeted verification:

```bash
bash -n test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh
npm test -- --run test/langchain-deepagents-code-image.test.ts
npm run typecheck:cli
```

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


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

* **Tests**
* Strengthened secret-boundary end-to-end checks with additional stdout
assertions, including formatted command output and explicit captured
exit-status markers.
* Added/extended an opt-in self-test mode that validates the probe
execution argument contains no newline characters and verifies the
expected “no newline” marker.
* Added a new cloud-experimental end-to-end scenario that runs the
secret-boundary check in self-test mode, confirms successful execution,
and checks for the new stdout marker.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Compacts the remaining Deep Agents Code secret-boundary log marker
probes into single-line OpenShell exec commands. The post-NVIDIA#5902 rerun
showed the dcode probes now pass, but the log-marker helpers still used
newline-bearing sandbox exec arguments and were rejected by OpenShell.

## Changes
- Converts `mark_sandbox_logs` to build and run a single-line remote
command.
- Converts `sandbox_logs_since_marker` to build and run a single-line
remote command.
- Updates the Deep Agents image contract test to assert the log marker
output remains present.

## Type of Change

- [x] 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
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: live E2E harness behavior
only.
- [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-review;
command-shape-only change preserves existing log assertions.
- [ ] 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)

Targeted verification:

```bash
bash -n test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh
npm test -- --run test/langchain-deepagents-code-image.test.ts
npm run typecheck:cli
```

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


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved handling of sandbox log marker checks so secret-boundary
detection is more reliable.

* **Tests**
* Updated end-to-end coverage to verify the expected `LOG_MARKER_FOUND`
output in deep agent policy checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants