Skip to content

fix(e2e): avoid multiline Deep Agents log probes - #5903

Merged
cv merged 1 commit into
mainfrom
fix/deepagents-secret-boundary-logs
Jun 27, 2026
Merged

fix(e2e): avoid multiline Deep Agents log probes#5903
cv merged 1 commit into
mainfrom
fix/deepagents-secret-boundary-logs

Conversation

@cv

@cv cv commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

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

  • 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 log 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

  • 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.

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

Refactors mark_sandbox_logs and sandbox_logs_since_marker in the Deep Agents Code secret-boundary check script to build remote commands as single remote_cmd strings passed to sandbox_exec, instead of multi-line invocations. Adds a test assertion verifying secretBoundaryCheck output contains LOG_MARKER_FOUND:%s.

Deep Agents Code secret-boundary log marker refactor

Layer / File(s) Summary
Shell helper refactor and test assertion
test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh, test/langchain-deepagents-code-image.test.ts
mark_sandbox_logs and sandbox_logs_since_marker now construct remote_cmd variables and pass them to sandbox_exec instead of using multi-line string invocations. A new expect assertion verifies secretBoundaryCheck output contains LOG_MARKER_FOUND:%s.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5899: Both PRs refactor Deep Agents e2e sandbox execution to pass single-line remote_cmd strings into sandbox_exec instead of multi-line heredoc-style invocations.
  • NVIDIA/NemoClaw#5902: Both PRs update the same Deep Agents secret-boundary e2e script to refactor sandbox_exec calls into single-line remote_cmd construction, covering complementary functions.
  • NVIDIA/NemoClaw#5767: Directly related to the secret-boundary/wrapper behavior tests that the LOG_MARKER_FOUND:%s assertion reinforces.

Suggested labels

area: e2e, integration: dcode, bug-fix

Suggested reviewers

  • jyaunches
🚥 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 accurately summarizes the main change: replacing multiline Deep Agents log probe commands with single-line remote execution.
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-logs

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... 2d78e1a +/-
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... 2d78e1a +/-
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 17:29 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

PR Review Advisor (Nemotron Ultra) — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Consider PRA-1: Test infrastructure fix: single-line OpenShell exec commands for secret boundary test.
Open items: 0 required · 0 warnings · 1 suggestion · 0 test follow-ups
Since last review: 0 prior items resolved · 0 still apply · 1 new item found

Action checklist

  • PRA-1 In-scope improvement: Test infrastructure fix: single-line OpenShell exec commands for secret boundary test in test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:45

Findings index

ID Severity Category Location Required action
PRA-1 Improvement security test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:45 No action needed — this is a test infrastructure fix. Verify the e2e test passes in CI.
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 — Test infrastructure fix: single-line OpenShell exec commands for secret boundary test

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:45
  • Category: security
  • Problem: The `mark_sandbox_logs` and `sandbox_logs_since_marker` functions were converted from multiline heredoc-style commands to single-line commands because OpenShell rejects newline-bearing exec arguments. This fixes test flakiness/breakage without changing the security assertions (secret rejection, no network path after rejection, no secret leakage). The test logic in `assert_secret_rejected`, `assert_no_rejected_interval_network_logs`, and `assert_no_rejected_interval_audit_logs` remains unchanged.
  • Impact: Improves test reliability by avoiding OpenShell's multiline exec argument rejection. No change to security boundary enforcement.
  • Suggested action: No action needed — this is a test infrastructure fix. Verify the e2e test passes in CI.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Run the secret boundary check manually: `bash test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh` against a Deep Agents Code sandbox. Confirm it passes and the self-test mode (`NEMOCLAW_E2E_SECRET_BOUNDARY_SELF_TEST=probe-command-shape`) outputs `NO_NEWLINE_IN_COMMAND`.
  • Missing regression test: The existing test `test/langchain-deepagents-code-image.test.ts` validates the shell script content including the new `LOG_MARKER_FOUND:%s` format string. The self-test mode in the script itself verifies command shape.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Diff shows both functions converted to single-line `remote_cmd` strings using `${marker@Q}` quoting. Self-test branch at line 127-136 validates command shape. Contract test updated to expect `LOG_MARKER_FOUND:%s`.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Improvement — Test infrastructure fix: single-line OpenShell exec commands for secret boundary test

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:45
  • Category: security
  • Problem: The `mark_sandbox_logs` and `sandbox_logs_since_marker` functions were converted from multiline heredoc-style commands to single-line commands because OpenShell rejects newline-bearing exec arguments. This fixes test flakiness/breakage without changing the security assertions (secret rejection, no network path after rejection, no secret leakage). The test logic in `assert_secret_rejected`, `assert_no_rejected_interval_network_logs`, and `assert_no_rejected_interval_audit_logs` remains unchanged.
  • Impact: Improves test reliability by avoiding OpenShell's multiline exec argument rejection. No change to security boundary enforcement.
  • Suggested action: No action needed — this is a test infrastructure fix. Verify the e2e test passes in CI.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Run the secret boundary check manually: `bash test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh` against a Deep Agents Code sandbox. Confirm it passes and the self-test mode (`NEMOCLAW_E2E_SECRET_BOUNDARY_SELF_TEST=probe-command-shape`) outputs `NO_NEWLINE_IN_COMMAND`.
  • Missing regression test: The existing test `test/langchain-deepagents-code-image.test.ts` validates the shell script content including the new `LOG_MARKER_FOUND:%s` format string. The self-test mode in the script itself verifies command shape.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Diff shows both functions converted to single-line `remote_cmd` strings using `${marker@Q}` quoting. Self-test branch at line 127-136 validates command shape. Contract test updated to expect `LOG_MARKER_FOUND:%s`.

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

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: ubuntu-repo-cloud-langchain-deepagents-code
Optional E2E: cloud-onboard-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • ubuntu-repo-cloud-langchain-deepagents-code (high: live sandbox onboarding with hosted inference): This typed live Vitest scenario onboards a real LangChain Deep Agents Code sandbox and runs the registered Deep Agents cloud-experimental checks, including test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh. It is the direct E2E validation for the changed secret-boundary script.

