Skip to content

feat(deepagents-code): add dcode status and allow OpenShell TLS key in secret guard - #6202

Merged
apurvvkumaria merged 17 commits into
mainfrom
fix/dcode-status-and-infra-key-allowlist
Jul 3, 2026
Merged

feat(deepagents-code): add dcode status and allow OpenShell TLS key in secret guard#6202
apurvvkumaria merged 17 commits into
mainfrom
fix/dcode-status-and-infra-key-allowlist

Conversation

@laitingsheng

@laitingsheng laitingsheng commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a dcode status identity command to the managed LangChain Deep Agents Code wrapper so a user connected into a sandbox can tell which sandbox the session is in, and fixes the wrapper secret guard falsely refusing to start when OpenShell injects its canonical TLS client-key path after a credential provider is attached.

Related Issue

Fixes #6189
Resolves #6186

Changes

  • agents/langchain-deepagents-code/dcode-wrapper.sh: add a status / whoami / identity subcommand that distinguishes the sandbox, NemoClaw harness, active dcode agent, inference route, upstream provider, model, endpoint, and runtime, then exits without launching Deep Agents Code; advertise the managed aliases in dcode --help.
  • agents/langchain-deepagents-code/dcode-wrapper.sh: allow only the exact runtime pair OPENSHELL_TLS_KEY=/etc/openshell/tls/client/tls.key; alternate paths, opaque values, PEM material, and provider tokens remain rejected.
  • Keep .deepagents/.env fail-closed: the OpenShell runtime exception does not apply to the user-mutable env file.
  • Add tvly- Tavily tokens to the secret-shape detection patterns.
  • src/lib/onboard/sandbox-create-launch.ts, src/lib/onboard.ts: forward NEMOCLAW_SANDBOX_NAME into the Deep Agents Code sandbox create env (gated to the langchain-deepagents-code agent).
  • agents/langchain-deepagents-code/start.sh: persist NEMOCLAW_SANDBOX_NAME into the shared runtime env file that connect shells and the wrapper source, so dcode status resolves the name.
  • docs/get-started/quickstart-langchain-deepagents-code.mdx: document dcode status.
  • Tests: wrapper identity and agent-preference resolution, managed help, exact runtime-pair acceptance, negative secret/path cases, mutable-env rejection, sandbox-create env injection, and start.sh serialization.

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: reviewed against the repository security checklist; the exception is limited to one exact runtime name/value pair, values are never logged, mutable env files remain fail-closed, and Linux tests cover alternate paths, PEM material, opaque values, and provider tokens.
  • 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 — pre-push hooks and scoped checks pass; the broad pre-commit test hook encounters unrelated environment-sensitive baseline failures.
  • Targeted tests pass for changed behavior
  • Required live Deep Agents Code E2E passes on the PR branch
  • 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) — build passes with two pre-existing warnings.
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Tinson Lai tinsonl@nvidia.com
Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Summary by CodeRabbit

  • New Features
    • Added dcode status, dcode whoami, and dcode identity to show the active sandbox/session identity and exit without launching the interactive UI.
    • Sandboxes for supported Deep Agents Code runs can now propagate a sandbox name into the runtime environment.
  • Bug Fixes
    • Strengthened runtime secret/credential checks by allowing only OpenShell’s exact mounted TLS-key keypair, and correctly rejecting additional secret-shaped Tavily token formats.
  • Documentation
    • Updated the Quickstart “Use the Harness” guide with the new identity/status workflow and command aliases.
  • Tests
    • Added and expanded coverage for identity/status output, secret gating, TLS-key allowlisting behavior, and sandbox name propagation.

Co-authored-by: Apurv Kumaria akumaria@nvidia.com
Co-authored-by: Prekshi Vyas prekshiv@nvidia.com

…n secret guard

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds dcode identity subcommands, relaxes secret checks for OPENSHELL_TLS_KEY, and passes NEMOCLAW_SANDBOX_NAME through sandbox launch and startup, with matching tests and docs.

Changes

dcode identity and environment handling

Layer / File(s) Summary
OPENSHELL_TLS_KEY allowlist
agents/langchain-deepagents-code/dcode-wrapper.sh, test/dcode-wrapper-identity.test.ts, test/langchain-deepagents-code-image.test.ts
Adds an exact-name exemption helper, extends secret-shape matching for tvly-, and verifies the allowlist and token-shape cases in wrapper tests.
dcode status command
agents/langchain-deepagents-code/dcode-wrapper.sh, test/dcode-wrapper-identity.test.ts, docs/get-started/quickstart-langchain-deepagents-code.mdx
Adds config parsing and identity output for status, whoami, and identity, with tests and quickstart documentation for the new command flow.
NEMOCLAW_SANDBOX_NAME propagation
src/lib/onboard.ts, src/lib/onboard/sandbox-create-launch.ts, agents/langchain-deepagents-code/start.sh, src/lib/onboard/sandbox-create-launch.test.ts
Threads sandbox name into launch generation, injects it for langchain-deepagents-code, and exports it into the runtime env file with unit coverage.
Start-script fixture support
test/support/dcode-start-script-fixture.ts, test/langchain-deepagents-code-image.test.ts
Adds a reusable start-script fixture helper and a test that confirms the generated proxy env file receives NEMOCLAW_SANDBOX_NAME.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: bug-fix

Suggested reviewers: jyaunches, ericksoa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: dcode status/identity support and the OpenShell TLS key secret-guard exception.
✨ 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/dcode-status-and-infra-key-allowlist

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

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/dcode-status-and... 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/dcode-status-and... 4d52e7a +/-
nemoclaw/src/se...cret-scanner.ts 100%
nemoclaw/src/commands/slash.ts 100%
nemoclaw/src/bl...eprint/state.ts 98%
nemoclaw/src/onboard/config.ts 98%
nemoclaw/src/bl...int/snapshot.ts 97%
nemoclaw/src/blueprint/ssrf.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/dcode-status-and... branch is 69%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/dcode-status-and... 4d52e7a +/-
src/lib/actions...dbox/rebuild.ts 82%
src/lib/actions...all/run-plan.ts 80%
src/lib/state/o...oard-session.ts 80%
src/lib/shields/index.ts 75%
src/lib/state/sandbox.ts 73%
src/lib/onboard...er-gpu-patch.ts 69%
src/lib/onboard/preflight.ts 69%
src/lib/actions...licy-channel.ts 59%
src/lib/policy/index.ts 56%
src/lib/onboard.ts 20%

Updated July 03, 2026 00:12 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: ubuntu-repo-cloud-langchain-deepagents-code, cloud-onboard
Optional E2E: credential-sanitization, docs-validation

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • ubuntu-repo-cloud-langchain-deepagents-code (high): Required because the PR changes the Deep Agents Code image entrypoints and runtime security boundary. This typed live target onboards a real langchain-deepagents-code sandbox and runs the existing Deep Agents Code cloud checks, including headless inference, TUI startup, secret-boundary, Tavily opt-in, Python egress, and Landlock/read-only checks.
  • cloud-onboard (high): Required because src/lib/onboard.ts and sandbox create launch env handling changed in code used by hosted onboarding. This job validates the public installer/onboarding path creates a healthy sandbox and still passes the cloud experimental security and inference checks.

Optional E2E

  • credential-sanitization (medium): Useful adjacent confidence for credential redaction and sanitization behavior because the PR changes secret-pattern handling and refusal paths, though the Deep Agents Code-specific secret boundary is already covered by the required Deep Agents target.
  • docs-validation (low): Useful non-blocking validation for the updated Deep Agents Code quickstart documentation.

New E2E recommendations

  • Deep Agents Code runtime identity (high): Existing Deep Agents Code live checks cover startup, inference, egress, and secret boundaries, but they do not appear to exercise the new dcode status / dcode whoami / dcode identity commands inside a real OpenShell sandbox with the start.sh-provided NEMOCLAW_SANDBOX_NAME environment.
    • Suggested test: Add a live cloud-experimental check, for example test/e2e/e2e-cloud-experimental/checks/11-deepagents-code-identity.sh, that runs openshell sandbox exec --name "$SANDBOX_NAME" -- dcode status and asserts the sandbox name, harness, runtime, route/provider/model/endpoint fields are present and secret-free.
  • Deep Agents Code OpenShell TLS key allowlist (medium): The PR adds a special allowlist for the supervisor-injected OPENSHELL_TLS_KEY mounted path. Unit tests cover the wrapper fixture, but a real sandbox E2E would prove the live OpenShell-injected environment does not accidentally block managed dcode startup while still rejecting mutable env-file key values.
    • Suggested test: Extend the Deep Agents Code secret-boundary live check to verify dcode --version or dcode status succeeds with the canonical OPENSHELL_TLS_KEY path present in the real sandbox environment and that a user-written .deepagents/.env OPENSHELL_TLS_KEY is refused without leaking the value.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

E2E Target Recommendation

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

Dispatch required E2E targets:

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

Workflow run

Full E2E target advisor summary

E2E Target Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E targets

  • ubuntu-repo-cloud-langchain-deepagents-code: Changes affect the LangChain Deep Agents Code sandbox image launcher/wrapper and the dcode-specific sandbox create environment path. This live-supported target onboards the dcode harness and exercises its terminal-agent and policy/runtime behavior through the registry target workflow.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field targets=ubuntu-repo-cloud-langchain-deepagents-code

Optional E2E targets

  • None.

Relevant changed files

  • agents/langchain-deepagents-code/dcode-wrapper.sh
  • agents/langchain-deepagents-code/start.sh
  • src/lib/onboard.ts
  • src/lib/onboard/sandbox-create-launch.ts

@laitingsheng laitingsheng added feature PR adds or expands user-visible functionality integration: dcode LangChain Deep Code integration behavior NV QA Bugs found by the NVIDIA QA Team area: cli Command line interface, flags, terminal UX, or output labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Fix PRA-1: OPENSHELL_TLS_KEY allowlist exception missing in env-file scan; then add or justify PRA-T1.
Open items: 1 required · 10 warnings · 3 suggestions · 8 test follow-ups
Since last review: 3 prior items resolved · 9 still apply · 6 new items found

Action checklist

  • PRA-1 Fix: OPENSHELL_TLS_KEY allowlist exception missing in env-file scan in agents/langchain-deepagents-code/dcode-wrapper.sh:387
  • PRA-2 Resolve or justify: Source-of-truth review needed for localized TOML parsers in agents/langchain-deepagents-code/dcode-wrapper.sh:402
  • PRA-3 Resolve or justify: TOML parser limitation undocumented in agents/langchain-deepagents-code/dcode-wrapper.sh:402
  • PRA-4 Resolve or justify: is_allowed_openshell_runtime_value comment vs implementation drift for env-file exception in agents/langchain-deepagents-code/dcode-wrapper.sh:340
  • PRA-5 Resolve or justify: toml_provider_metadata brittle semicolon split in agents/langchain-deepagents-code/dcode-wrapper.sh:427
  • PRA-6 Resolve or justify: Missing test: typo variant of managed placeholder key in test/dcode-wrapper-identity.test.ts:1
  • PRA-7 Resolve or justify: Missing test: config.toml without [agents] section falls back to upstream default in test/dcode-wrapper-identity.test.ts:1
  • PRA-9 Resolve or justify: E2E secret boundary check missing tvly- prefix probe in test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:1
  • PRA-10 Resolve or justify: PR fix(dcode): harden managed runtime boundaries #6082 overlap not verified in agents/langchain-deepagents-code/dcode-wrapper.sh:1
  • PRA-13 Resolve or justify: has_context_secret_shape regex parity gap with canonical CONTEXT_PATTERNS in agents/langchain-deepagents-code/dcode-wrapper.sh:40
  • PRA-14 Resolve or justify: Duplicate secret-shape functions increase drift risk in agents/langchain-deepagents-code/dcode-wrapper.sh:250
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Missing test: typo variant of managed placeholder key
  • PRA-T7 Add or justify test follow-up: Missing test: config.toml without [agents] section falls back to upstream default
  • PRA-T8 Add or justify test follow-up: E2E secret boundary check missing tvly- prefix probe
  • PRA-8 In-scope improvement: Verify issue [Ubuntu 24.04][CLI&UX] Deep Agents dcode CLI has no status subcommand — cannot show active sandbox + agent identity from inside the sandbox #6186 acceptance criteria fully met in docs/get-started/quickstart-langchain-deepagents-code.mdx:55
  • PRA-11 In-scope improvement: Allowlist order dependency not documented in agents/langchain-deepagents-code/dcode-wrapper.sh:340
  • PRA-12 In-scope improvement: Missing malformed TOML tests for parser robustness in test/dcode-wrapper-identity.test.ts:1

Findings index

ID Severity Category Location Required action
PRA-1 Required security agents/langchain-deepagents-code/dcode-wrapper.sh:387 Add explicit check in assert_no_secret_env_file at line 387: if [ "$key" = "OPENSHELL_TLS_KEY" ]; then refuse_secret_env "$env_file" "$key" "OpenShell TLS key must not appear in mutable env file"; fi. Place before is_managed_token_value_for_name check.
PRA-2 Resolve/justify architecture agents/langchain-deepagents-code/dcode-wrapper.sh:402 Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior. Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value.
PRA-3 Resolve/justify security agents/langchain-deepagents-code/dcode-wrapper.sh:402 Add code comment above toml_section_scalar documenting: parser only handles simple double-quoted scalars; config.toml is NemoClaw-generated but user-editable; malformed TOML test needed in dcode-wrapper-identity.test.ts.
PRA-4 Resolve/justify architecture agents/langchain-deepagents-code/dcode-wrapper.sh:340 Either implement the env-file check (see PRA-2) or update the comment to reflect current behavior.
PRA-5 Resolve/justify correctness agents/langchain-deepagents-code/dcode-wrapper.sh:427 Document assumption that provider route comment format is fixed by NemoClaw and won't contain semicolons in values, or use more robust parsing.
PRA-6 Resolve/justify tests test/dcode-wrapper-identity.test.ts:1 Add test case: 'rejects typo variant of managed placeholder key' — run wrapper with DEEPAGENTS_CODE_OPENAI_API_KEY=nemoclaw-managed-injecton, expect exit 2.
PRA-7 Resolve/justify tests test/dcode-wrapper-identity.test.ts:1 Add test case: 'uses upstream default when config.toml missing agents section' — build fixture without [agents], verify Agent: 'agent (default)'.
PRA-8 Improvement acceptance docs/get-started/quickstart-langchain-deepagents-code.mdx:55 Verify issue #6186 acceptance criteria are fully met. If status command satisfies the requirement, no further action needed.
PRA-9 Resolve/justify tests test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:1 Update 08-deepagents-code-secret-boundary.sh to define SECRET_PATTERN including tvly- and use it for validation, or add a second probe case with tvly- secret.
PRA-10 Resolve/justify architecture agents/langchain-deepagents-code/dcode-wrapper.sh:1 Maintainer to diff PR #6082 head against this PR head for the four shared files. Resolve any conflicts before merge.
PRA-11 Improvement security agents/langchain-deepagents-code/dcode-wrapper.sh:340 Add comment above each assertion function: 'ORDER MATTERS: managed token allowlist MUST run before generic secret-shape checks because managed tokens intentionally match credential patterns. The continue statement skips remaining checks.'
PRA-12 Improvement tests test/dcode-wrapper-identity.test.ts:1 Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value.
PRA-13 Resolve/justify security agents/langchain-deepagents-code/dcode-wrapper.sh:40 Review regex against canonical CONTEXT_PATTERNS: `(?<=(?:_KEY|API_KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL)[=: ]["']?)[A-Za-z0-9_.+/=-]{10,}` (case-insensitive, includes lowercase). Ensure parity with canonical patterns.
PRA-14 Resolve/justify security agents/langchain-deepagents-code/dcode-wrapper.sh:250 Consider extracting common secret-shape detection to a single internal function, or add a comment explaining why two separate functions exist and that they must stay in sync.

🚨 Required before merge

Address these before merging unless a maintainer explicitly overrides the advisor with rationale.

PRA-1 Required — OPENSHELL_TLS_KEY allowlist exception missing in env-file scan

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:387
  • Category: security
  • Problem: assert_no_secret_env_file() lacks explicit OPENSHELL_TLS_KEY check with 'mutable env file' message. Previous review required: if key == 'OPENSHELL_TLS_KEY', refuse_secret_env with message 'OpenShell TLS key must not appear in mutable env file', placed before is_managed_token_value_for_name check. Current code falls through to has_credential_name_context which rejects generically with 'runtime environment variable' message.
  • Impact: If OPENSHELL_TLS_KEY ever appears in the mutable .env file (future feature, debug logging, or malicious sandbox user), it would be rejected by generic credential-name-context check rather than the intended allowlist logic with explicit message. Explicit rejection clarifies intent and prevents accidental acceptance.
  • Required action: Add explicit check in assert_no_secret_env_file at line 387: if [ "$key" = "OPENSHELL_TLS_KEY" ]; then refuse_secret_env "$env_file" "$key" "OpenShell TLS key must not appear in mutable env file"; fi. Place before is_managed_token_value_for_name check.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: grep -n 'OPENSHELL_TLS_KEY' agents/langchain-deepagents-code/dcode-wrapper.sh | head -20
  • Missing regression test: Add test case in dcode-wrapper-identity.test.ts: 'refuses OPENSHELL_TLS_KEY in env file with explicit mutable env file message' — verify refusal message mentions 'mutable env file' not 'runtime environment variable'
  • Done when: The required change is committed and verification passes: grep -n 'OPENSHELL_TLS_KEY' agents/langchain-deepagents-code/dcode-wrapper.sh | head -20.
  • Evidence: assert_no_secret_env_file (lines 387-400) has no OPENSHELL_TLS_KEY check; is_allowed_openshell_runtime_value only called in assert_no_secret_runtime_env (line 346)
Review findings by urgency: 1 required fix, 10 items to resolve/justify, 3 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-2 Resolve/justify — Source-of-truth review needed for localized TOML parsers

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:402
  • Category: architecture
  • Problem: toml_section_scalar() and toml_provider_metadata() are localized TOML parsers with undocumented limitations. The invalid state: user-editable config.toml at /sandbox/.deepagents/config.toml could have malformed TOML that the parser silently ignores or misparses. Source boundary: NemoClaw generates config.toml at build time, but it's user-editable at runtime. Source-fix constraint: Can't easily call Node TOML parser from Bash wrapper before exec. No regression test for malformed TOML in the new test file.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear. Malformed or complex TOML from user edits could cause parser to return empty/incorrect values, potentially affecting identity output or agent resolution. Parser silently returns empty on mismatch.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior. Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450
  • Missing regression test: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450.
  • Evidence: toml_section_scalar only matches `key = "value"` pattern; no escape/array/table support

PRA-3 Resolve/justify — TOML parser limitation undocumented

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:402
  • Category: security
  • Problem: toml_section_scalar() and toml_provider_metadata() only parse `key = "value"` lines. No escape handling, no array/table support, no single-quoted strings. Config.toml is user-editable at /sandbox/.deepagents/config.toml.
  • Impact: Malformed or complex TOML from user edits could cause parser to return empty/incorrect values, potentially affecting identity output or agent resolution. Parser silently returns empty on mismatch.
  • Recommended action: Add code comment above toml_section_scalar documenting: parser only handles simple double-quoted scalars; config.toml is NemoClaw-generated but user-editable; malformed TOML test needed in dcode-wrapper-identity.test.ts.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450
  • Missing regression test: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450.
  • Evidence: toml_section_scalar only matches `key = "value"` pattern; no escape/array/table support

PRA-4 Resolve/justify — is_allowed_openshell_runtime_value comment vs implementation drift for env-file exception

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:340
  • Category: architecture
  • Problem: Comment says: 'Never allow the name alone, and never apply this exception to the mutable Deep Agents Code .env file.' The runtime check correctly uses is_allowed_openshell_runtime_value, but the env-file scan (assert_no_secret_env_file) has no such check — it falls through to generic credential-name-context rejection.
  • Impact: The comment documents intended behavior that is not implemented for the env-file path. This creates a false sense of security and inconsistent handling between runtime env and env-file.
  • Recommended action: Either implement the env-file check (see PRA-2) or update the comment to reflect current behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare is_allowed_openshell_runtime_value usage in assert_no_secret_runtime_env (line 346) vs assert_no_secret_env_file (line 387)
  • Missing regression test: Test verifies OPENSHELL_TLS_KEY in env file is rejected with 'mutable env file' message (see PRA-2 test)
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare is_allowed_openshell_runtime_value usage in assert_no_secret_runtime_env (line 346) vs assert_no_secret_env_file (line 387).
  • Evidence: Comment at line 340 documents env-file exclusion but assert_no_secret_env_file lacks the check

PRA-5 Resolve/justify — toml_provider_metadata brittle semicolon split

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:427
  • Category: correctness
  • Problem: Uses IFS=';' read -r route provider _api assuming provider route comment format is fixed by NemoClaw and won't contain semicolons in values.
  • Impact: If the comment format ever includes semicolons in route or provider values (e.g., a provider name with semicolon), parsing will break silently.
  • Recommended action: Document assumption that provider route comment format is fixed by NemoClaw and won't contain semicolons in values, or use more robust parsing.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read toml_provider_metadata function at lines 427-450
  • Missing regression test: Add test with semicolon in provider comment to verify graceful handling or document the constraint
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read toml_provider_metadata function at lines 427-450.
  • Evidence: IFS=';' read -r route provider _api <<<"$line" at line 427

PRA-6 Resolve/justify — Missing test: typo variant of managed placeholder key

  • Location: test/dcode-wrapper-identity.test.ts:1
  • Category: tests
  • Problem: The managed key is 'nemoclaw-managed-inference' but a typo like 'nemoclaw-managed-injecton' should be rejected as a secret-shaped value (credential name context + 10+ char value).
  • Impact: A typo in the managed placeholder could silently pass through as a valid managed token, or be rejected with a confusing message.
  • Recommended action: Add test case: 'rejects typo variant of managed placeholder key' — run wrapper with DEEPAGENTS_CODE_OPENAI_API_KEY=nemoclaw-managed-injecton, expect exit 2.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Search test/dcode-wrapper-identity.test.ts for 'typo' or 'injecton'
  • Missing regression test: Add test case in dcode-wrapper-identity.test.ts: 'rejects typo variant of managed placeholder key' — run wrapper with DEEPAGENTS_CODE_OPENAI_API_KEY=nemoclaw-managed-injecton, expect exit 2
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Search test/dcode-wrapper-identity.test.ts for 'typo' or 'injecton'.
  • Evidence: No test covers typo variant of managed placeholder

PRA-7 Resolve/justify — Missing test: config.toml without [agents] section falls back to upstream default

  • Location: test/dcode-wrapper-identity.test.ts:1
  • Category: tests
  • Problem: Current test 'uses the upstream default agent when configured preferences are stale' uses a config WITH [agents] section but non-existent agent directories. Missing test for config.toml missing [agents] section entirely.
  • Impact: If config.toml is missing the [agents] section entirely (e.g., user deleted it, or NemoClaw generated config without it), the parser returns empty and should fall back to 'agent (default)'.
  • Recommended action: Add test case: 'uses upstream default when config.toml missing agents section' — build fixture without [agents], verify Agent: 'agent (default)'.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Search test/dcode-wrapper-identity.test.ts for 'missing agents section' or 'no agents section'
  • Missing regression test: Add test case in dcode-wrapper-identity.test.ts: 'uses upstream default when config.toml missing agents section' — build fixture without [agents], verify Agent: 'agent (default)'
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Search test/dcode-wrapper-identity.test.ts for 'missing agents section' or 'no agents section'.
  • Evidence: Existing test uses config WITH [agents] section but stale dirs; no test for missing section

PRA-9 Resolve/justify — E2E secret boundary check missing tvly- prefix probe

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:1
  • Category: tests
  • Problem: Unit test parity (TOKEN_PREFIX_PATTERNS fingerprint) includes tvly-, but the live e2e check 08-deepagents-code-secret-boundary.sh may not exercise tvly- secret rejection.
  • Impact: The canonical secret pattern contract includes tvly- (Tavily API keys), but the live acceptance test may not verify the wrapper rejects tvly- secrets at the sandbox boundary.
  • Recommended action: Update 08-deepagents-code-secret-boundary.sh to define SECRET_PATTERN including tvly- and use it for validation, or add a second probe case with tvly- secret.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh and check for tvly- in SECRET_PATTERN
  • Missing regression test: E2E probe with tvly- secret in runtime env and env file, verify rejection
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh and check for tvly- in SECRET_PATTERN.
  • Evidence: TOKEN_PREFIX_PATTERNS fingerprint includes tvly-; e2e check may not cover it