Optional E2E

  • cloud-onboard-e2e (high: live hosted onboarding): Legacy cloud onboard shell E2E also discovers scripts under test/e2e/e2e-cloud-experimental/checks and can provide additional confidence that the changed shell check remains compatible with the older shell runner path, though the Deep Agents-specific behavior is covered more directly by the typed Deep Agents scenario.

New E2E recommendations

  • None.

@github-actions

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, which is included in the live Vitest cloud-langchain-deepagents-code scenario via the cloud experimental check list. Run the targeted live-supported scenario that exercises this onboarding and policy 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/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 — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Source-of-truth review needed: OpenShell sandbox exec command-shape compatibility for Deep Agents Code secret-boundary log probes.
Open items: 0 required · 2 warnings · 0 suggestions · 1 test follow-up
Since last review: 0 prior items resolved · 0 still apply · 1 new item found

Action checklist

  • PRA-1 Resolve or justify: Source-of-truth review needed: OpenShell sandbox exec command-shape compatibility for Deep Agents Code secret-boundary log probes
  • PRA-2 Resolve or justify: Extend the single-line self-test to cover the changed log-marker helpers in test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:180
  • PRA-T1 Add or justify test follow-up: OpenShell sandbox exec command-shape compatibility for Deep Agents Code secret-boundary log probes

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
PRA-2 Resolve/justify security test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:180 In the existing `probe-command-shape` self-test branch, call `mark_sandbox_logs` and `sandbox_logs_since_marker` with a synthetic marker under the newline-rejecting `sandbox_exec` stub, and update the nearby support test to assert specific evidence for each changed helper.
Review findings by urgency: 0 required fixes, 2 items to resolve/justify, 0 in-scope improvements

⚠️ 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.

PRA-1 Resolve/justify — Source-of-truth review needed: OpenShell sandbox exec command-shape compatibility for Deep Agents Code secret-boundary log probes

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: A local self-test exists for the script's command shape, but it currently exercises only `dcode_secret_probe_runtime_env`; it should also exercise `mark_sandbox_logs` and `sandbox_logs_since_marker`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: `mark_sandbox_logs` and `sandbox_logs_since_marker` were compacted to one-line `remote_cmd` strings, but the self-test branch exits after calling only `dcode_secret_probe_runtime_env`.

PRA-2 Resolve/justify — Extend the single-line self-test to cover the changed log-marker helpers

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:180
  • Category: security
  • Problem: The PR changes `mark_sandbox_logs` and `sandbox_logs_since_marker` to avoid newline-bearing OpenShell exec arguments, but the `NEMOCLAW_E2E_SECRET_BOUNDARY_SELF_TEST=probe-command-shape` path only invokes `dcode_secret_probe_runtime_env` before exiting. The added TypeScript assertion checks that `LOG_MARKER_FOUND:%s` exists, but it would not fail if either changed helper reintroduced a multiline `sandbox_exec` payload.
  • Impact: A regression in these log helpers could pass the local support test while failing against real OpenShell, which would weaken the secret-boundary E2E check's evidence that rejected secret probes did not leak secrets or reach network paths.
  • Recommended action: In the existing `probe-command-shape` self-test branch, call `mark_sandbox_logs` and `sandbox_logs_since_marker` with a synthetic marker under the newline-rejecting `sandbox_exec` stub, and update the nearby support test to assert specific evidence for each changed helper.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `08-deepagents-code-secret-boundary.sh` lines 180-194 and confirm the self-test still calls only `dcode_secret_probe_runtime_env`; compare with changed helpers at lines 55-66.
  • Missing regression test: Extend `test/e2e-scenario/support-tests/platform-parity-cloud-experimental.test.ts`'s `keeps Deep Agents secret-boundary probe command single-line for OpenShell exec` coverage so it proves `mark_sandbox_logs` and `sandbox_logs_since_marker` also pass only newline-free command strings to `sandbox_exec`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `08-deepagents-code-secret-boundary.sh` lines 180-194 and confirm the self-test still calls only `dcode_secret_probe_runtime_env`; compare with changed helpers at lines 55-66.
  • Evidence: Changed helpers build `remote_cmd` at lines 55-66, while the self-test branch at lines 180-194 stubs `sandbox_exec` and exits after `dcode_secret_probe_runtime_env`.

💡 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.

  • None.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 OpenShell sandbox exec command-shape compatibility for Deep Agents Code secret-boundary log probes — A local self-test exists for the script's command shape, but it currently exercises only `dcode_secret_probe_runtime_env`; it should also exercise `mark_sandbox_logs` and `sandbox_logs_since_marker`.. `mark_sandbox_logs` and `sandbox_logs_since_marker` were compacted to one-line `remote_cmd` strings, but the self-test branch exits after calling only `dcode_secret_probe_runtime_env`.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: OpenShell sandbox exec command-shape compatibility for Deep Agents Code secret-boundary log probes

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: A local self-test exists for the script's command shape, but it currently exercises only `dcode_secret_probe_runtime_env`; it should also exercise `mark_sandbox_logs` and `sandbox_logs_since_marker`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: `mark_sandbox_logs` and `sandbox_logs_since_marker` were compacted to one-line `remote_cmd` strings, but the self-test branch exits after calling only `dcode_secret_probe_runtime_env`.

PRA-2 Resolve/justify — Extend the single-line self-test to cover the changed log-marker helpers

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:180
  • Category: security
  • Problem: The PR changes `mark_sandbox_logs` and `sandbox_logs_since_marker` to avoid newline-bearing OpenShell exec arguments, but the `NEMOCLAW_E2E_SECRET_BOUNDARY_SELF_TEST=probe-command-shape` path only invokes `dcode_secret_probe_runtime_env` before exiting. The added TypeScript assertion checks that `LOG_MARKER_FOUND:%s` exists, but it would not fail if either changed helper reintroduced a multiline `sandbox_exec` payload.
  • Impact: A regression in these log helpers could pass the local support test while failing against real OpenShell, which would weaken the secret-boundary E2E check's evidence that rejected secret probes did not leak secrets or reach network paths.
  • Recommended action: In the existing `probe-command-shape` self-test branch, call `mark_sandbox_logs` and `sandbox_logs_since_marker` with a synthetic marker under the newline-rejecting `sandbox_exec` stub, and update the nearby support test to assert specific evidence for each changed helper.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `08-deepagents-code-secret-boundary.sh` lines 180-194 and confirm the self-test still calls only `dcode_secret_probe_runtime_env`; compare with changed helpers at lines 55-66.
  • Missing regression test: Extend `test/e2e-scenario/support-tests/platform-parity-cloud-experimental.test.ts`'s `keeps Deep Agents secret-boundary probe command single-line for OpenShell exec` coverage so it proves `mark_sandbox_logs` and `sandbox_logs_since_marker` also pass only newline-free command strings to `sandbox_exec`.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `08-deepagents-code-secret-boundary.sh` lines 180-194 and confirm the self-test still calls only `dcode_secret_probe_runtime_env`; compare with changed helpers at lines 55-66.
  • Evidence: Changed helpers build `remote_cmd` at lines 55-66, while the self-test branch at lines 180-194 stubs `sandbox_exec` and exits after `dcode_secret_probe_runtime_env`.

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`:
- Line 439: The assertion in the `secretBoundaryCheck` test is checking the
`printf` format string instead of the emitted marker value, so update the
expectation to verify the observable output from `sandbox_logs_since_marker` in
`test/langchain-deepagents-code-image.test.ts`. Use the test case around
`secretBoundaryCheck` to assert the rendered result from the public boundary,
such as the actual `LOG_MARKER_FOUND:0/1` value that this path produces, rather
than `LOG_MARKER_FOUND:%s`.
🪄 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: 9c531ebf-ca64-41b1-a891-9053c6c72dc4

📥 Commits

Reviewing files that changed from the base of the PR and between 03d1cab and 2d78e1a.

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

expect(secretBoundaryCheck).toContain("dcode_secret_probe_runtime_env");
expect(secretBoundaryCheck).toContain("dcode_secret_probe_env_file");
expect(secretBoundaryCheck).toContain("remote_cmd=");
expect(secretBoundaryCheck).toContain("LOG_MARKER_FOUND:%s");

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the rendered marker value, not the printf format string.

sandbox_logs_since_marker emits LOG_MARKER_FOUND:0/1, so the literal %s should never appear in secretBoundaryCheck. This should assert the observable output instead, e.g. LOG_MARKER_FOUND:1 if this path is expected to preserve the marker. Based on learnings, “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` at line 439, The assertion in
the `secretBoundaryCheck` test is checking the `printf` format string instead of
the emitted marker value, so update the expectation to verify the observable
output from `sandbox_logs_since_marker` in
`test/langchain-deepagents-code-image.test.ts`. Use the test case around
`secretBoundaryCheck` to assert the rendered result from the public boundary,
such as the actual `LOG_MARKER_FOUND:0/1` value that this path produces, rather
than `LOG_MARKER_FOUND:%s`.