PRA-10 Resolve/justify — PR #6082 overlap not verified

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:1
  • Category: architecture
  • Problem: PR fix(dcode): harden managed runtime boundaries #6082 'fix(dcode): harden managed runtime boundaries' modifies the same 4 files: dcode-wrapper.sh, start.sh, quickstart-langchain-deepagents-code.mdx, test/langchain-deepagents-code-image.test.ts.
  • Impact: Potential merge conflicts or semantic conflicts if both PRs modify the same logic in different ways.
  • Recommended action: Maintainer to diff PR fix(dcode): harden managed runtime boundaries #6082 head against this PR head for the four shared files. Resolve any conflicts before merge.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: gh pr diff 6082 -- agents/langchain-deepagents-code/dcode-wrapper.sh agents/langchain-deepagents-code/start.sh docs/get-started/quickstart-langchain-deepagents-code.mdx test/langchain-deepagents-code-image.test.ts
  • Missing regression test: Manual diff verification by maintainer
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: gh pr diff 6082 -- agents/langchain-deepagents-code/dcode-wrapper.sh agents/langchain-deepagents-code/start.sh docs/get-started/quickstart-langchain-deepagents-code.mdx test/langchain-deepagents-code-image.test.ts.
  • Evidence: Open PR fix(dcode): harden managed runtime boundaries #6082 has same 4 files in openPrOverlaps

PRA-13 Resolve/justify — has_context_secret_shape regex parity gap with canonical CONTEXT_PATTERNS

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:40
  • Category: security
  • Problem: Pattern: `(_KEY|API_KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL)[=:[:space:]]["']?[A-Z0-9_.+/=-]{10,}`. This matches uppercase keys only (due to `${1^^}`) but the value pattern `[A-Z0-9_.+/=-]{10,}` excludes lowercase letters, which may miss some secret shapes. Also matches `KEY=value` in the middle of a string.
  • Impact: May miss secrets with lowercase letters in value (e.g., base64 with lowercase), or false positive on legitimate config values containing KEY=value patterns.
  • Recommended action: Review regex against canonical CONTEXT_PATTERNS: `(?<=(?:_KEY|API_KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL)[=: ]["']?)[A-Za-z0-9_.+/=-]{10,}` (case-insensitive, includes lowercase). Ensure parity with canonical patterns.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare has_context_secret_shape regex with CONTEXT_PATTERNS in src/lib/security/secret-patterns.ts
  • Missing regression test: Add test cases for lowercase secret values and embedded KEY=value patterns
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare has_context_secret_shape regex with CONTEXT_PATTERNS in src/lib/security/secret-patterns.ts.
  • Evidence: Canonical CONTEXT_PATTERNS uses [A-Za-z0-9_.+/=-] with /gi; wrapper uses [A-Z0-9_.+/=-] after uppercasing key

PRA-14 Resolve/justify — Duplicate secret-shape functions increase drift risk

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:250
  • Category: security
  • Problem: is_secret_shaped_value() and has_non_slack_secret_shape() both call has_context_secret_shape() but the order of checks matters. has_context_secret_shape is called after token-prefix checks but before lsv2_ check. This is likely correct but the duplication across two functions increases maintenance burden and drift risk.
  • Impact: Drift between the two secret-shape functions could cause inconsistent detection between runtime env and env-file scans.
  • Recommended action: Consider extracting common secret-shape detection to a single internal function, or add a comment explaining why two separate functions exist and that they must stay in sync.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare is_secret_shaped_value (line 150) and has_non_slack_secret_shape (line 48) for parity
  • Missing regression test: Parity test already exists via TOKEN_PREFIX_PATTERNS fingerprint
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare is_secret_shaped_value (line 150) and has_non_slack_secret_shape (line 48) for parity.
  • Evidence: Both functions duplicate token-prefix checks and both call has_context_secret_shape

💡 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-8 Improvement — Verify issue #6186 acceptance criteria fully met

PRA-11 Improvement — Allowlist order dependency not documented

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:340
  • Category: security
  • Problem: The managed token allowlist (is_managed_token_value_for_name) MUST run before generic secret-shape checks (is_secret_shaped_value, has_credential_name_context) because managed tokens intentionally match credential patterns. The continue statement skips remaining checks.
  • Impact: Future maintainers may reorder checks and break the allowlist, causing false positives on legitimate managed tokens.
  • Suggested action: Add comment above each assertion function: 'ORDER MATTERS: managed token allowlist MUST run before generic secret-shape checks because managed tokens intentionally match credential patterns. The continue statement skips remaining checks.'
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read assert_no_secret_runtime_env and assert_no_secret_env_file functions
  • Missing regression test: None — documentation improvement
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: assert_no_secret_runtime_env calls is_managed_token_value_for_name then continue before is_secret_shaped_value

PRA-12 Improvement — Missing malformed TOML tests for parser robustness

  • Location: test/dcode-wrapper-identity.test.ts:1
  • Category: tests
  • Problem: The new test file has excellent coverage for identity command and secret boundary but no tests for malformed TOML input to toml_section_scalar / toml_provider_metadata.
  • Impact: Parser robustness unverified. Malformed TOML could cause crashes, incorrect identity output, or silent data loss.
  • Suggested action: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search test/dcode-wrapper-identity.test.ts for 'malformed' or 'unclosed'
  • Missing regression test: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: No malformed TOML tests in dcode-wrapper-identity.test.ts
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 Runtime validation — Full sandbox create -> connect -> dcode status -> verify sandbox name resolves. Sandbox/infrastructure paths (dcode-wrapper.sh, start.sh, sandbox-create-launch.ts) need behavioral runtime validation. Unit tests use real bash execution but live E2E in separate cloud-experimental suite.
  • PRA-T2 Runtime validation — Credential provider attach -> rebuild -> dcode --version succeeds (OPENSHELL_TLS_KEY runtime allowlist). Sandbox/infrastructure paths (dcode-wrapper.sh, start.sh, sandbox-create-launch.ts) need behavioral runtime validation. Unit tests use real bash execution but live E2E in separate cloud-experimental suite.
  • PRA-T3 Runtime validation — Env file with OPENSHELL_TLS_KEY -> verify explicit 'mutable env file' rejection message. Sandbox/infrastructure paths (dcode-wrapper.sh, start.sh, sandbox-create-launch.ts) need behavioral runtime validation. Unit tests use real bash execution but live E2E in separate cloud-experimental suite.
  • PRA-T4 Runtime validation — Malformed TOML config.toml -> verify parser doesn't crash and output sanitized. Sandbox/infrastructure paths (dcode-wrapper.sh, start.sh, sandbox-create-launch.ts) need behavioral runtime validation. Unit tests use real bash execution but live E2E in separate cloud-experimental suite.
  • PRA-T5 Runtime validation — Typo variant nemoclaw-managed-injecton -> verify rejected as secret-shaped. Sandbox/infrastructure paths (dcode-wrapper.sh, start.sh, sandbox-create-launch.ts) need behavioral runtime validation. Unit tests use real bash execution but live E2E in separate cloud-experimental suite.
  • PRA-T6 Missing test: typo variant of managed placeholder key — Add test case: 'rejects typo variant of managed placeholder key' — run wrapper with DEEPAGENTS_CODE_OPENAI_API_KEY=nemoclaw-managed-injecton, expect exit 2.
  • PRA-T7 Missing test: config.toml without [agents] section falls back to upstream default — Add test case: 'uses upstream default when config.toml missing agents section' — build fixture without [agents], verify Agent: 'agent (default)'.
  • PRA-T8 E2E secret boundary check missing tvly- prefix probe — Update 08-deepagents-code-secret-boundary.sh to define SECRET_PATTERN including tvly- and use it for validation, or add a second probe case with tvly- secret.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Required — OPENSHELL_TLS_KEY allowlist exception missing in env-file scan

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:387
  • Category: security
  • Problem: assert_no_secret_env_file() lacks explicit OPENSHELL_TLS_KEY check with 'mutable env file' message. Previous review required: if key == 'OPENSHELL_TLS_KEY', refuse_secret_env with message 'OpenShell TLS key must not appear in mutable env file', placed before is_managed_token_value_for_name check. Current code falls through to has_credential_name_context which rejects generically with 'runtime environment variable' message.
  • Impact: If OPENSHELL_TLS_KEY ever appears in the mutable .env file (future feature, debug logging, or malicious sandbox user), it would be rejected by generic credential-name-context check rather than the intended allowlist logic with explicit message. Explicit rejection clarifies intent and prevents accidental acceptance.
  • Required action: Add explicit check in assert_no_secret_env_file at line 387: if [ "$key" = "OPENSHELL_TLS_KEY" ]; then refuse_secret_env "$env_file" "$key" "OpenShell TLS key must not appear in mutable env file"; fi. Place before is_managed_token_value_for_name check.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: grep -n 'OPENSHELL_TLS_KEY' agents/langchain-deepagents-code/dcode-wrapper.sh | head -20
  • Missing regression test: Add test case in dcode-wrapper-identity.test.ts: 'refuses OPENSHELL_TLS_KEY in env file with explicit mutable env file message' — verify refusal message mentions 'mutable env file' not 'runtime environment variable'
  • Done when: The required change is committed and verification passes: grep -n 'OPENSHELL_TLS_KEY' agents/langchain-deepagents-code/dcode-wrapper.sh | head -20.
  • Evidence: assert_no_secret_env_file (lines 387-400) has no OPENSHELL_TLS_KEY check; is_allowed_openshell_runtime_value only called in assert_no_secret_runtime_env (line 346)

PRA-2 Resolve/justify — Source-of-truth review needed for localized TOML parsers

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:402
  • Category: architecture
  • Problem: toml_section_scalar() and toml_provider_metadata() are localized TOML parsers with undocumented limitations. The invalid state: user-editable config.toml at /sandbox/.deepagents/config.toml could have malformed TOML that the parser silently ignores or misparses. Source boundary: NemoClaw generates config.toml at build time, but it's user-editable at runtime. Source-fix constraint: Can't easily call Node TOML parser from Bash wrapper before exec. No regression test for malformed TOML in the new test file.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear. Malformed or complex TOML from user edits could cause parser to return empty/incorrect values, potentially affecting identity output or agent resolution. Parser silently returns empty on mismatch.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior. Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450
  • Missing regression test: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450.
  • Evidence: toml_section_scalar only matches `key = "value"` pattern; no escape/array/table support

PRA-3 Resolve/justify — TOML parser limitation undocumented

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:402
  • Category: security
  • Problem: toml_section_scalar() and toml_provider_metadata() only parse `key = "value"` lines. No escape handling, no array/table support, no single-quoted strings. Config.toml is user-editable at /sandbox/.deepagents/config.toml.
  • Impact: Malformed or complex TOML from user edits could cause parser to return empty/incorrect values, potentially affecting identity output or agent resolution. Parser silently returns empty on mismatch.
  • Recommended action: Add code comment above toml_section_scalar documenting: parser only handles simple double-quoted scalars; config.toml is NemoClaw-generated but user-editable; malformed TOML test needed in dcode-wrapper-identity.test.ts.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450
  • Missing regression test: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read toml_section_scalar and toml_provider_metadata functions at lines 402-450.
  • Evidence: toml_section_scalar only matches `key = "value"` pattern; no escape/array/table support

PRA-4 Resolve/justify — is_allowed_openshell_runtime_value comment vs implementation drift for env-file exception

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:340
  • Category: architecture
  • Problem: Comment says: 'Never allow the name alone, and never apply this exception to the mutable Deep Agents Code .env file.' The runtime check correctly uses is_allowed_openshell_runtime_value, but the env-file scan (assert_no_secret_env_file) has no such check — it falls through to generic credential-name-context rejection.
  • Impact: The comment documents intended behavior that is not implemented for the env-file path. This creates a false sense of security and inconsistent handling between runtime env and env-file.
  • Recommended action: Either implement the env-file check (see PRA-2) or update the comment to reflect current behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare is_allowed_openshell_runtime_value usage in assert_no_secret_runtime_env (line 346) vs assert_no_secret_env_file (line 387)
  • Missing regression test: Test verifies OPENSHELL_TLS_KEY in env file is rejected with 'mutable env file' message (see PRA-2 test)
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare is_allowed_openshell_runtime_value usage in assert_no_secret_runtime_env (line 346) vs assert_no_secret_env_file (line 387).
  • Evidence: Comment at line 340 documents env-file exclusion but assert_no_secret_env_file lacks the check

PRA-5 Resolve/justify — toml_provider_metadata brittle semicolon split

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:427
  • Category: correctness
  • Problem: Uses IFS=';' read -r route provider _api assuming provider route comment format is fixed by NemoClaw and won't contain semicolons in values.
  • Impact: If the comment format ever includes semicolons in route or provider values (e.g., a provider name with semicolon), parsing will break silently.
  • Recommended action: Document assumption that provider route comment format is fixed by NemoClaw and won't contain semicolons in values, or use more robust parsing.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read toml_provider_metadata function at lines 427-450
  • Missing regression test: Add test with semicolon in provider comment to verify graceful handling or document the constraint
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read toml_provider_metadata function at lines 427-450.
  • Evidence: IFS=';' read -r route provider _api <<<"$line" at line 427

PRA-6 Resolve/justify — Missing test: typo variant of managed placeholder key

  • Location: test/dcode-wrapper-identity.test.ts:1
  • Category: tests
  • Problem: The managed key is 'nemoclaw-managed-inference' but a typo like 'nemoclaw-managed-injecton' should be rejected as a secret-shaped value (credential name context + 10+ char value).
  • Impact: A typo in the managed placeholder could silently pass through as a valid managed token, or be rejected with a confusing message.
  • Recommended action: Add test case: 'rejects typo variant of managed placeholder key' — run wrapper with DEEPAGENTS_CODE_OPENAI_API_KEY=nemoclaw-managed-injecton, expect exit 2.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Search test/dcode-wrapper-identity.test.ts for 'typo' or 'injecton'
  • Missing regression test: Add test case in dcode-wrapper-identity.test.ts: 'rejects typo variant of managed placeholder key' — run wrapper with DEEPAGENTS_CODE_OPENAI_API_KEY=nemoclaw-managed-injecton, expect exit 2
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Search test/dcode-wrapper-identity.test.ts for 'typo' or 'injecton'.
  • Evidence: No test covers typo variant of managed placeholder

PRA-7 Resolve/justify — Missing test: config.toml without [agents] section falls back to upstream default

  • Location: test/dcode-wrapper-identity.test.ts:1
  • Category: tests
  • Problem: Current test 'uses the upstream default agent when configured preferences are stale' uses a config WITH [agents] section but non-existent agent directories. Missing test for config.toml missing [agents] section entirely.
  • Impact: If config.toml is missing the [agents] section entirely (e.g., user deleted it, or NemoClaw generated config without it), the parser returns empty and should fall back to 'agent (default)'.
  • Recommended action: Add test case: 'uses upstream default when config.toml missing agents section' — build fixture without [agents], verify Agent: 'agent (default)'.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Search test/dcode-wrapper-identity.test.ts for 'missing agents section' or 'no agents section'
  • Missing regression test: Add test case in dcode-wrapper-identity.test.ts: 'uses upstream default when config.toml missing agents section' — build fixture without [agents], verify Agent: 'agent (default)'
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Search test/dcode-wrapper-identity.test.ts for 'missing agents section' or 'no agents section'.
  • Evidence: Existing test uses config WITH [agents] section but stale dirs; no test for missing section

PRA-8 Improvement — Verify issue #6186 acceptance criteria fully met

PRA-9 Resolve/justify — E2E secret boundary check missing tvly- prefix probe

  • Location: test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh:1
  • Category: tests
  • Problem: Unit test parity (TOKEN_PREFIX_PATTERNS fingerprint) includes tvly-, but the live e2e check 08-deepagents-code-secret-boundary.sh may not exercise tvly- secret rejection.
  • Impact: The canonical secret pattern contract includes tvly- (Tavily API keys), but the live acceptance test may not verify the wrapper rejects tvly- secrets at the sandbox boundary.
  • Recommended action: Update 08-deepagents-code-secret-boundary.sh to define SECRET_PATTERN including tvly- and use it for validation, or add a second probe case with tvly- secret.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh and check for tvly- in SECRET_PATTERN
  • Missing regression test: E2E probe with tvly- secret in runtime env and env file, verify rejection
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read test/e2e/e2e-cloud-experimental/checks/08-deepagents-code-secret-boundary.sh and check for tvly- in SECRET_PATTERN.
  • Evidence: TOKEN_PREFIX_PATTERNS fingerprint includes tvly-; e2e check may not cover it

PRA-10 Resolve/justify — PR #6082 overlap not verified

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:1
  • Category: architecture
  • Problem: PR fix(dcode): harden managed runtime boundaries #6082 'fix(dcode): harden managed runtime boundaries' modifies the same 4 files: dcode-wrapper.sh, start.sh, quickstart-langchain-deepagents-code.mdx, test/langchain-deepagents-code-image.test.ts.
  • Impact: Potential merge conflicts or semantic conflicts if both PRs modify the same logic in different ways.
  • Recommended action: Maintainer to diff PR fix(dcode): harden managed runtime boundaries #6082 head against this PR head for the four shared files. Resolve any conflicts before merge.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: gh pr diff 6082 -- agents/langchain-deepagents-code/dcode-wrapper.sh agents/langchain-deepagents-code/start.sh docs/get-started/quickstart-langchain-deepagents-code.mdx test/langchain-deepagents-code-image.test.ts
  • Missing regression test: Manual diff verification by maintainer
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: gh pr diff 6082 -- agents/langchain-deepagents-code/dcode-wrapper.sh agents/langchain-deepagents-code/start.sh docs/get-started/quickstart-langchain-deepagents-code.mdx test/langchain-deepagents-code-image.test.ts.
  • Evidence: Open PR fix(dcode): harden managed runtime boundaries #6082 has same 4 files in openPrOverlaps

PRA-11 Improvement — Allowlist order dependency not documented

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:340
  • Category: security
  • Problem: The managed token allowlist (is_managed_token_value_for_name) MUST run before generic secret-shape checks (is_secret_shaped_value, has_credential_name_context) because managed tokens intentionally match credential patterns. The continue statement skips remaining checks.
  • Impact: Future maintainers may reorder checks and break the allowlist, causing false positives on legitimate managed tokens.
  • Suggested action: Add comment above each assertion function: 'ORDER MATTERS: managed token allowlist MUST run before generic secret-shape checks because managed tokens intentionally match credential patterns. The continue statement skips remaining checks.'
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read assert_no_secret_runtime_env and assert_no_secret_env_file functions
  • Missing regression test: None — documentation improvement
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: assert_no_secret_runtime_env calls is_managed_token_value_for_name then continue before is_secret_shaped_value

PRA-12 Improvement — Missing malformed TOML tests for parser robustness

  • Location: test/dcode-wrapper-identity.test.ts:1
  • Category: tests
  • Problem: The new test file has excellent coverage for identity command and secret boundary but no tests for malformed TOML input to toml_section_scalar / toml_provider_metadata.
  • Impact: Parser robustness unverified. Malformed TOML could cause crashes, incorrect identity output, or silent data loss.
  • Suggested action: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Search test/dcode-wrapper-identity.test.ts for 'malformed' or 'unclosed'
  • Missing regression test: Add malformed TOML tests in dcode-wrapper-identity.test.ts: unclosed quotes, control chars, nested tables — verify parser doesn't crash and output is sanitized via terminal_safe_identity_value
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: No malformed TOML tests in dcode-wrapper-identity.test.ts

PRA-13 Resolve/justify — has_context_secret_shape regex parity gap with canonical CONTEXT_PATTERNS

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:40
  • Category: security
  • Problem: Pattern: `(_KEY|API_KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL)[=:[:space:]]["']?[A-Z0-9_.+/=-]{10,}`. This matches uppercase keys only (due to `${1^^}`) but the value pattern `[A-Z0-9_.+/=-]{10,}` excludes lowercase letters, which may miss some secret shapes. Also matches `KEY=value` in the middle of a string.
  • Impact: May miss secrets with lowercase letters in value (e.g., base64 with lowercase), or false positive on legitimate config values containing KEY=value patterns.
  • Recommended action: Review regex against canonical CONTEXT_PATTERNS: `(?<=(?:_KEY|API_KEY|SECRET|TOKEN|PASSWORD|CREDENTIAL)[=: ]["']?)[A-Za-z0-9_.+/=-]{10,}` (case-insensitive, includes lowercase). Ensure parity with canonical patterns.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare has_context_secret_shape regex with CONTEXT_PATTERNS in src/lib/security/secret-patterns.ts
  • Missing regression test: Add test cases for lowercase secret values and embedded KEY=value patterns
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare has_context_secret_shape regex with CONTEXT_PATTERNS in src/lib/security/secret-patterns.ts.
  • Evidence: Canonical CONTEXT_PATTERNS uses [A-Za-z0-9_.+/=-] with /gi; wrapper uses [A-Z0-9_.+/=-] after uppercasing key

PRA-14 Resolve/justify — Duplicate secret-shape functions increase drift risk

  • Location: agents/langchain-deepagents-code/dcode-wrapper.sh:250
  • Category: security
  • Problem: is_secret_shaped_value() and has_non_slack_secret_shape() both call has_context_secret_shape() but the order of checks matters. has_context_secret_shape is called after token-prefix checks but before lsv2_ check. This is likely correct but the duplication across two functions increases maintenance burden and drift risk.
  • Impact: Drift between the two secret-shape functions could cause inconsistent detection between runtime env and env-file scans.
  • Recommended action: Consider extracting common secret-shape detection to a single internal function, or add a comment explaining why two separate functions exist and that they must stay in sync.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Compare is_secret_shaped_value (line 150) and has_non_slack_secret_shape (line 48) for parity
  • Missing regression test: Parity test already exists via TOKEN_PREFIX_PATTERNS fingerprint
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Compare is_secret_shaped_value (line 150) and has_non_slack_secret_shape (line 48) for parity.
  • Evidence: Both functions duplicate token-prefix checks and both call has_context_secret_shape

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 Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 0 suggestions · 4 test follow-ups
Since last review: 1 prior item resolved · 0 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
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 Runtime validation — In a real LangChain Deep Agents Code `nemoclaw <sandbox-name> connect` shell, verify `dcode status` prints the sandbox name, active agent, route/provider, model, endpoint, and runtime, exits 0, and does not start the interactive UI.. Static and fixture coverage is strong for the wrapper, env envelope, status redaction, and exact TLS key allowlist, but the highest-risk acceptance paths cross OpenShell credential-provider injection, sandbox-create env propagation, connect-shell env sourcing, and rebuild smoke execution.
  • PRA-T2 Runtime validation — After `nemoclaw credentials add tavily-search --type tavily --credential TAVILY_API_KEY` and rebuild, verify the `[7/8]` dcode smoke step runs `dcode --version`, prints the installed Deep Agents Code version, exits 0, and does not log a rejected `OPENSHELL_TLS_KEY`.. Static and fixture coverage is strong for the wrapper, env envelope, status redaction, and exact TLS key allowlist, but the highest-risk acceptance paths cross OpenShell credential-provider injection, sandbox-create env propagation, connect-shell env sourcing, and rebuild smoke execution.
  • PRA-T3 Runtime validation — In the rebuilt sandbox with the credential provider attached, verify direct in-sandbox `dcode --version` exits 0 while the runtime contains the canonical `OPENSHELL_TLS_KEY=/etc/openshell/tls/client/tls.key` value.. Static and fixture coverage is strong for the wrapper, env envelope, status redaction, and exact TLS key allowlist, but the highest-risk acceptance paths cross OpenShell credential-provider injection, sandbox-create env propagation, connect-shell env sourcing, and rebuild smoke execution.
  • PRA-T4 Runtime validation — With Tavily enabled, verify the dcode web-search DevTest reaches the web-search step after provider attachment and no raw `tvly-` credential appears in sandbox env, dcode config, or dcode wrapper output.. Static and fixture coverage is strong for the wrapper, env envelope, status redaction, and exact TLS key allowlist, but the highest-risk acceptance paths cross OpenShell credential-provider injection, sandbox-create env propagation, connect-shell env sourcing, and rebuild smoke execution.

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.