Source: Path instructions

@cv
cv enabled auto-merge (squash) June 27, 2026 17:35
@cv
cv disabled auto-merge June 27, 2026 18:43
@cv
cv merged commit b554222 into main Jun 27, 2026
47 checks passed
@cv
cv deleted the fix/deepagents-secret-boundary-logs branch June 27, 2026 18:43
@cv cv added the v0.0.69 label Jun 27, 2026
cv added a commit that referenced this pull request Jun 27, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Fixes the Deep Agents Code Tavily opt-in check so its Python
reachability probe no longer sends a multiline heredoc as a single
OpenShell exec argument. The post-#5903 rerun showed the scenario now
reaches the Tavily check and fails on the same newline command-shape
issue.

## Changes
- Encodes the Tavily Python probe source locally with portable `base64 |
tr -d '\n'` and decodes it inside a single-line `python3 -c` command.
- Adds a self-test mode that proves the command sent through
`sandbox_exec` is newline-free.
- Updates Deep Agents image contract tests for the new probe 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; same
Python probe, single-line transport only.
- [ ] 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/09-deepagents-code-tavily-opt-in.sh
NEMOCLAW_E2E_TAVILY_SELF_TEST=probe-command-shape bash test/e2e/e2e-cloud-experimental/checks/09-deepagents-code-tavily-opt-in.sh
npm test -- --run test/e2e-scenario/support-tests/platform-parity-cloud-experimental.test.ts 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 reliability of a cloud-experimental check by verifying a
command runs in the expected format and completes successfully.
* Strengthened validation around an opt-in workflow so it is less likely
to break due to formatting issues in generated commands.
* Added broader test coverage for the same behavior to catch regressions
earlier.

<!-- 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>
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 Tavily opt-in check so its Python
reachability probe no longer sends a multiline heredoc as a single
OpenShell exec argument. The post-NVIDIA#5903 rerun showed the scenario now
reaches the Tavily check and fails on the same newline command-shape
issue.

## Changes
- Encodes the Tavily Python probe source locally with portable `base64 |
tr -d '\n'` and decodes it inside a single-line `python3 -c` command.
- Adds a self-test mode that proves the command sent through
`sandbox_exec` is newline-free.
- Updates Deep Agents image contract tests for the new probe 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; same
Python probe, single-line transport only.
- [ ] 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/09-deepagents-code-tavily-opt-in.sh
NEMOCLAW_E2E_TAVILY_SELF_TEST=probe-command-shape bash test/e2e/e2e-cloud-experimental/checks/09-deepagents-code-tavily-opt-in.sh
npm test -- --run test/e2e-scenario/support-tests/platform-parity-cloud-experimental.test.ts 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 reliability of a cloud-experimental check by verifying a
command runs in the expected format and completes successfully.
* Strengthened validation around an opt-in workflow so it is less likely
to break due to formatting issues in generated commands.
* Added broader test coverage for the same behavior to catch regressions
earlier.

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

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure 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: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure 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