🧹 Nitpick comments (2)
agents/langchain-deepagents-code/dcode-wrapper.sh (2)

311-324: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

toml_scalar is not section-scoped, so it can grab a value from the wrong TOML table.

toml_scalar matches the first line starting with "$key = \"" anywhere in DEEPAGENTS_CONFIG_FILE, without regard to which [table] it belongs to. Today's generated config has a single [models.providers.openai] block so base_url lookup happens to be correct, but if NemoClaw ever writes multiple provider blocks (e.g. NVIDIA + OpenAI), print_identity could report the endpoint of the wrong provider relative to the selected models.default model. Consider having toml_scalar (or a new helper) track the current [section] while scanning and only match within the section relevant to the active provider.

Separately, the trailing-quote strip ${line%\"} only strips a " when the line ends with one; if there's ever trailing whitespace or an inline comment after the closing quote, the value returned will retain the extraneous suffix (including the quote) silently. Since this file is machine-generated per the docs, this is a low-probability edge case, but worth a defensive trim if the generator format ever changes.

🤖 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 `@agents/langchain-deepagents-code/dcode-wrapper.sh` around lines 311 - 324,
The toml_scalar helper is too broad and can return a value from the wrong TOML
table, and its quote trimming is fragile. Update toml_scalar (or introduce a
section-aware helper) to track the current [section] while reading
DEEPAGENTS_CONFIG_FILE and only match the key within the active provider table
used by print_identity/base_url lookup. Also make the value extraction robust
against trailing whitespace or comments so the returned scalar is clean even if
the generated TOML format changes.

252-252: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated allowlist-check pattern across both rejection paths.

The has_credential_name_context "$name" && [ ${#value} -ge 10 ] && ! is_openshell_infra_key_name "$name" condition is repeated verbatim in assert_no_secret_runtime_env and assert_no_secret_env_file. Consider extracting a small helper (e.g. is_credential_name_violation) to keep the allowlist logic in one place as more exemptions get added.

♻️ Suggested helper extraction
+is_credential_name_violation() {
+  local name="$1" value="$2"
+  has_credential_name_context "$name" && [ ${`#value`} -ge 10 ] && ! is_openshell_infra_key_name "$name"
+}
+
 assert_no_secret_runtime_env() {
   ...
-    if has_credential_name_context "$name" && [ ${`#value`} -ge 10 ] && ! is_openshell_infra_key_name "$name"; then
+    if is_credential_name_violation "$name" "$value"; then
       refuse_secret_env "runtime environment variable" "$name"
     fi

Also applies to: 302-302

🤖 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 `@agents/langchain-deepagents-code/dcode-wrapper.sh` at line 252, The
credential-name allowlist/rejection condition is duplicated in both
assert_no_secret_runtime_env and assert_no_secret_env_file, so extract it into a
shared helper such as is_credential_name_violation and use that helper in both
rejection paths. Keep the existing symbols has_credential_name_context and
is_openshell_infra_key_name as the basis for the helper logic so the exemption
rules stay centralized and easier to extend.
🤖 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.

Nitpick comments:
In `@agents/langchain-deepagents-code/dcode-wrapper.sh`:
- Around line 311-324: The toml_scalar helper is too broad and can return a
value from the wrong TOML table, and its quote trimming is fragile. Update
toml_scalar (or introduce a section-aware helper) to track the current [section]
while reading DEEPAGENTS_CONFIG_FILE and only match the key within the active
provider table used by print_identity/base_url lookup. Also make the value
extraction robust against trailing whitespace or comments so the returned scalar
is clean even if the generated TOML format changes.
- Line 252: The credential-name allowlist/rejection condition is duplicated in
both assert_no_secret_runtime_env and assert_no_secret_env_file, so extract it
into a shared helper such as is_credential_name_violation and use that helper in
both rejection paths. Keep the existing symbols has_credential_name_context and
is_openshell_infra_key_name as the basis for the helper logic so the exemption
rules stay centralized and easier to extend.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c62a5e10-1815-4e24-9c93-fa33a0340560

📥 Commits

Reviewing files that changed from the base of the PR and between 9fe4536 and cf2761b.

📒 Files selected for processing (8)
  • agents/langchain-deepagents-code/dcode-wrapper.sh
  • agents/langchain-deepagents-code/start.sh
  • docs/get-started/quickstart-langchain-deepagents-code.mdx
  • src/lib/onboard.ts
  • src/lib/onboard/sandbox-create-launch.test.ts
  • src/lib/onboard/sandbox-create-launch.ts
  • test/dcode-wrapper-identity.test.ts
  • test/langchain-deepagents-code-image.test.ts

Read the sandbox name back out of the --name flag already present in
createArgs instead of threading a new sandboxName field through
prepareSandboxCreateLaunch. Keeps src/lib/onboard.ts at net-zero line
growth, which codebase-growth-guardrails enforces for that file.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…infra-key-allowlist

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@prekshivyas prekshivyas self-assigned this Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ❌ Some jobs failed

Run: 28612082745
Workflow ref: main
Requested targets: (default — all supported)
Requested jobs: (selector rejected by workflow validation)
Summary: 0 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
generate-matrix ❌ failure

Failed jobs: generate-matrix. Check run artifacts for logs.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28612472044
Workflow ref: fix/dcode-status-and-infra-key-allowlist
Requested targets: ubuntu-repo-cloud-langchain-deepagents-code,cloud-onboard
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs hermes-gpu-startup, openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
cloud-onboard ✅ success
live ✅ success

prekshivyas and others added 2 commits July 2, 2026 13:43
Keep PR's new sandbox-name serialization test alongside main's renamed
proxy test (#6191).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…env-file secret guard

PRA-4: print_identity now reads the provider route from the NemoClaw
config comment and emits a Provider: line, satisfying #6186's accepted
shape for dcode status.

PRA-3: remove is_openshell_infra_key_name exemption from
assert_no_secret_env_file. OPENSHELL_TLS_KEY is injected by OpenShell
at runtime, not user-set in .deepagents/.env; the exemption only belongs
in assert_no_secret_runtime_env.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@prekshivyas

Copy link
Copy Markdown
Collaborator

Resolution for PRA-3 and PRA-4 (96aa3c4)

PRA-4 (required) — dcode status missing Provider field — fixed.
Added toml_provider_route() which parses the structured comment written by generate-config.ts (# NemoClaw provider route: <key>; ...) and emits a Provider: line in print_identity, satisfying the #6186 acceptance clause.

PRA-3 (resolve/justify) — OPENSHELL_TLS_KEY exemption in env-file guard — fixed by removal.
The is_openshell_infra_key_name exemption was included in assert_no_secret_env_file but it only belongs in assert_no_secret_runtime_env. OPENSHELL_TLS_KEY is injected by OpenShell into the sandbox runtime environment — it is not a key users would legitimately place in .deepagents/.env. Removed the exemption from the env-file path; assert_no_secret_runtime_env retains it unchanged.

…erns

Travily API tokens use the tvly- prefix; add it to both
has_non_slack_secret_shape() and is_secret_shaped_value() so they are
caught by the runtime and .env secret guards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wscurran
wscurran requested a review from cv July 2, 2026 22:05
apurvvkumaria and others added 3 commits July 2, 2026 15:20
Limit the runtime exception to OpenShell's canonical mounted key path, keep mutable .env files fail-closed, and cover Tavily token parity.

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Use the validated sandbox name as the identity source, pin provider output and mutable-env rejection, and align the quickstart wording.

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Inline the one-use messaging plan while passing the validated sandbox name, keeping the guarded onboard entrypoint net-neutral.

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@apurvvkumaria

apurvvkumaria commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Review follow-up (4d52e7adb)

The three user-visible items from the changes-requested review are resolved:

  1. dcode status now prints Harness separately and resolves the active Agent with upstream precedence: an existing configured default, then an existing recent agent, then agent (default). Tests cover a valid default, stale default with valid recent, and all-stale fallback.
  2. The generated metadata is now displayed as separate Route and upstream Provider fields, so the standard configuration reports Route: inference and Provider: nvidia-prod.
  3. dcode --help, dcode -h, and dcode help now prepend a NemoClaw-managed command section that advertises status, whoami, and identity before delegating to upstream help.

The earlier review findings are also resolved: the exact OpenShell runtime TLS-key pair is the only exception, mutable .env remains fail-closed, the validated sandbox name is the identity source of truth, provider output and opaque dotenv rejection are pinned, and the large image-contract test is back under its size budget.

The final metadata hardening uniformly suppresses control characters, oversized values, known token prefixes, and canonical context-labeled opaque secrets from every dynamic status field; only reports configured agent names that dcode itself can activate; and omits endpoint values that are malformed or could expose URL credentials. Direct and TOML-escaped userinfo, query, and fragment cases are covered for both mutable config and runtime environment sources, and managed Slack exemptions cannot wrap another canonical secret form.

Latest main is merged. The conflict resolution preserves both this PR's context-form checks and main's LaunchDarkly lsv2_* detection in the generic and managed-Slack guard paths.

The final GPT advisor reports no blocking findings. The recurring Nemotron request to add an OPENSHELL_TLS_KEY exception to mutable .deepagents/.env is intentionally not applied: that file must remain fail-closed and has regression coverage. Its lowercase context-pattern concern is also covered because the helper uppercases the entire candidate before matching, and the tests use lowercase opaque payloads.

Validation:

  • Linux wrapper identity/help/security suite: 20/20 passed.
  • Image-contract suite: 54/54 passed on the merged main baseline.
  • Sandbox-create source tests: 8/8 passed.
  • CLI type-check, ShellCheck, repository-configured shfmt, Biome, test-size budget, test-title style, source-shape check, git diff --check, and docs build passed.
  • Security re-audit: PASS; rejected values are not logged and the runtime exception remains limited to OPENSHELL_TLS_KEY=/etc/openshell/tls/client/tls.key.
  • Every pushed follow-up commit is GitHub Verified, includes Apurv Kumaria's DCO sign-off, and credits original PR author Tinson Lai as co-author.

The required current-head live Deep Agents Code E2E passed at https://github.com/NVIDIA/NemoClaw/actions/runs/28629125401.

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28628187947
Workflow ref: fix/dcode-status-and-infra-key-allowlist
Requested targets: ubuntu-repo-cloud-langchain-deepagents-code
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs hermes-gpu-startup, openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28628464259
Workflow ref: fix/dcode-status-and-infra-key-allowlist
Requested targets: ubuntu-repo-cloud-langchain-deepagents-code
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs hermes-gpu-startup, openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28628831873
Workflow ref: fix/dcode-status-and-infra-key-allowlist
Requested targets: ubuntu-repo-cloud-langchain-deepagents-code
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs hermes-gpu-startup, openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28629125401
Workflow ref: fix/dcode-status-and-infra-key-allowlist
Requested targets: ubuntu-repo-cloud-langchain-deepagents-code
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs hermes-gpu-startup, openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

@apurvvkumaria apurvvkumaria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed at 4d52e7a. The active-agent identity, Route/Provider split, and managed help discoverability requests are resolved with regression coverage. All required checks and the exact-head Deep Agents Code live E2E pass; no blocking review threads remain.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Target Results — ✅ All selected jobs passed

Run: 28629952892
Workflow ref: main
Requested targets: ubuntu-repo-cloud-langchain-deepagents-code
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs hermes-gpu-startup, openshell-gateway-auth-contract, jetson-nvmap-gpu, and sandbox-rlimits-connect are skipped unless selected)
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success

@apurvvkumaria
apurvvkumaria merged commit 470060d into main Jul 3, 2026
135 of 138 checks passed
@apurvvkumaria
apurvvkumaria deleted the fix/dcode-status-and-infra-key-allowlist branch July 3, 2026 00:23
cv added a commit that referenced this pull request Jul 3, 2026
## Summary

Reverts #6202 from `main` so v0.0.73 retains the release boundary that
was already documented and exercised by the release E2E run. PR #6202
remains targeted for v0.0.74.

The resulting tree is byte-for-byte identical to commit
`2276b2e1373548f9afa95b3a4f4bcd8db244874c`
(`967ad0207b591bfc7f3398f37c230f199bb932ed`).

## Related Issue

Release-boundary housekeeping for v0.0.73. Reverts #6202 without closing
its related issues.

## Changes

- Revert the Deep Agents Code `status`/identity wrapper commands
introduced by #6202.
- Revert the OpenShell TLS-key secret-guard exception introduced by
#6202.
- Revert the Deep Agents Code sandbox-name propagation and accompanying
tests.
- Remove the deferred user-facing `dcode status` documentation from the
v0.0.73 tree.

## 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 — exact revert
restores the previously tested tree.
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes — #6202
documentation is reverted with the code.
- [ ] 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 — the index tree exactly matches the pre-#6202 release tree,
and no manual edits were made to the revert.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
no CI waiver requested; the local broad `test-cli` pre-commit hook was
skipped after seven unrelated environment-sensitive baseline failures in
Hermes file modes, managed-gateway trust state, and state-dir permission
modes. Changed-area tests pass and PR CI remains required.

## Verification

- [x] PR description includes the DCO sign-off declaration and the
commit appears as `Verified` in GitHub.
- [x] Normal pre-push hooks passed; all pre-commit hooks except the
disclosed broad `test-cli` baseline lane passed.
- [x] `npx vitest run --project cli
src/lib/onboard/sandbox-create-launch.test.ts --silent=false
--reporter=default` — 6/6 passed.
- [x] `npx vitest run --project integration
test/langchain-deepagents-code-image.test.ts --silent=false
--reporter=default` — 53/53 passed.
- [ ] Full `npm test` passes (broad runtime changes only) — not rerun;
the broad hook's unrelated baseline failures are disclosed above.
- [x] Quality Gates section completed with required justifications or
waivers.
- [x] No secrets, API keys, or credentials committed.
- [x] `npm run docs` passes with 0 errors and two pre-existing Fern
warnings.
- [x] Doc pages follow the style guide.
- [ ] New doc pages include SPDX header and frontmatter — no new doc
pages.

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


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

## Summary by CodeRabbit

* **New Features**
* Additional environment details are now carried into runtime setup for
better tracing and project context.
* **Bug Fixes**
* Tightened secret-detection and runtime-value checks to reduce the
chance of sensitive values being accepted.
* Improved sandbox launch behavior by simplifying how launch settings
are prepared.
* **Documentation**
* Removed outdated guidance about checking the current sandbox from the
quickstart.

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

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
cv added a commit that referenced this pull request Jul 3, 2026
<!-- markdownlint-disable MD041 -->
## Summary
<!-- 1-3 sentences: what this PR does and why. -->

Restores #6202 now that v0.0.73 has been tagged. This reintroduces
`dcode status` identity reporting, managed help, the exact OpenShell
TLS-key runtime allowance, sandbox-name propagation, and their docs and
tests for v0.0.74, with focused follow-ups that suppress
private-key-shaped or encoded-credential metadata and fail closed on
malformed or unsupported identity config scalars.

## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->

Restores #6202 after the release-boundary revert in #6223. Related to
#6189, #6186, and the complementary runtime hardening in #6082.

## Changes
<!-- Bullet list of key changes. -->

- Restore `dcode status`, `dcode whoami`, and `dcode identity` without
launching the interactive UI.
- Restore the exact runtime-only
`OPENSHELL_TLS_KEY=/etc/openshell/tls/client/tls.key` allowance while
keeping arbitrary paths, values, PEM material, and persisted `.env`
entries fail-closed.
- Restore Tavily and context-shaped secret detection in the managed Deep
Agents Code wrapper.
- Mirror canonical private-key block detection before mutable config or
runtime metadata can reach `dcode status`, including the managed Slack
early-allowlist path, and scan the complete mutable `.deepagents/.env`
so raw multiline blocks cannot evade per-line classification.
- Reject literal, escaped, percent-encoded, and double-encoded query,
fragment, and userinfo delimiters before endpoint metadata can reach
`dcode status`.
- Restrict the informational TOML reader to known generated sections and
complete quoted scalars so malformed, commented, array, and unsupported
nested values fall back safely instead of being displayed.
- Restore Deep Agents Code sandbox-name propagation through onboarding
and startup state.
- Restore the original #6202 quickstart documentation, identity tests,
secret-boundary tests, and shared fixture, then add a composed
onboarding → `start.sh` → `dcode status` handoff test.
- Record the #6082 rebase contract: #6232's managed-proxy and
secret-filtering paths remain authoritative while #6082's runtime
upgrade, auth-store, and mutation-command work layers on afterward.

## 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
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior — restores the
original #6202 identity, secret-boundary, image-contract, and onboarding
coverage; adds canonical private-key parity, malformed/unsupported
config, encoded endpoint, and composed sandbox-name handoff cases.
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes — restores the
original `dcode status` quickstart section.
- [ ] 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 — the restoration commit exactly matches the previously
reviewed #6202 tree; independent reproduction confirmed the
advisor-reported private-key status leak, and focused follow-ups mirror
the canonical block pattern, reject raw multiline `.env` key blocks and
encoded endpoint delimiters, and fail closed on malformed generated
scalars with status, parity, managed-Slack, composed-handoff, no-launch,
redaction, and secret-scanner coverage.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
no CI waiver requested; required remote checks remain mandatory.

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [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 — all commit hooks except the
disclosed local `test-cli` environment-sensitive baseline lane passed;
normal pre-push CLI typecheck and tag-version synchronization passed.
- [x] Targeted tests pass for changed behavior — onboarding 8/8 and Deep
Agents Code wrapper/image/composed-handoff tests 77/77 after review
follow-ups; CLI typecheck, ShellCheck, Biome, test-size/project-overlap
gates, detect-private-key, and gitleaks also pass.
- [x] Required exact-head live E2Es pass on attempt 1 —
`ubuntu-repo-cloud-langchain-deepagents-code` and `cloud-onboard` at
`a503d95a81094cd3415ce933b64a0213a4d3aa2d`.
- [ ] Full `npm test` passes (broad runtime changes only) — not rerun;
remote CI remains required.
- [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) — build
passed with 0 errors and two pre-existing Fern warnings.
- [x] Doc pages follow the style guide; independent docs review found no
additional changes needed.
- [ ] New doc pages include SPDX header and frontmatter — no new doc
pages.

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
cv pushed a commit that referenced this pull request Jul 3, 2026
<!-- markdownlint-disable MD041 -->
## Summary

NemoClaw `v0.0.74` will ship stable OpenShell `v0.0.72`. This dependency
layer advances the supported OpenShell contract from `0.0.71` to
`0.0.72`, pins every consumed release artifact, preserves
round-trippable policy state, and hardens installer verification so
pull-request code cannot authorize its own pins.

## Related Issue

Refs #5591.
Follow-up to merged #5596.
Dependency layer for #5876 and the accepted MCP design in #566.

## Changes

- Pin stable OpenShell `0.0.72` across the supported version
floor/ceiling, installer, Brev launchable, blueprint, supervisor image,
workflow, and live-E2E contracts. OpenShell development builds remain
compatibility evidence, not the shipping runtime.
- Pin all consumed CLI, gateway, and sandbox archives plus both Brev CLI
references to the official `v0.0.72` checksum manifests.
- Read mutation input from `openshell policy get --base`, strip reserved
`_provider_*` entries before `policy set`, retain `--full` only for
read-only diagnostics, and preserve future mapping sections plus
MCP/JSON-RPC fields during merges.
- Route the CommonJS CLI and ESM plugin through one generated OpenShell
policy boundary and exact-pin `yaml` `2.8.3` in both production package
graphs.
- Normalize that boundary for both compiled CommonJS and source-mode
`tsx` loading. A subprocess package-contract test reproduces the live
source-loader path that exposed the mismatch.
- Run installer verification from base-trusted code. The introducing PR
falls back only to immutable commit
`cb5e9aefab2b16fedc0995149fc3520da0d5e0c7`, verified as tree
`1fdf59efe40b78c407e222fd42043b23a61e199a`, with an enforced expiry at
`2026-12-29T19:35:41Z`.
- Treat PR-head installer files as data only. The trusted parser rejects
symbolic links, a symbolic-link `scripts` parent, non-regular files,
changed inode/device identity, and input over 1 MiB; it opens with
`O_NOFOLLOW` and performs a bounded descriptor read.
- Fail installer verification closed on missing, duplicate, mismatched,
incomplete, or unreachable OpenShell/Brev pin data.
- Publish the OpenShell `0.0.72` compatibility review and align version,
policy, gateway-authentication, and troubleshooting documentation.

### Exact-head evidence

- PR head: `2d06fa01b624b63813fe558ce36b29d47ad31e36`, based exactly on
current `main` `dc96deb24d67eeeb2cb7b2bb42c7c53f000507f3`. The final
signed merge incorporates the release-boundary revert that defers
unrelated dcode-status work, so this dependency PR does not reintroduce
#6202 outside its scope.
- GitHub verifies the new merge commit signature, DCO is green, the
prior maintainer approval remains recorded at [review
4611344448](#6020 (review)),
and GitHub reports the PR graph as `MERGEABLE`.
- Post-restack local validation passes `build:cli`, full and CLI
typechecks, repository checks, generated agent-doc synchronization,
affected Deep Agents image contracts, and `git diff --check`.
- All exact-head ordinary PR checks are terminal green (33 successful,
three skipped/neutral, zero failures), including macOS/WSL E2E, every
CLI shard and aggregate, static/security scans, DCO, and both PR Review
Advisor jobs. GitHub reports `APPROVED` and `MERGEABLE/CLEAN`.
- Exact-head selected OpenShell [E2E run
28632123304](https://github.com/NVIDIA/NemoClaw/actions/runs/28632123304)
is terminal green: version pin, gateway-auth contract, network policy,
gateway upgrade/state restoration, scorecard, and the no-comment
reporter all passed from a temporary no-PR ref at the identical commit.
The temporary ref was deleted after completion.
- Exact-head PR Review [run
28632002111](https://github.com/NVIDIA/NemoClaw/actions/runs/28632002111)
and E2E Advisor [run
28632002140](https://github.com/NVIDIA/NemoClaw/actions/runs/28632002140)
are green. GPT reports no actionable finding; Nemotron's check passed
but both JSON synthesis attempts were unparseable, so that model's
artifact is incomplete rather than clearance. E2E Advisor reports high
confidence and selects the four live lanes linked above.

### Trust-boundary notes

- The immutable bootstrap is intentionally used only while the PR base
lacks the trusted action. Once that action exists on the base, executing
the newer base-trusted verifier is the stronger boundary; the expiring
bootstrap should then be removed rather than run redundantly.
- No untrusted PR process executes alongside the parser. GitHub checks
out inert PR data, then trusted code validates and reads the
already-opened descriptor. The link/type/identity/bounds checks cover
repository-controlled redirection and exhaustion inputs without claiming
protection from a privileged concurrent host writer.
- Stable OpenShell `0.0.72` accepts an unmarked policy root only when it
contains `version` or `network_policies`; metadata-only and malformed
documents fail closed. Versionless `network_policies` is retained for
the supported compatibility contract.

### Advisor disposition

- GPT reported no required findings and one warning about the mutable
default `BASE_IMAGE` tag. That `ARG
BASE_IMAGE=ghcr.io/nvidia/nemoclaw/sandbox-base:latest` line is
unchanged from current `main`; this dependency PR neither introduces nor
broadens that repository-wide build default.
- Nemotron's bootstrap finding would weaken the intended trust
transition: the immutable bootstrap exists only for the introducing PR.
Once the action is present on the base, the newer base-trusted action
must replace the older bootstrap; both paths are immutable for the
current event and are contract-tested.
- Nemotron's parser race assumes an untrusted concurrent filesystem
writer. PR code is never executed in this job: GitHub checks out inert
data, then trusted code rejects links/special files, checks the opened
descriptor's device/inode, bounds the read, and closes it. A privileged
host writer is outside this PR-input threat model.
- Nemotron's checksum finding is not circular. The trusted checker pins
the SHA-256 of each upstream checksum manifest, verifies that immutable
manifest before reading it, and compares every embedded installer pin
with exactly one manifest entry. At install time each named archive must
exist and match its pinned digest, so a missing asset still fails closed
without downloading all archives during every PR check.
- The generated-boundary auditor executes in the Docker builder stage
exercised by ordinary `build-sandbox-images` CI. The exact source-mode
`.cts` versus generated `.cjs` mismatch found by live proof is now
covered directly by the subprocess package-contract test and the
compiled runner suites.

## 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
- [x] Existing tests cover changed behavior — justification: policy
mutation, package boundary, installer trust, workflow selection, and
runtime upgrade/state-restoration have focused coverage; final selected
E2E is linked above.
- [ ] Tests not applicable — justification: not applicable; this changes
security-sensitive installer, policy, and runtime compatibility
behavior.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification: not applicable; supported
OpenShell versions and policy behavior are user-facing.
- [x] 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: the linked approval
predates the current head; exact-head human review or an explicit
carried-approval decision remains required, and no waiver is requested.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue: no waiver is requested;
exact-head ordinary CI is green, and the selected run's comment-only
reporter caveat is documented above and is not a required PR check.

## 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)
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [x] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Preksha Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
cv pushed a commit that referenced this pull request Jul 4, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds a best-effort maintainer advisory when the same GitHub account is
both a current PR contributor and an effective approver. The warning is
intentionally non-blocking: it does not invalidate approval, require a
third reviewer, publish a failing check, or change merge readiness.

This replaces the earlier hard-gate draft with the narrow diagnostic
behavior accepted in review and hardens it against automated identities,
incomplete review timestamps, and truncated commit/review snapshots.

## Related Issue

Refs #6222

## Changes

- Compare the PR opener and every paginated current commit
author/co-author with each reviewer's latest opinionated review across
all review pages.
- Ignore automated identities and later `COMMENTED` reviews when
determining effective human approvals.
- Order valid review timestamps deterministically and surface an
uncertainty warning for missing, invalid, or conflicting timestamps.
- Warn instead of returning a false clear when complete paginated
history cannot be retrieved, including an outer connection-count
mismatch or truncated nested co-author list.
- Return overlap under `advisories.contributorApprovalOverlap` while
leaving `allPass` unchanged.
- Document the current-snapshot source boundary, diagnostic-only policy
decision, regression scope, and removal condition.
- Cover opener, author/co-author, case-normalization, bot,
review-transition, dismissal, ordering, incomplete-timestamp,
pagination, and incomplete-history scenarios with named tests.
- Keep the accepted non-goals: no GitHub App, contributor ledger,
reconciler, scheduled workflow, required check, branch-protection
change, approval invalidation, or claim that this solves PR #6202's
separate merge-authorization boundary.

## 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:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: no end-user behavior changes;
the internal maintainer workflow is documented at its operator surface
in `MERGE-GATE.md` and `SKILL.md`, and the documentation-writer pass
found no `docs/` impact.
- [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: focused implementation
and edge-case audits confirmed the advisory remains separate from hard
gates and `allPass`; the source boundary and accepted narrow scope are
documented and regression-tested.
- [ ] 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 — all changed-file and pre-push
hooks passed except the broad local `test-cli` hook, which hit unrelated
Node 26/macOS/Python baseline failures; GitHub CI remains authoritative.
- [x] Targeted tests pass for changed behavior — 34 tests in
`test/skills/check-gates-compliance.test.ts`; `npm run typecheck:cli`,
plugin build, test-title check, source-shape check, Biome, and `git diff
--check` also pass.
- [ ] Full `npm test` passes (broad runtime changes only) — not claimed;
this is an internal maintainer-tool change and the unrelated local
baseline failures are described above.
- [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)

---
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>


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

* **New Features**
* Added `contributor/approver overlap` as a non-blocking advisory in
merge gate results.
* Updated merge-maintainer guidance to re-run the gate after approval
and include the advisory in the readiness summary (without affecting
merge readiness).
* **Bug Fixes**
* Improved evaluation of contributor approval overlap, including
paginated history, automated identities, and ambiguous/malformed review
timestamps.
* **Tests**
* Expanded compliance fixtures and added coverage for clear vs warning
advisory outcomes, pagination aggregation, superseding/dismissal logic,
and uncertainty handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
…n secret guard (NVIDIA#6202)

## Summary

Adds a `dcode status` identity command to the managed LangChain Deep
Agents Code wrapper so a user connected into a sandbox can tell which
sandbox the session is in, and fixes the wrapper secret guard falsely
refusing to start when OpenShell injects its canonical TLS client-key
path after a credential provider is attached.

## Related Issue

Fixes NVIDIA#6189
Resolves NVIDIA#6186

## Changes

- `agents/langchain-deepagents-code/dcode-wrapper.sh`: add a `status` /
`whoami` / `identity` subcommand that distinguishes the sandbox,
NemoClaw harness, active dcode agent, inference route, upstream
provider, model, endpoint, and runtime, then exits without launching
Deep Agents Code; advertise the managed aliases in `dcode --help`.
- `agents/langchain-deepagents-code/dcode-wrapper.sh`: allow only the
exact runtime pair
`OPENSHELL_TLS_KEY=/etc/openshell/tls/client/tls.key`; alternate paths,
opaque values, PEM material, and provider tokens remain rejected.
- Keep `.deepagents/.env` fail-closed: the OpenShell runtime exception
does not apply to the user-mutable env file.
- Add `tvly-` Tavily tokens to the secret-shape detection patterns.
- `src/lib/onboard/sandbox-create-launch.ts`, `src/lib/onboard.ts`:
forward `NEMOCLAW_SANDBOX_NAME` into the Deep Agents Code sandbox create
env (gated to the `langchain-deepagents-code` agent).
- `agents/langchain-deepagents-code/start.sh`: persist
`NEMOCLAW_SANDBOX_NAME` into the shared runtime env file that connect
shells and the wrapper source, so `dcode status` resolves the name.
- `docs/get-started/quickstart-langchain-deepagents-code.mdx`: document
`dcode status`.
- Tests: wrapper identity and agent-preference resolution, managed help,
exact runtime-pair acceptance, negative secret/path cases, mutable-env
rejection, sandbox-create env injection, and start.sh serialization.

## 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
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [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: reviewed against the
repository security checklist; the exception is limited to one exact
runtime name/value pair, values are never logged, mutable env files
remain fail-closed, and Linux tests cover alternate paths, PEM material,
opaque values, and provider tokens.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [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 — pre-push hooks and scoped checks
pass; the broad pre-commit test hook encounters unrelated
environment-sensitive baseline failures.
- [x] Targeted tests pass for changed behavior
- [x] Required live Deep Agents Code E2E passes on the PR branch
- [ ] 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) — build
passes with two pre-existing warnings.
- [x] 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)

---
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>


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

* **New Features**
* Added `dcode status`, `dcode whoami`, and `dcode identity` to show the
active sandbox/session identity and exit without launching the
interactive UI.
* Sandboxes for supported Deep Agents Code runs can now propagate a
sandbox name into the runtime environment.
* **Bug Fixes**
* Strengthened runtime secret/credential checks by allowing only
OpenShell’s exact mounted TLS-key keypair, and correctly rejecting
additional secret-shaped Tavily token formats.
* **Documentation**
* Updated the Quickstart “Use the Harness” guide with the new
identity/status workflow and command aliases.
* **Tests**
* Added and expanded coverage for identity/status output, secret gating,
TLS-key allowlisting behavior, and sandbox name propagation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>

---------

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Apurv Kumaria <akumaria@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary

Reverts NVIDIA#6202 from `main` so v0.0.73 retains the release boundary that
was already documented and exercised by the release E2E run. PR NVIDIA#6202
remains targeted for v0.0.74.

The resulting tree is byte-for-byte identical to commit
`2276b2e1373548f9afa95b3a4f4bcd8db244874c`
(`967ad0207b591bfc7f3398f37c230f199bb932ed`).

## Related Issue

Release-boundary housekeeping for v0.0.73. Reverts NVIDIA#6202 without closing
its related issues.

## Changes

- Revert the Deep Agents Code `status`/identity wrapper commands
introduced by NVIDIA#6202.
- Revert the OpenShell TLS-key secret-guard exception introduced by
NVIDIA#6202.
- Revert the Deep Agents Code sandbox-name propagation and accompanying
tests.
- Remove the deferred user-facing `dcode status` documentation from the
v0.0.73 tree.

## 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 — exact revert
restores the previously tested tree.
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes — NVIDIA#6202
documentation is reverted with the code.
- [ ] 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 — the index tree exactly matches the pre-NVIDIA#6202 release tree,
and no manual edits were made to the revert.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
no CI waiver requested; the local broad `test-cli` pre-commit hook was
skipped after seven unrelated environment-sensitive baseline failures in
Hermes file modes, managed-gateway trust state, and state-dir permission
modes. Changed-area tests pass and PR CI remains required.

## Verification

- [x] PR description includes the DCO sign-off declaration and the
commit appears as `Verified` in GitHub.
- [x] Normal pre-push hooks passed; all pre-commit hooks except the
disclosed broad `test-cli` baseline lane passed.
- [x] `npx vitest run --project cli
src/lib/onboard/sandbox-create-launch.test.ts --silent=false
--reporter=default` — 6/6 passed.
- [x] `npx vitest run --project integration
test/langchain-deepagents-code-image.test.ts --silent=false
--reporter=default` — 53/53 passed.
- [ ] Full `npm test` passes (broad runtime changes only) — not rerun;
the broad hook's unrelated baseline failures are disclosed above.
- [x] Quality Gates section completed with required justifications or
waivers.
- [x] No secrets, API keys, or credentials committed.
- [x] `npm run docs` passes with 0 errors and two pre-existing Fern
warnings.
- [x] Doc pages follow the style guide.
- [ ] New doc pages include SPDX header and frontmatter — no new doc
pages.

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


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

## Summary by CodeRabbit

* **New Features**
* Additional environment details are now carried into runtime setup for
better tracing and project context.
* **Bug Fixes**
* Tightened secret-detection and runtime-value checks to reduce the
chance of sensitive values being accepted.
* Improved sandbox launch behavior by simplifying how launch settings
are prepared.
* **Documentation**
* Removed outdated guidance about checking the current sandbox from the
quickstart.

<!-- 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
<!-- 1-3 sentences: what this PR does and why. -->

Restores NVIDIA#6202 now that v0.0.73 has been tagged. This reintroduces
`dcode status` identity reporting, managed help, the exact OpenShell
TLS-key runtime allowance, sandbox-name propagation, and their docs and
tests for v0.0.74, with focused follow-ups that suppress
private-key-shaped or encoded-credential metadata and fail closed on
malformed or unsupported identity config scalars.

## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->

Restores NVIDIA#6202 after the release-boundary revert in NVIDIA#6223. Related to
NVIDIA#6189, NVIDIA#6186, and the complementary runtime hardening in NVIDIA#6082.

## Changes
<!-- Bullet list of key changes. -->

- Restore `dcode status`, `dcode whoami`, and `dcode identity` without
launching the interactive UI.
- Restore the exact runtime-only
`OPENSHELL_TLS_KEY=/etc/openshell/tls/client/tls.key` allowance while
keeping arbitrary paths, values, PEM material, and persisted `.env`
entries fail-closed.
- Restore Tavily and context-shaped secret detection in the managed Deep
Agents Code wrapper.
- Mirror canonical private-key block detection before mutable config or
runtime metadata can reach `dcode status`, including the managed Slack
early-allowlist path, and scan the complete mutable `.deepagents/.env`
so raw multiline blocks cannot evade per-line classification.
- Reject literal, escaped, percent-encoded, and double-encoded query,
fragment, and userinfo delimiters before endpoint metadata can reach
`dcode status`.
- Restrict the informational TOML reader to known generated sections and
complete quoted scalars so malformed, commented, array, and unsupported
nested values fall back safely instead of being displayed.
- Restore Deep Agents Code sandbox-name propagation through onboarding
and startup state.
- Restore the original NVIDIA#6202 quickstart documentation, identity tests,
secret-boundary tests, and shared fixture, then add a composed
onboarding → `start.sh` → `dcode status` handoff test.
- Record the NVIDIA#6082 rebase contract: NVIDIA#6232's managed-proxy and
secret-filtering paths remain authoritative while NVIDIA#6082's runtime
upgrade, auth-store, and mutation-command work layers on afterward.

## 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
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior — restores the
original NVIDIA#6202 identity, secret-boundary, image-contract, and onboarding
coverage; adds canonical private-key parity, malformed/unsupported
config, encoded endpoint, and composed sandbox-name handoff cases.
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes — restores the
original `dcode status` quickstart section.
- [ ] 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 — the restoration commit exactly matches the previously
reviewed NVIDIA#6202 tree; independent reproduction confirmed the
advisor-reported private-key status leak, and focused follow-ups mirror
the canonical block pattern, reject raw multiline `.env` key blocks and
encoded endpoint delimiters, and fail closed on malformed generated
scalars with status, parity, managed-Slack, composed-handoff, no-launch,
redaction, and secret-scanner coverage.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
no CI waiver requested; required remote checks remain mandatory.

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [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 — all commit hooks except the
disclosed local `test-cli` environment-sensitive baseline lane passed;
normal pre-push CLI typecheck and tag-version synchronization passed.
- [x] Targeted tests pass for changed behavior — onboarding 8/8 and Deep
Agents Code wrapper/image/composed-handoff tests 77/77 after review
follow-ups; CLI typecheck, ShellCheck, Biome, test-size/project-overlap
gates, detect-private-key, and gitleaks also pass.
- [x] Required exact-head live E2Es pass on attempt 1 —
`ubuntu-repo-cloud-langchain-deepagents-code` and `cloud-onboard` at
`a503d95a81094cd3415ce933b64a0213a4d3aa2d`.
- [ ] Full `npm test` passes (broad runtime changes only) — not rerun;
remote CI remains required.
- [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) — build
passed with 0 errors and two pre-existing Fern warnings.
- [x] Doc pages follow the style guide; independent docs review found no
additional changes needed.
- [ ] New doc pages include SPDX header and frontmatter — no new doc
pages.

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

---------

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

NemoClaw `v0.0.74` will ship stable OpenShell `v0.0.72`. This dependency
layer advances the supported OpenShell contract from `0.0.71` to
`0.0.72`, pins every consumed release artifact, preserves
round-trippable policy state, and hardens installer verification so
pull-request code cannot authorize its own pins.

## Related Issue

Refs NVIDIA#5591.
Follow-up to merged NVIDIA#5596.
Dependency layer for NVIDIA#5876 and the accepted MCP design in NVIDIA#566.

## Changes

- Pin stable OpenShell `0.0.72` across the supported version
floor/ceiling, installer, Brev launchable, blueprint, supervisor image,
workflow, and live-E2E contracts. OpenShell development builds remain
compatibility evidence, not the shipping runtime.
- Pin all consumed CLI, gateway, and sandbox archives plus both Brev CLI
references to the official `v0.0.72` checksum manifests.
- Read mutation input from `openshell policy get --base`, strip reserved
`_provider_*` entries before `policy set`, retain `--full` only for
read-only diagnostics, and preserve future mapping sections plus
MCP/JSON-RPC fields during merges.
- Route the CommonJS CLI and ESM plugin through one generated OpenShell
policy boundary and exact-pin `yaml` `2.8.3` in both production package
graphs.
- Normalize that boundary for both compiled CommonJS and source-mode
`tsx` loading. A subprocess package-contract test reproduces the live
source-loader path that exposed the mismatch.
- Run installer verification from base-trusted code. The introducing PR
falls back only to immutable commit
`cb5e9aefab2b16fedc0995149fc3520da0d5e0c7`, verified as tree
`1fdf59efe40b78c407e222fd42043b23a61e199a`, with an enforced expiry at
`2026-12-29T19:35:41Z`.
- Treat PR-head installer files as data only. The trusted parser rejects
symbolic links, a symbolic-link `scripts` parent, non-regular files,
changed inode/device identity, and input over 1 MiB; it opens with
`O_NOFOLLOW` and performs a bounded descriptor read.
- Fail installer verification closed on missing, duplicate, mismatched,
incomplete, or unreachable OpenShell/Brev pin data.
- Publish the OpenShell `0.0.72` compatibility review and align version,
policy, gateway-authentication, and troubleshooting documentation.

### Exact-head evidence

- PR head: `2d06fa01b624b63813fe558ce36b29d47ad31e36`, based exactly on
current `main` `dc96deb24d67eeeb2cb7b2bb42c7c53f000507f3`. The final
signed merge incorporates the release-boundary revert that defers
unrelated dcode-status work, so this dependency PR does not reintroduce
NVIDIA#6202 outside its scope.
- GitHub verifies the new merge commit signature, DCO is green, the
prior maintainer approval remains recorded at [review
4611344448](NVIDIA#6020 (review)),
and GitHub reports the PR graph as `MERGEABLE`.
- Post-restack local validation passes `build:cli`, full and CLI
typechecks, repository checks, generated agent-doc synchronization,
affected Deep Agents image contracts, and `git diff --check`.
- All exact-head ordinary PR checks are terminal green (33 successful,
three skipped/neutral, zero failures), including macOS/WSL E2E, every
CLI shard and aggregate, static/security scans, DCO, and both PR Review
Advisor jobs. GitHub reports `APPROVED` and `MERGEABLE/CLEAN`.
- Exact-head selected OpenShell [E2E run
28632123304](https://github.com/NVIDIA/NemoClaw/actions/runs/28632123304)
is terminal green: version pin, gateway-auth contract, network policy,
gateway upgrade/state restoration, scorecard, and the no-comment
reporter all passed from a temporary no-PR ref at the identical commit.
The temporary ref was deleted after completion.
- Exact-head PR Review [run
28632002111](https://github.com/NVIDIA/NemoClaw/actions/runs/28632002111)
and E2E Advisor [run
28632002140](https://github.com/NVIDIA/NemoClaw/actions/runs/28632002140)
are green. GPT reports no actionable finding; Nemotron's check passed
but both JSON synthesis attempts were unparseable, so that model's
artifact is incomplete rather than clearance. E2E Advisor reports high
confidence and selects the four live lanes linked above.

### Trust-boundary notes

- The immutable bootstrap is intentionally used only while the PR base
lacks the trusted action. Once that action exists on the base, executing
the newer base-trusted verifier is the stronger boundary; the expiring
bootstrap should then be removed rather than run redundantly.
- No untrusted PR process executes alongside the parser. GitHub checks
out inert PR data, then trusted code validates and reads the
already-opened descriptor. The link/type/identity/bounds checks cover
repository-controlled redirection and exhaustion inputs without claiming
protection from a privileged concurrent host writer.
- Stable OpenShell `0.0.72` accepts an unmarked policy root only when it
contains `version` or `network_policies`; metadata-only and malformed
documents fail closed. Versionless `network_policies` is retained for
the supported compatibility contract.

### Advisor disposition

- GPT reported no required findings and one warning about the mutable
default `BASE_IMAGE` tag. That `ARG
BASE_IMAGE=ghcr.io/nvidia/nemoclaw/sandbox-base:latest` line is
unchanged from current `main`; this dependency PR neither introduces nor
broadens that repository-wide build default.
- Nemotron's bootstrap finding would weaken the intended trust
transition: the immutable bootstrap exists only for the introducing PR.
Once the action is present on the base, the newer base-trusted action
must replace the older bootstrap; both paths are immutable for the
current event and are contract-tested.
- Nemotron's parser race assumes an untrusted concurrent filesystem
writer. PR code is never executed in this job: GitHub checks out inert
data, then trusted code rejects links/special files, checks the opened
descriptor's device/inode, bounds the read, and closes it. A privileged
host writer is outside this PR-input threat model.
- Nemotron's checksum finding is not circular. The trusted checker pins
the SHA-256 of each upstream checksum manifest, verifies that immutable
manifest before reading it, and compares every embedded installer pin
with exactly one manifest entry. At install time each named archive must
exist and match its pinned digest, so a missing asset still fails closed
without downloading all archives during every PR check.
- The generated-boundary auditor executes in the Docker builder stage
exercised by ordinary `build-sandbox-images` CI. The exact source-mode
`.cts` versus generated `.cjs` mismatch found by live proof is now
covered directly by the subprocess package-contract test and the
compiled runner suites.

## 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
- [x] Existing tests cover changed behavior — justification: policy
mutation, package boundary, installer trust, workflow selection, and
runtime upgrade/state-restoration have focused coverage; final selected
E2E is linked above.
- [ ] Tests not applicable — justification: not applicable; this changes
security-sensitive installer, policy, and runtime compatibility
behavior.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification: not applicable; supported
OpenShell versions and policy behavior are user-facing.
- [x] 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: the linked approval
predates the current head; exact-head human review or an explicit
carried-approval decision remains required, and no waiver is requested.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue: no waiver is requested;
exact-head ordinary CI is green, and the selected run's comment-only
reporter caveat is documented above and is not a required PR check.

## 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)
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [x] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Preksha Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds a best-effort maintainer advisory when the same GitHub account is
both a current PR contributor and an effective approver. The warning is
intentionally non-blocking: it does not invalidate approval, require a
third reviewer, publish a failing check, or change merge readiness.

This replaces the earlier hard-gate draft with the narrow diagnostic
behavior accepted in review and hardens it against automated identities,
incomplete review timestamps, and truncated commit/review snapshots.

## Related Issue

Refs NVIDIA#6222

## Changes

- Compare the PR opener and every paginated current commit
author/co-author with each reviewer's latest opinionated review across
all review pages.
- Ignore automated identities and later `COMMENTED` reviews when
determining effective human approvals.
- Order valid review timestamps deterministically and surface an
uncertainty warning for missing, invalid, or conflicting timestamps.
- Warn instead of returning a false clear when complete paginated
history cannot be retrieved, including an outer connection-count
mismatch or truncated nested co-author list.
- Return overlap under `advisories.contributorApprovalOverlap` while
leaving `allPass` unchanged.
- Document the current-snapshot source boundary, diagnostic-only policy
decision, regression scope, and removal condition.
- Cover opener, author/co-author, case-normalization, bot,
review-transition, dismissal, ordering, incomplete-timestamp,
pagination, and incomplete-history scenarios with named tests.
- Keep the accepted non-goals: no GitHub App, contributor ledger,
reconciler, scheduled workflow, required check, branch-protection
change, approval invalidation, or claim that this solves PR NVIDIA#6202's
separate merge-authorization boundary.

## 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:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: no end-user behavior changes;
the internal maintainer workflow is documented at its operator surface
in `MERGE-GATE.md` and `SKILL.md`, and the documentation-writer pass
found no `docs/` impact.
- [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: focused implementation
and edge-case audits confirmed the advisory remains separate from hard
gates and `allPass`; the source boundary and accepted narrow scope are
documented and regression-tested.
- [ ] 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 — all changed-file and pre-push
hooks passed except the broad local `test-cli` hook, which hit unrelated
Node 26/macOS/Python baseline failures; GitHub CI remains authoritative.
- [x] Targeted tests pass for changed behavior — 34 tests in
`test/skills/check-gates-compliance.test.ts`; `npm run typecheck:cli`,
plugin build, test-title check, source-shape check, Biome, and `git diff
--check` also pass.
- [ ] Full `npm test` passes (broad runtime changes only) — not claimed;
this is an internal maintainer-tool change and the unrelated local
baseline failures are described above.
- [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)

---
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>


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

* **New Features**
* Added `contributor/approver overlap` as a non-blocking advisory in
merge gate results.
* Updated merge-maintainer guidance to re-run the gate after approval
and include the advisory in the readiness summary (without affecting
merge readiness).
* **Bug Fixes**
* Improved evaluation of contributor approval overlap, including
paginated history, automated identities, and ambiguous/malformed review
timestamps.
* **Tests**
* Expanded compliance fixtures and added coverage for clear vs warning
advisory outcomes, pagination aggregation, superseding/dismissal logic,
and uncertainty handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
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 feature PR adds or expands user-visible functionality integration: dcode LangChain Deep Code integration behavior NV QA Bugs found by the NVIDIA QA Team

Projects

None yet

4 participants