feat(dcode): add thread-scoped auto-approval - #6486
Conversation
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds a managed, fail-closed thread-scoped auto-approval capability for LangChain Deep Agents Code sandboxes. It threads the mode through image build, runtime gating, rebuild/onboard plumbing, registry/status state, documentation, and tests. ChangesDeep Agents Code thread auto-approval capability
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-6486.docs.buildwithfern.com/nemoclaw |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
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. |
There was a problem hiding this comment.
🧹 Nitpick comments (10)
docs/get-started/quickstart-langchain-deepagents-code.mdx (1)
153-153: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPrefer
codeformatting over bold for the literal menu label.
**Auto-approve for this thread**is a literal UI string. As per coding guidelines, "Usecodeformatting for commands, paths, flags, environment variables, file names, and literal values" and "Avoid ... unnecessary bold text," so this should likely use inline code instead of bold.✏️ Proposed fix
-For each thread, select **Auto-approve for this thread** in the approval menu or start that `dcode` process with `dcode -y`. +For each thread, select `Auto-approve for this thread` in the approval menu or start that `dcode` process with `dcode -y`.🤖 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 `@docs/get-started/quickstart-langchain-deepagents-code.mdx` at line 153, The inline UI label in the quickstart text uses bold formatting for a literal menu item, which should be changed to code formatting instead. Update the sentence in the doc content so the `Auto-approve for this thread` label is wrapped with inline code rather than bold, while leaving the `dcode` command formatting as-is; this is a localized markdown wording fix in the prose around the approval menu instructions.Source: Coding guidelines
docs/about/release-notes.mdx (1)
28-28: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueInconsistent link style in the same sentence.
The first link uses an absolute route path (
/user-guide/deepagents/get-started/quickstart) while the other three use relative dotted paths (../security/best-practices, etc.). As per coding guidelines, "Use route-style links without.mdxextensions for links between docs pages," so consider using one consistent style across all four links in this sentence.✏️ Proposed fix (aligning to relative style used elsewhere in this doc)
-For more information, refer to [Quickstart with LangChain Deep Agents Code](/user-guide/deepagents/get-started/quickstart), [Security Best Practices](../security/best-practices), [Model Capability Audit](../inference/model-capability-audit), and [NemoClaw CLI Commands Reference](../reference/commands). +For more information, refer to [Quickstart with LangChain Deep Agents Code](../get-started/quickstart-langchain-deepagents-code), [Security Best Practices](../security/best-practices), [Model Capability Audit](../inference/model-capability-audit), and [NemoClaw CLI Commands Reference](../reference/commands).🤖 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 `@docs/about/release-notes.mdx` at line 28, The sentence in release notes mixes route-style and relative links, so update the links in the same sentence to use one consistent docs-link style. Adjust the Quickstart link in the release-notes content to match the relative dotted-path style used by the other references, and keep all four links consistent with the docs-link conventions used elsewhere in this page.Source: Coding guidelines
docs/inference/model-capability-audit.mdx (1)
84-84: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSame bold-vs-code inconsistency as the quickstart doc.
**Auto-approve for this thread**should likely be inline code per the literal-value formatting rule, matching the same concern raised for the quickstart doc's identical phrase.🤖 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 `@docs/inference/model-capability-audit.mdx` at line 84, The phrase Auto-approve for this thread is formatted inconsistently with the literal-value style used elsewhere; update the relevant table entry in the model-capability audit doc so this UI label uses inline code formatting like the matching quickstart reference. Keep the surrounding wording unchanged and align the markup with the same literal-value convention used for other exact UI strings in the document.Source: Coding guidelines
src/lib/onboard/dcode-auto-approval.ts (1)
21-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicate helper functions.
dcodeAutoApprovalModeOrDefaultis a byte-for-byte alias ofnormalizeDcodeAutoApprovalMode(Line 31 just calls it). Callers use the two names interchangeably (e.g.sandbox-registration.tscallsnormalizeDcodeAutoApprovalModewhile this file's ownhasDcodeAutoApprovalDriftcallsdcodeAutoApprovalModeOrDefault), which invites confusion about whether they diverge.♻️ Suggested consolidation
-export function dcodeAutoApprovalModeOrDefault(value: unknown): DcodeAutoApprovalMode { - return normalizeDcodeAutoApprovalMode(value); -} +// Reuse normalizeDcodeAutoApprovalMode directly; keeping one name avoids drift.🤖 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 `@src/lib/onboard/dcode-auto-approval.ts` around lines 21 - 32, dcodeAutoApprovalModeOrDefault is just a duplicate wrapper around normalizeDcodeAutoApprovalMode, so consolidate the two helpers into a single source of truth. Remove the redundant alias or make every caller use normalizeDcodeAutoApprovalMode consistently, and update hasDcodeAutoApprovalDrift and any related references so the dcode-auto-approval helpers in dcode-auto-approval.ts have one clear name and behavior.src/lib/domain/lifecycle/options.ts (1)
95-121: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated flag-parsing pattern across
--tool-disclosureand--dcode-auto-approval.The split/inline lookup, validation, and error-throwing logic (Lines 95-103 vs 104-121) is nearly identical for both flags. Extracting a shared
parseStringFlag(options, flagName, isValid)helper would remove the duplication and make it easy to add future string flags without repeating this block.♻️ Suggested helper
+function parseArrayFlagValue(options: string[], flagName: string): unknown { + const splitIndex = options.lastIndexOf(`--${flagName}`); + const inline = [...options].reverse().find((value) => value.startsWith(`--${flagName}=`)); + if (splitIndex < 0 && inline === undefined) return undefined; + return splitIndex >= 0 ? options[splitIndex + 1] : inline?.slice(`--${flagName}=`.length); +}🤖 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 `@src/lib/domain/lifecycle/options.ts` around lines 95 - 121, The parsing logic for --tool-disclosure and --dcode-auto-approval is duplicated in options parsing, so extract the repeated split/inline lookup, validation, and error handling into a shared helper such as parseStringFlag in lifecycle/options.ts. Update the existing option handling to use that helper for both normalizeToolDisclosure and isDcodeAutoApprovalMode paths, keeping the current validation messages and behavior intact while making it reusable for future flags.src/lib/actions/sandbox/rebuild-durable-config.ts (1)
131-142: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffGrowing positional-parameter list on
resolveRebuildDurableConfig.The function now takes 7 positional parameters, several optional (
requestedToolDisclosure?,allowLegacyManagedImageRecovery = false,requestedDcodeAutoApprovalMode?). This pattern predates this PR but keeps growing; each future durable-config knob will add another positional slot, increasing the chance of misordered call sites (mitigated somewhat by distinct types, but not eliminated for same-typed additions).Consider migrating to a single options object for the trailing optional parameters in a follow-up.
🤖 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 `@src/lib/actions/sandbox/rebuild-durable-config.ts` around lines 131 - 142, `resolveRebuildDurableConfig` is accumulating trailing positional optional parameters, which makes future call sites brittle and hard to extend. Refactor the function to accept a single options object for the optional durable-config knobs (such as `requestedToolDisclosure`, `allowLegacyManagedImageRecovery`, and `requestedDcodeAutoApprovalMode`), and update the call sites to pass named properties instead of relying on parameter order.src/lib/onboard/machine/handlers/sandbox.ts (1)
419-491: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider consolidating repeated registry lookups.
getSandboxRegistryEntry(state.sandboxName)is now called separately inapplyObservabilityRequest,applyDcodeAutoApprovalRequest, and again insideresolveResumeDecisionfor the same sandbox within a singlerun()invocation. Resolving it once inrun()and threading it through would avoid the redundant lookups as this managed-feature pattern grows.Also applies to: 533-587, 900-903
🤖 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 `@src/lib/onboard/machine/handlers/sandbox.ts` around lines 419 - 491, Consolidate the repeated sandbox registry lookup by resolving getSandboxRegistryEntry(state.sandboxName) once per run() invocation and threading the same registry entry through applyObservabilityRequest, applyDcodeAutoApprovalRequest, and resolveResumeDecision. Use the existing SandboxHandler flow and the resolveResumeDecision/applyObservabilityRequest/applyDcodeAutoApprovalRequest methods to pass the cached registryEntry instead of calling the dependency repeatedly.src/lib/actions/sandbox/rebuild-mcp-phase.ts (1)
72-88: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider consolidating optional positional args into a single options object.
printMcpRebuildRetryCommandnow takes three sequential optional params (toolDisclosure,observability,dcodeAutoApproval), forcing callers to passundefinedplaceholders to reach later ones (as done in the test file). Bundling these into a single options object would improve readability and make future additions safer, though this follows the file's existing pattern.🤖 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 `@src/lib/actions/sandbox/rebuild-mcp-phase.ts` around lines 72 - 88, `printMcpRebuildRetryCommand` currently uses multiple optional positional parameters, which forces callers to pass placeholder undefined values to reach later options. Refactor the signature to take a single options object that groups `toolDisclosure`, `observability`, and `dcodeAutoApproval`, then update the internal flag/arg handling and all call sites to pass named properties instead of relying on argument position.src/lib/onboard/command.test.ts (1)
113-127: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd coverage for the
--from+thread-opt-inrejection path.
validateDcodeAutoApprovalAgentincommand.ts(lines 156-171) has afromDockerfile-aware branch that forceseffectiveAgenttonull(rejectingthread-opt-in) when a custom Dockerfile is supplied, even if--agent langchain-deepagents-codeis also set. This is a security-relevant guard (preventing thread-opt-in on non-managed/custom images) but isn't exercised by any test in this file.✅ Suggested additional test
+ it("rejects DCode thread opt-in when a custom Dockerfile is supplied", () => { + expect(() => + resolve({ + agent: "dcode", + from: "./Dockerfile.custom", + "dcode-auto-approval": "thread-opt-in", + }), + ).toThrow("exit:1"); + });🤖 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 `@src/lib/onboard/command.test.ts` around lines 113 - 127, Add a test in command.test.ts that exercises the fromDockerfile path in validateDcodeAutoApprovalAgent by passing thread-opt-in together with a custom --from Dockerfile and --agent langchain-deepagents-code; assert it is rejected with the same exit:1 behavior. Use the resolve helper and the existing knownAgents setup so the new case covers the fromDockerfile-aware branch that forces effectiveAgent to null.test/e2e/support/platform-parity-cloud-experimental.test.ts (1)
42-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake the
tclshgate visible on CI
it.runIf(tclshAvailable)can drop the only coverage for the marker-ordering / keystroke sequence without any signal whentclshisn’t installed. Add an explicit CI check or a warning/summary note so the missing prerequisite doesn’t silently erase this test path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/e2e/support/platform-parity-cloud-experimental.test.ts` around lines 42 - 44, The tclsh availability gate in the platform-parity test is currently silent, so when tclsh is missing CI can skip the only marker-ordering/keystroke coverage without any signal. Update the test setup around tclshAvailable and it.runIf to emit an explicit CI-visible warning or summary note when the prerequisite is absent, or add a dedicated CI check that reports the missing dependency instead of silently skipping the path.
🤖 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 `@docs/about/release-notes.mdx`:
- Line 28: The sentence in release notes mixes route-style and relative links,
so update the links in the same sentence to use one consistent docs-link style.
Adjust the Quickstart link in the release-notes content to match the relative
dotted-path style used by the other references, and keep all four links
consistent with the docs-link conventions used elsewhere in this page.
In `@docs/get-started/quickstart-langchain-deepagents-code.mdx`:
- Line 153: The inline UI label in the quickstart text uses bold formatting for
a literal menu item, which should be changed to code formatting instead. Update
the sentence in the doc content so the `Auto-approve for this thread` label is
wrapped with inline code rather than bold, while leaving the `dcode` command
formatting as-is; this is a localized markdown wording fix in the prose around
the approval menu instructions.
In `@docs/inference/model-capability-audit.mdx`:
- Line 84: The phrase Auto-approve for this thread is formatted inconsistently
with the literal-value style used elsewhere; update the relevant table entry in
the model-capability audit doc so this UI label uses inline code formatting like
the matching quickstart reference. Keep the surrounding wording unchanged and
align the markup with the same literal-value convention used for other exact UI
strings in the document.
In `@src/lib/actions/sandbox/rebuild-durable-config.ts`:
- Around line 131-142: `resolveRebuildDurableConfig` is accumulating trailing
positional optional parameters, which makes future call sites brittle and hard
to extend. Refactor the function to accept a single options object for the
optional durable-config knobs (such as `requestedToolDisclosure`,
`allowLegacyManagedImageRecovery`, and `requestedDcodeAutoApprovalMode`), and
update the call sites to pass named properties instead of relying on parameter
order.
In `@src/lib/actions/sandbox/rebuild-mcp-phase.ts`:
- Around line 72-88: `printMcpRebuildRetryCommand` currently uses multiple
optional positional parameters, which forces callers to pass placeholder
undefined values to reach later options. Refactor the signature to take a single
options object that groups `toolDisclosure`, `observability`, and
`dcodeAutoApproval`, then update the internal flag/arg handling and all call
sites to pass named properties instead of relying on argument position.
In `@src/lib/domain/lifecycle/options.ts`:
- Around line 95-121: The parsing logic for --tool-disclosure and
--dcode-auto-approval is duplicated in options parsing, so extract the repeated
split/inline lookup, validation, and error handling into a shared helper such as
parseStringFlag in lifecycle/options.ts. Update the existing option handling to
use that helper for both normalizeToolDisclosure and isDcodeAutoApprovalMode
paths, keeping the current validation messages and behavior intact while making
it reusable for future flags.
In `@src/lib/onboard/command.test.ts`:
- Around line 113-127: Add a test in command.test.ts that exercises the
fromDockerfile path in validateDcodeAutoApprovalAgent by passing thread-opt-in
together with a custom --from Dockerfile and --agent langchain-deepagents-code;
assert it is rejected with the same exit:1 behavior. Use the resolve helper and
the existing knownAgents setup so the new case covers the fromDockerfile-aware
branch that forces effectiveAgent to null.
In `@src/lib/onboard/dcode-auto-approval.ts`:
- Around line 21-32: dcodeAutoApprovalModeOrDefault is just a duplicate wrapper
around normalizeDcodeAutoApprovalMode, so consolidate the two helpers into a
single source of truth. Remove the redundant alias or make every caller use
normalizeDcodeAutoApprovalMode consistently, and update
hasDcodeAutoApprovalDrift and any related references so the dcode-auto-approval
helpers in dcode-auto-approval.ts have one clear name and behavior.
In `@src/lib/onboard/machine/handlers/sandbox.ts`:
- Around line 419-491: Consolidate the repeated sandbox registry lookup by
resolving getSandboxRegistryEntry(state.sandboxName) once per run() invocation
and threading the same registry entry through applyObservabilityRequest,
applyDcodeAutoApprovalRequest, and resolveResumeDecision. Use the existing
SandboxHandler flow and the
resolveResumeDecision/applyObservabilityRequest/applyDcodeAutoApprovalRequest
methods to pass the cached registryEntry instead of calling the dependency
repeatedly.
In `@test/e2e/support/platform-parity-cloud-experimental.test.ts`:
- Around line 42-44: The tclsh availability gate in the platform-parity test is
currently silent, so when tclsh is missing CI can skip the only
marker-ordering/keystroke coverage without any signal. Update the test setup
around tclshAvailable and it.runIf to emit an explicit CI-visible warning or
summary note when the prerequisite is absent, or add a dedicated CI check that
reports the missing dependency instead of silently skipping the path.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 829682c7-6387-4d70-a971-804860e04b13
📒 Files selected for processing (91)
agents/langchain-deepagents-code/Dockerfileagents/langchain-deepagents-code/dcode-launcher.shagents/langchain-deepagents-code/dcode-wrapper.shagents/langchain-deepagents-code/managed-dcode-runtime.pyagents/langchain-deepagents-code/patch-managed-deepagents-code.pyagents/langchain-deepagents-code/start.shdocs/about/release-notes.mdxdocs/get-started/quickstart-langchain-deepagents-code.mdxdocs/inference/model-capability-audit.mdxdocs/reference/commands.mdxdocs/security/best-practices.mdxsrc/commands/sandbox/oclif-command-adapters.test.tssrc/commands/sandbox/rebuild.tssrc/lib/actions/sandbox/rebuild-dcode-mutation-edge.test.tssrc/lib/actions/sandbox/rebuild-dcode-orchestrator.test.tssrc/lib/actions/sandbox/rebuild-dcode-orchestrator.tssrc/lib/actions/sandbox/rebuild-dcode-pre-delete-drift.test.tssrc/lib/actions/sandbox/rebuild-dcode-preflight.test.tssrc/lib/actions/sandbox/rebuild-dcode-preflight.tssrc/lib/actions/sandbox/rebuild-durable-config.test.tssrc/lib/actions/sandbox/rebuild-durable-config.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.test.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.tssrc/lib/actions/sandbox/rebuild-managed-image-configuration.test.tssrc/lib/actions/sandbox/rebuild-managed-image-preflight.tssrc/lib/actions/sandbox/rebuild-mcp-phase.test.tssrc/lib/actions/sandbox/rebuild-mcp-phase.tssrc/lib/actions/sandbox/rebuild-pipeline.tssrc/lib/actions/sandbox/rebuild-preflight-confirmation.test.tssrc/lib/actions/sandbox/rebuild-preflight-confirmation.tssrc/lib/actions/sandbox/rebuild-preflight-phase.tssrc/lib/actions/sandbox/rebuild-preflight-target-phase.tssrc/lib/actions/sandbox/rebuild-recreate-observability.test.tssrc/lib/actions/sandbox/rebuild-recreate-phase.tssrc/lib/actions/sandbox/rebuild-target-config.tssrc/lib/actions/sandbox/status-flow.test.tssrc/lib/actions/sandbox/status-snapshot.tssrc/lib/actions/sandbox/status-text.tssrc/lib/actions/sandbox/status.test.tssrc/lib/actions/sandbox/status.tssrc/lib/domain/lifecycle/options.test.tssrc/lib/domain/lifecycle/options.tssrc/lib/onboard.tssrc/lib/onboard/command-support.tssrc/lib/onboard/command.test.tssrc/lib/onboard/command.tssrc/lib/onboard/dcode-auto-approval.test.tssrc/lib/onboard/dcode-auto-approval.tssrc/lib/onboard/dockerfile-patch-dcode-auto-approval.test.tssrc/lib/onboard/dockerfile-patch.tssrc/lib/onboard/machine/core-flow-phases.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-resume.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/prepared-dcode-rebuild.test.tssrc/lib/onboard/prepared-dcode-rebuild.tssrc/lib/onboard/resume-config.tssrc/lib/onboard/runtime-control-flow.test.tssrc/lib/onboard/runtime-control-flow.tssrc/lib/onboard/sandbox-create-launch-observability.test.tssrc/lib/onboard/sandbox-dockerfile-patch-flow.test.tssrc/lib/onboard/sandbox-dockerfile-patch-flow.tssrc/lib/onboard/sandbox-registration.test.tssrc/lib/onboard/sandbox-registration.tssrc/lib/onboard/session-bootstrap.test.tssrc/lib/onboard/session-bootstrap.tssrc/lib/onboard/session-updates.tssrc/lib/onboard/types.tssrc/lib/registry-recovery-action.test.tssrc/lib/registry-recovery-action.tssrc/lib/state/onboard-session-dcode-auto-approval.tssrc/lib/state/onboard-session.test.tssrc/lib/state/onboard-session.tssrc/lib/state/registry.tstest/e2e/e2e-cloud-experimental/checks/12-deepagents-code-thread-auto-approval.shtest/e2e/live/cloud-experimental-check-list.tstest/e2e/live/cloud-experimental-checks.tstest/e2e/support/platform-parity-cloud-experimental.test.tstest/helpers/langchain-deepagents-code-patch-fixture.tstest/helpers/rebuild-managed-image-preflight-harness.tstest/langchain-deepagents-code-auto-approval-image.test.tstest/langchain-deepagents-code-direct-module-patch.test.tstest/langchain-deepagents-code-image.test.tstest/langchain-deepagents-code-managed-entrypoints.test.tstest/langchain-deepagents-code-progressive-tool-disclosure.test.tstest/onboard-prepared-gateway-handoff.test.tstest/onboard-terminal-dashboard.test.tstest/support/status-flow-test-harness.ts
cjagwani
left a comment
There was a problem hiding this comment.
Security/acceptance blocker at exact head f60109ad3c6c62a3b0190364fa3cf8886d9f66de:
_nemoclaw_restart_server_for_agent_swap clears thread auto-approval only when the post-swap thread_id is non-null and differs from the previous ID. The agent transition itself is an approval boundary; if upstream preserves/reuses an ID, leaves it None, or raises after partially changing state, _auto_approve, session_state.auto_approve, and approval_mode_key can remain enabled across the agent transition. /clear//force-clear and _resume_thread use the same non-null/different-ID condition, so their failure/edge paths are also not fail-closed. This violates #6478's explicit new-thread/session reset guarantee.
Please make transition handling fail closed at the boundary and add focused regressions for same-ID, None, and exceptional agent-swap outcomes plus /clear, /force-clear, thread resume/switch, and new-process behavior. The enabled -> disabled rollback also needs a direct test proving the managed wrapper/runtime denies --auto-approve after rebuild.
Release acceptance is independently incomplete: #6478 explicitly requires the Brev launchable embedded terminal, but the current evidence covers only the cloud-experimental DCode path. Please provide current-head launchable evidence for enable, visible warning/status, repeated tool rounds, reset in a new thread/session, and disable/denial. The current codebase-growth failure and dirty base also need resolution before re-review.
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
@jyaunches @wscurran Release disposition needed: this is currently not safe to waive into v0.0.78. Exact head has a concrete approval-reset fail-open, lacks enabled-to-disabled rollback proof, lacks the issue's required Brev embedded-terminal acceptance, fails growth guardrails, and is behind main. These are part of the security contract, not cosmetic advisor items. If this feature is a hard v0.0.78 gate, please keep it in the release and address the requested-change review plus current-head launchable evidence. Otherwise I recommend moving both #6486 and #6478 to v0.0.79 so v0.0.78 is not held on a late security-boundary feature or shipped with acceptance waived. Please confirm which disposition the release should use. |
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
|
Exact-head follow-up for The scope reduction is useful: it removes substantial host-side duplication, should address the growth failure, and the cloud E2E now proves The security blocker remains unchanged in Please reset before invoking each boundary operation (or otherwise guarantee reset in |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/lib/onboard/machine/handlers/sandbox.test.ts (1)
164-227: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winNew tests don't cover the resume-without-explicit-flag scenario.
All three new tests here set an explicit
requestedDcodeAutoApprovalMode("thread-opt-in") or leave both requested/recorded at defaults; none cover resuming with a previously recorded"thread-opt-in"whilerequestedDcodeAutoApprovalModeis omitted. See the related comment onsrc/lib/onboard/dcode-auto-approval.ts(Lines 43-67) for why this matters — the root-cause fix/verification belongs there, but adding a test here (assertingcreateSandboxreceivesdcodeAutoApprovalMode: "disabled"and/or that resume forces a reset) would close the coverage gap at this public boundary.🤖 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 `@src/lib/onboard/machine/handlers/sandbox.test.ts` around lines 164 - 227, Add a regression test in sandbox.test around handleSandboxState for the resume-without-explicit-flag case: resume an existing session whose recorded DCode mode is "thread-opt-in" while requestedDcodeAutoApprovalMode is omitted. Verify the resume path does not reuse the recorded mode and that createSandbox is called with dcodeAutoApprovalMode set to "disabled" (or otherwise confirms the sandbox is reset), using the existing createSandbox, updateSession, and dcodeRegistryEntry helpers to locate the behavior.Source: Path instructions
src/lib/onboard/dcode-auto-approval.test.ts (1)
4-15: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMissing unit coverage for
resolveDcodeAutoApprovalRequest, including the resume-without-flag persistence case.This file never imports or exercises
resolveDcodeAutoApprovalRequest— the function that actually gates whether a thread's auto-approval mode is honored. Given the module's other functions are thoroughly unit-tested here, this is a notable gap, especially for the scenario whererequestedModeisundefined/omitted butrecordedModeis"thread-opt-in"from a prior session (i.e., resume/rebuild without re-passing--dcode-auto-approval thread-opt-in). That is precisely the case the PR requirement "do not silently persist it across sessions or rebuilds" targets, and it remains unverified anywhere in this cohort (see related comment ondcode-auto-approval.tsLines 43-67).As per path instructions for
src/lib/{onboard.ts,onboard/**,...}, resume/repair paths must be proven idempotent and covered at the public boundary — add a test assertingresolveDcodeAutoApprovalRequestreturns"disabled"(not the recorded value) when no explicit request is supplied.Also applies to: 69-108
🤖 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 `@src/lib/onboard/dcode-auto-approval.test.ts` around lines 4 - 15, Add unit coverage for resolveDcodeAutoApprovalRequest in dcode-auto-approval.test.ts, since it is currently not imported or exercised. Write a test for the resume/rebuild case where requestedMode is omitted or undefined and recordedMode is "thread-opt-in", and assert the function returns "disabled" instead of persisting the recorded value. Use the existing dcodeAutoApprovalModeOrDefault, normalizeDcodeAutoApprovalMode, and resolveDcodeAutoApprovalRequest symbols to place the new assertions alongside the other mode-resolution tests.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/commands.mdx`:
- Line 201: Update the `--resume` documentation in `commands.mdx` so it also
mentions the recorded DCode auto-approval mode alongside the provider, model,
sandbox name, agent, observability choice, and custom Dockerfile path. If the
intent is to avoid expanding the sentence, clarify that this setting is restored
from the saved registry entry; otherwise add it directly to the resumable
session state list in the `--resume` description.
In `@src/lib/onboard/dcode-auto-approval.ts`:
- Around line 105-132: `prepareDcodeAutoApprovalCreatePlan` should fail closed
if `deps.exitProcess(1)` does not actually terminate, because both validation
branches can otherwise fall through and return a plan from invalid state. After
each `exitProcess(1)` call in this function, add a defensive `throw` so behavior
matches the guarded pattern used in `failGatewayRouteCheck` and cannot continue
under a non-throwing `exitProcess` implementation.
- Around line 43-67: resolveDcodeAutoApprovalRequest is silently inheriting the
recorded DCode auto-approval mode when requestedMode is missing because
resolveManagedSandboxFeature still receives registryValue from recordedMode.
Update this resolver so recorded state is only reused when the request
explicitly opted in, or thread the resume/rebuild provenance through the call
and treat null requestedMode as no opt-in. Add a test around
resolveDcodeAutoApprovalRequest covering requestedMode null with recordedMode
thread-opt-in to ensure it does not carry forward automatically.
In `@test/e2e/support/platform-parity-cloud-experimental.test.ts`:
- Around line 272-278: The test in platform-parity-cloud-experimental has
regressed from behavior verification to a syntax-only check. Keep the bash parse
check if useful, but also restore an assertion that exercises the actual
thread-auto-approval behavior in 12-deepagents-code-thread-auto-approval.sh,
such as validating the is_default_auto_approval_denial classification or
matching the expected spawnSync output/exit behavior. Use the existing
scriptPath and spawnSync-based flow to ensure the test still guards the
fail-closed logic instead of only confirming valid Bash syntax.
---
Outside diff comments:
In `@src/lib/onboard/dcode-auto-approval.test.ts`:
- Around line 4-15: Add unit coverage for resolveDcodeAutoApprovalRequest in
dcode-auto-approval.test.ts, since it is currently not imported or exercised.
Write a test for the resume/rebuild case where requestedMode is omitted or
undefined and recordedMode is "thread-opt-in", and assert the function returns
"disabled" instead of persisting the recorded value. Use the existing
dcodeAutoApprovalModeOrDefault, normalizeDcodeAutoApprovalMode, and
resolveDcodeAutoApprovalRequest symbols to place the new assertions alongside
the other mode-resolution tests.
In `@src/lib/onboard/machine/handlers/sandbox.test.ts`:
- Around line 164-227: Add a regression test in sandbox.test around
handleSandboxState for the resume-without-explicit-flag case: resume an existing
session whose recorded DCode mode is "thread-opt-in" while
requestedDcodeAutoApprovalMode is omitted. Verify the resume path does not reuse
the recorded mode and that createSandbox is called with dcodeAutoApprovalMode
set to "disabled" (or otherwise confirms the sandbox is reset), using the
existing createSandbox, updateSession, and dcodeRegistryEntry helpers to locate
the behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1675f570-cec9-414a-8e5e-1c5c43c8ace4
📒 Files selected for processing (23)
agents/langchain-deepagents-code/patch-managed-deepagents-code.pydocs/about/release-notes.mdxdocs/get-started/quickstart-langchain-deepagents-code.mdxdocs/inference/model-capability-audit.mdxdocs/reference/commands.mdxdocs/security/best-practices.mdxsrc/lib/actions/sandbox/rebuild-dcode-preflight.test.tssrc/lib/actions/sandbox/rebuild-durable-config.test.tssrc/lib/actions/sandbox/rebuild-durable-config.tssrc/lib/actions/sandbox/rebuild-recreate-phase.tssrc/lib/onboard.tssrc/lib/onboard/dcode-auto-approval.test.tssrc/lib/onboard/dcode-auto-approval.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/runtime-control-flow.test.tssrc/lib/onboard/runtime-control-flow.tssrc/lib/onboard/sandbox-registration.test.tssrc/lib/onboard/sandbox-registration.tssrc/lib/onboard/types.tssrc/lib/state/registry.tstest/e2e/e2e-cloud-experimental/checks/12-deepagents-code-thread-auto-approval.shtest/e2e/support/platform-parity-cloud-experimental.test.ts
💤 Files with no reviewable changes (3)
- src/lib/onboard/runtime-control-flow.test.ts
- src/lib/actions/sandbox/rebuild-dcode-preflight.test.ts
- src/lib/actions/sandbox/rebuild-recreate-phase.ts
✅ Files skipped from review due to trivial changes (2)
- docs/about/release-notes.mdx
- docs/inference/model-capability-audit.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
- src/lib/actions/sandbox/rebuild-durable-config.test.ts
- src/lib/onboard/sandbox-registration.ts
- docs/get-started/quickstart-langchain-deepagents-code.mdx
- src/lib/actions/sandbox/rebuild-durable-config.ts
- docs/security/best-practices.mdx
- test/e2e/e2e-cloud-experimental/checks/12-deepagents-code-thread-auto-approval.sh
- agents/langchain-deepagents-code/patch-managed-deepagents-code.py
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/lib/onboard/machine/handlers/sandbox.test.ts (1)
164-227: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winNew tests don't cover the resume-without-explicit-flag scenario.
All three new tests here set an explicit
requestedDcodeAutoApprovalMode("thread-opt-in") or leave both requested/recorded at defaults; none cover resuming with a previously recorded"thread-opt-in"whilerequestedDcodeAutoApprovalModeis omitted. See the related comment onsrc/lib/onboard/dcode-auto-approval.ts(Lines 43-67) for why this matters — the root-cause fix/verification belongs there, but adding a test here (assertingcreateSandboxreceivesdcodeAutoApprovalMode: "disabled"and/or that resume forces a reset) would close the coverage gap at this public boundary.🤖 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 `@src/lib/onboard/machine/handlers/sandbox.test.ts` around lines 164 - 227, Add a regression test in sandbox.test around handleSandboxState for the resume-without-explicit-flag case: resume an existing session whose recorded DCode mode is "thread-opt-in" while requestedDcodeAutoApprovalMode is omitted. Verify the resume path does not reuse the recorded mode and that createSandbox is called with dcodeAutoApprovalMode set to "disabled" (or otherwise confirms the sandbox is reset), using the existing createSandbox, updateSession, and dcodeRegistryEntry helpers to locate the behavior.Source: Path instructions
src/lib/onboard/dcode-auto-approval.test.ts (1)
4-15: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMissing unit coverage for
resolveDcodeAutoApprovalRequest, including the resume-without-flag persistence case.This file never imports or exercises
resolveDcodeAutoApprovalRequest— the function that actually gates whether a thread's auto-approval mode is honored. Given the module's other functions are thoroughly unit-tested here, this is a notable gap, especially for the scenario whererequestedModeisundefined/omitted butrecordedModeis"thread-opt-in"from a prior session (i.e., resume/rebuild without re-passing--dcode-auto-approval thread-opt-in). That is precisely the case the PR requirement "do not silently persist it across sessions or rebuilds" targets, and it remains unverified anywhere in this cohort (see related comment ondcode-auto-approval.tsLines 43-67).As per path instructions for
src/lib/{onboard.ts,onboard/**,...}, resume/repair paths must be proven idempotent and covered at the public boundary — add a test assertingresolveDcodeAutoApprovalRequestreturns"disabled"(not the recorded value) when no explicit request is supplied.Also applies to: 69-108
🤖 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 `@src/lib/onboard/dcode-auto-approval.test.ts` around lines 4 - 15, Add unit coverage for resolveDcodeAutoApprovalRequest in dcode-auto-approval.test.ts, since it is currently not imported or exercised. Write a test for the resume/rebuild case where requestedMode is omitted or undefined and recordedMode is "thread-opt-in", and assert the function returns "disabled" instead of persisting the recorded value. Use the existing dcodeAutoApprovalModeOrDefault, normalizeDcodeAutoApprovalMode, and resolveDcodeAutoApprovalRequest symbols to place the new assertions alongside the other mode-resolution tests.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/reference/commands.mdx`:
- Line 201: Update the `--resume` documentation in `commands.mdx` so it also
mentions the recorded DCode auto-approval mode alongside the provider, model,
sandbox name, agent, observability choice, and custom Dockerfile path. If the
intent is to avoid expanding the sentence, clarify that this setting is restored
from the saved registry entry; otherwise add it directly to the resumable
session state list in the `--resume` description.
In `@src/lib/onboard/dcode-auto-approval.ts`:
- Around line 105-132: `prepareDcodeAutoApprovalCreatePlan` should fail closed
if `deps.exitProcess(1)` does not actually terminate, because both validation
branches can otherwise fall through and return a plan from invalid state. After
each `exitProcess(1)` call in this function, add a defensive `throw` so behavior
matches the guarded pattern used in `failGatewayRouteCheck` and cannot continue
under a non-throwing `exitProcess` implementation.
- Around line 43-67: resolveDcodeAutoApprovalRequest is silently inheriting the
recorded DCode auto-approval mode when requestedMode is missing because
resolveManagedSandboxFeature still receives registryValue from recordedMode.
Update this resolver so recorded state is only reused when the request
explicitly opted in, or thread the resume/rebuild provenance through the call
and treat null requestedMode as no opt-in. Add a test around
resolveDcodeAutoApprovalRequest covering requestedMode null with recordedMode
thread-opt-in to ensure it does not carry forward automatically.
In `@test/e2e/support/platform-parity-cloud-experimental.test.ts`:
- Around line 272-278: The test in platform-parity-cloud-experimental has
regressed from behavior verification to a syntax-only check. Keep the bash parse
check if useful, but also restore an assertion that exercises the actual
thread-auto-approval behavior in 12-deepagents-code-thread-auto-approval.sh,
such as validating the is_default_auto_approval_denial classification or
matching the expected spawnSync output/exit behavior. Use the existing
scriptPath and spawnSync-based flow to ensure the test still guards the
fail-closed logic instead of only confirming valid Bash syntax.
---
Outside diff comments:
In `@src/lib/onboard/dcode-auto-approval.test.ts`:
- Around line 4-15: Add unit coverage for resolveDcodeAutoApprovalRequest in
dcode-auto-approval.test.ts, since it is currently not imported or exercised.
Write a test for the resume/rebuild case where requestedMode is omitted or
undefined and recordedMode is "thread-opt-in", and assert the function returns
"disabled" instead of persisting the recorded value. Use the existing
dcodeAutoApprovalModeOrDefault, normalizeDcodeAutoApprovalMode, and
resolveDcodeAutoApprovalRequest symbols to place the new assertions alongside
the other mode-resolution tests.
In `@src/lib/onboard/machine/handlers/sandbox.test.ts`:
- Around line 164-227: Add a regression test in sandbox.test around
handleSandboxState for the resume-without-explicit-flag case: resume an existing
session whose recorded DCode mode is "thread-opt-in" while
requestedDcodeAutoApprovalMode is omitted. Verify the resume path does not reuse
the recorded mode and that createSandbox is called with dcodeAutoApprovalMode
set to "disabled" (or otherwise confirms the sandbox is reset), using the
existing createSandbox, updateSession, and dcodeRegistryEntry helpers to locate
the behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1675f570-cec9-414a-8e5e-1c5c43c8ace4
📒 Files selected for processing (23)
agents/langchain-deepagents-code/patch-managed-deepagents-code.pydocs/about/release-notes.mdxdocs/get-started/quickstart-langchain-deepagents-code.mdxdocs/inference/model-capability-audit.mdxdocs/reference/commands.mdxdocs/security/best-practices.mdxsrc/lib/actions/sandbox/rebuild-dcode-preflight.test.tssrc/lib/actions/sandbox/rebuild-durable-config.test.tssrc/lib/actions/sandbox/rebuild-durable-config.tssrc/lib/actions/sandbox/rebuild-recreate-phase.tssrc/lib/onboard.tssrc/lib/onboard/dcode-auto-approval.test.tssrc/lib/onboard/dcode-auto-approval.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/runtime-control-flow.test.tssrc/lib/onboard/runtime-control-flow.tssrc/lib/onboard/sandbox-registration.test.tssrc/lib/onboard/sandbox-registration.tssrc/lib/onboard/types.tssrc/lib/state/registry.tstest/e2e/e2e-cloud-experimental/checks/12-deepagents-code-thread-auto-approval.shtest/e2e/support/platform-parity-cloud-experimental.test.ts
💤 Files with no reviewable changes (3)
- src/lib/onboard/runtime-control-flow.test.ts
- src/lib/actions/sandbox/rebuild-dcode-preflight.test.ts
- src/lib/actions/sandbox/rebuild-recreate-phase.ts
✅ Files skipped from review due to trivial changes (2)
- docs/about/release-notes.mdx
- docs/inference/model-capability-audit.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
- src/lib/actions/sandbox/rebuild-durable-config.test.ts
- src/lib/onboard/sandbox-registration.ts
- docs/get-started/quickstart-langchain-deepagents-code.mdx
- src/lib/actions/sandbox/rebuild-durable-config.ts
- docs/security/best-practices.mdx
- test/e2e/e2e-cloud-experimental/checks/12-deepagents-code-thread-auto-approval.sh
- agents/langchain-deepagents-code/patch-managed-deepagents-code.py
🛑 Comments failed to post (4)
docs/reference/commands.mdx (1)
201-201: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash # Description: Check whether onboarding session state persists dcodeAutoApprovalMode across resume. rg -nP -C3 'dcodeAutoApprovalMode' src/lib/onboard/runtime-control-flow.ts src/lib/onboard/types.ts src/lib/state 2>/dev/nullRepository: NVIDIA/NemoClaw
Length of output: 3758
🏁 Script executed:
#!/bin/bash set -euo pipefail # Inspect the relevant docs sections around the resume wording and the rebuild section. sed -n '180,220p' docs/reference/commands.mdx printf '\n----\n' sed -n '2280,2325p' docs/reference/commands.mdx printf '\n----\n' # Find every mention of the auto-approval mode in this doc. rg -n 'dcodeAutoApprovalMode|auto-approval|auto approval|--resume' docs/reference/commands.mdxRepository: NVIDIA/NemoClaw
Length of output: 10997
🏁 Script executed:
#!/bin/bash set -euo pipefail # Inspect the onboarding session/state flow for resume handling and persisted DCode auto-approval mode. sed -n '1,220p' src/lib/onboard/runtime-control-flow.ts printf '\n----\n' sed -n '1,220p' src/lib/onboard/types.ts printf '\n----\n' rg -n -C3 'requestedDcodeAutoApprovalMode|dcodeAutoApprovalMode|resume' src/lib/onboard src/lib/stateRepository: NVIDIA/NemoClaw
Length of output: 50372
🏁 Script executed:
#!/bin/bash set -euo pipefail # Read only the small relevant slices around the saved-session projection and resume handling. wc -l src/lib/onboard/runtime-control-flow.ts src/lib/onboard/types.ts src/lib/state/registry.ts src/lib/state/onboard-session.ts printf '\n---- runtime-control-flow ----\n' sed -n '1,140p' src/lib/onboard/runtime-control-flow.ts printf '\n---- onboard-session ----\n' sed -n '1,220p' src/lib/state/onboard-session.ts printf '\n---- registry ----\n' sed -n '90,140p' src/lib/state/registry.tsRepository: NVIDIA/NemoClaw
Length of output: 15532
🏁 Script executed:
#!/bin/bash set -euo pipefail # Find every persistence/read path for DCode auto-approval in the onboarding session and registry flow. rg -n -C3 'dcodeAutoApprovalMode|requestedDcodeAutoApprovalMode|auto-approval' src/lib/onboard src/lib/state docs/reference/commands.mdx printf '\n---- session write/read slices ----\n' sed -n '520,660p' src/lib/state/onboard-session.ts printf '\n---- registry write/read slices ----\n' sed -n '460,540p' src/lib/state/registry.ts printf '\n---- runtime control slices ----\n' sed -n '1,120p' src/lib/onboard/runtime-control-flow.tsRepository: NVIDIA/NemoClaw
Length of output: 50373
🏁 Script executed:
#!/bin/bash set -euo pipefail # Read the resume-related DCode auto-approval logic in the sandbox handler. sed -n '440,545p' src/lib/onboard/machine/handlers/sandbox.ts printf '\n----\n' sed -n '700,740p' src/lib/onboard/machine/handlers/sandbox.ts printf '\n----\n' rg -n 'dcodeAutoApprovalMode' src/lib/state/onboard-session.ts src/lib/onboard/machine/handlers/sandbox.tsRepository: NVIDIA/NemoClaw
Length of output: 7241
Add DCode auto-approval mode to the
--resumelist.
docs/reference/commands.mdx:201--resumealso preserves the recorded DCode auto-approval mode, so include it in the list or clarify that this state comes from the saved registry entry.🤖 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 `@docs/reference/commands.mdx` at line 201, Update the `--resume` documentation in `commands.mdx` so it also mentions the recorded DCode auto-approval mode alongside the provider, model, sandbox name, agent, observability choice, and custom Dockerfile path. If the intent is to avoid expanding the sentence, clarify that this setting is restored from the saved registry entry; otherwise add it directly to the resumable session state list in the `--resume` description.src/lib/onboard/dcode-auto-approval.ts (2)
43-67: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash # Locate resolveManagedSandboxFeature's implementation to confirm requested-absent fallback behavior. rg -nP --type=ts -C 20 'export function resolveManagedSandboxFeature'Repository: NVIDIA/NemoClaw
Length of output: 153
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '\n== locate symbols ==\n' rg -n "resolveManagedSandboxFeature|resolveDcodeAutoApprovalRequest|dcode-auto-approval.test|DCODE_AUTO_APPROVAL_FEATURE|DCODE_OBSERVABILITY_FEATURE" src test . printf '\n== file list ==\n' git ls-files 'src/lib/**' | rg 'sandbox|dcode|observ' printf '\n== inspect dcode auto approval ==\n' sed -n '1,220p' src/lib/onboard/dcode-auto-approval.ts printf '\n== inspect dcode auto approval tests ==\n' sed -n '1,260p' src/lib/onboard/dcode-auto-approval.test.ts printf '\n== inspect sandbox resolution implementation ==\n' sed -n '1,260p' src/lib/adapters/sandbox.ts printf '\n== inspect sandbox tests around resolution ==\n' sed -n '1,320p' src/lib/adapters/sandbox.test.tsRepository: NVIDIA/NemoClaw
Length of output: 40478
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '\n== managed-sandbox-feature implementation ==\n' sed -n '1,240p' src/lib/onboard/managed-sandbox-feature.ts printf '\n== managed-sandbox-feature tests ==\n' sed -n '1,220p' src/lib/onboard/managed-sandbox-feature.test.ts printf '\n== sandbox handler around observability and dcode resolution ==\n' sed -n '450,580p' src/lib/onboard/machine/handlers/sandbox.ts printf '\n== dcode resume bridge ==\n' sed -n '1,260p' src/lib/onboard/machine/handlers/sandbox-dcode-resume.ts printf '\n== sandbox resume tests referencing dcode ==\n' sed -n '1,260p' src/lib/onboard/machine/handlers/sandbox-resume.test.ts printf '\n== sandbox handler tests around dcode ==\n' sed -n '1,260p' src/lib/onboard/machine/handlers/sandbox.test.tsRepository: NVIDIA/NemoClaw
Length of output: 30922
🏁 Script executed:
#!/bin/bash set -euo pipefail printf '\n== dcode auto approval usages in tests ==\n' rg -n "requestedDcodeAutoApprovalMode|dcodeAutoApprovalMode|thread-opt-in|resolveDcodeAutoApprovalRequest|preserves recorded observability" src/lib/onboard -g '*test.ts' printf '\n== sandbox test continuation around observability and dcode ==\n' sed -n '260,420p' src/lib/onboard/machine/handlers/sandbox.test.ts printf '\n== sandbox handler dcode-specific section ==\n' sed -n '520,720p' src/lib/onboard/machine/handlers/sandbox.test.tsRepository: NVIDIA/NemoClaw
Length of output: 16461
Block silent inheritance of recorded DCode auto-approval
src/lib/onboard/dcode-auto-approval.ts:43-67resolveManagedSandboxFeaturefalls back toregistryValuewhenrequestedModeis absent, so a resume/rebuild can carrythread-opt-inforward from the prior registry row without a new opt-in flag. Threadresumeprovenance through this resolver or ignore the recorded mode unless the request was explicit. Add coverage forrequestedMode = nullwithrecordedMode = "thread-opt-in".🤖 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 `@src/lib/onboard/dcode-auto-approval.ts` around lines 43 - 67, resolveDcodeAutoApprovalRequest is silently inheriting the recorded DCode auto-approval mode when requestedMode is missing because resolveManagedSandboxFeature still receives registryValue from recordedMode. Update this resolver so recorded state is only reused when the request explicitly opted in, or thread the resume/rebuild provenance through the call and treat null requestedMode as no opt-in. Add a test around resolveDcodeAutoApprovalRequest covering requestedMode null with recordedMode thread-opt-in to ensure it does not carry forward automatically.Source: Path instructions
105-132: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Add a defensive
throwafterexitProcess(1)to guarantee fail-closed behavior.Both validation blocks call
deps.exitProcess(1)without following it with athrow/return, unlikesandbox.ts'sfailGatewayRouteCheck, which explicitly throws afterexitProcess(1)to guard against a non-throwingexitProcessimplementation. If a future caller supplies anexitProcessthat logs/records but doesn't actually halt (a real risk in this security-sensitive validation path), execution here falls through to compute and return a plan from orphaned/malformed state.🛡️ Proposed fix
if (input.liveExists && input.managedDcodeAgent && !input.registryEntry) { deps.error( ` Sandbox '${input.sandboxName}' is live but missing its NemoClaw registry record; refusing unverified DCode reuse or recreation.`, ); deps.error( " Choose a different sandbox name, or remove the orphan explicitly with OpenShell.", ); deps.exitProcess(1); + throw new Error("exitProcess returned while rejecting an orphaned sandbox"); } if (invalidRecordedDcodeAutoApprovalMode(input.registryEntry?.dcodeAutoApprovalMode)) { deps.error( " Recorded DCode auto-approval mode is invalid. Refusing to enable or reuse the sandbox; repair the recorded state to 'disabled' before retrying.", ); deps.exitProcess(1); + throw new Error("exitProcess returned while rejecting malformed recorded auto-approval state"); }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.export function prepareDcodeAutoApprovalCreatePlan( input: { sandboxName: string; liveExists: boolean; managedDcodeAgent: boolean; registryEntry: { dcodeAutoApprovalMode?: unknown } | null; requestedMode: unknown; }, deps: { error(message: string): void; exitProcess(code: number): never } = { error: console.error, exitProcess: (code) => process.exit(code), }, ): { mode: DcodeAutoApprovalMode; hasDrift: boolean; rebuildFlag: string } { if (input.liveExists && input.managedDcodeAgent && !input.registryEntry) { deps.error( ` Sandbox '${input.sandboxName}' is live but missing its NemoClaw registry record; refusing unverified DCode reuse or recreation.`, ); deps.error( " Choose a different sandbox name, or remove the orphan explicitly with OpenShell.", ); deps.exitProcess(1); throw new Error("exitProcess returned while rejecting an orphaned sandbox"); } if (invalidRecordedDcodeAutoApprovalMode(input.registryEntry?.dcodeAutoApprovalMode)) { deps.error( " Recorded DCode auto-approval mode is invalid. Refusing to enable or reuse the sandbox; repair the recorded state to 'disabled' before retrying.", ); deps.exitProcess(1); throw new Error("exitProcess returned while rejecting malformed recorded auto-approval state"); }🤖 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 `@src/lib/onboard/dcode-auto-approval.ts` around lines 105 - 132, `prepareDcodeAutoApprovalCreatePlan` should fail closed if `deps.exitProcess(1)` does not actually terminate, because both validation branches can otherwise fall through and return a plan from invalid state. After each `exitProcess(1)` call in this function, add a defensive `throw` so behavior matches the guarded pattern used in `failGatewayRouteCheck` and cannot continue under a non-throwing `exitProcess` implementation.test/e2e/support/platform-parity-cloud-experimental.test.ts (1)
272-278: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Test coverage regression: syntax-only check replaces behavioral assertions.
This test now only validates that the script parses (
bash -n), whereas the previous version asserted specific script content/patterns and exercised theis_default_auto_approval_denialclassification logic viaspawnSync. A syntax check cannot catch regressions in the actual fail-closed/thread-opt-in security logic (e.g., wrong capability file path, incorrect exit-code/output matching, or accidental removal of the denial check), which is the behavior this E2E check is meant to guard. This mirrors the "failing growth guardrails" concern already raised against this PR for the v0.0.78 release disposition.Consider restoring an assertion that exercises the classification helper (or another behavioral property of the script) in addition to the syntax check, rather than relying on syntax validity alone as proof of correctness.
As per path instructions for
test/**/*.test.{ts,js,mts,mjs,cts,cjs}: "Flag copied production algorithms, broad mocks that bypass the behavior under test, and conditionals that make a test pass without exercising its claim."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/e2e/support/platform-parity-cloud-experimental.test.ts` around lines 272 - 278, The test in platform-parity-cloud-experimental has regressed from behavior verification to a syntax-only check. Keep the bash parse check if useful, but also restore an assertion that exercises the actual thread-auto-approval behavior in 12-deepagents-code-thread-auto-approval.sh, such as validating the is_default_auto_approval_denial classification or matching the expected spawnSync output/exit behavior. Use the existing scriptPath and spawnSync-based flow to ensure the test still guards the fail-closed logic instead of only confirming valid Bash syntax.Source: Path instructions
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
|
Exact-head follow-up for Resolved in the current head:
Justified without another code change:
Still outstanding:
Local verification on the current change set includes 285 focused CLI/integration tests, 14 E2E-support tests, |
…ad-autorun # Conflicts: # src/lib/actions/sandbox/rebuild-preflight-phase.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/onboard/machine/handlers/sandbox-resume.ts (1)
235-261: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winKeep not-ready sandboxes on the repair path when DCode drift is present.
dcodeAutoApprovalChangedis checked before thesandboxReuseState === "not_ready"fallback, so a broken sandbox with invalid recorded DCode auto-approval can take the genericrecreatebranch and skiprepairRecordedSandbox(...). Gate that drift branch when the sandbox isn’t ready, or add a combined test fornot_ready+ DCode drift.🤖 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 `@src/lib/onboard/machine/handlers/sandbox-resume.ts` around lines 235 - 261, The resume decision flow in decideSandboxResume and compatibilityResumeDecision currently lets dcodeAutoApprovalChanged trigger a generic recreate before the sandboxReuseState === "not_ready" repair path. Update the branching so not-ready sandboxes with DCode drift still go through repair-and-recreate, either by gating the DCode drift check when sandboxReuseState is "not_ready" or by combining both conditions into a dedicated repair decision. Also add/adjust a test around repairRecordedSandbox to cover the not_ready + dcodeAutoApprovalChanged case.
🧹 Nitpick comments (1)
test/langchain-deepagents-code-managed-entrypoints.test.ts (1)
34-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSimplify to a plain conditional and avoid shadowing the
pathmodule.The
configuredContentsarray-of-zero-or-one plusforloop is a convoluted way to express "write the file only whencontentis provided". Additionally, the parameter namepathshadows the module-levelpathimport; if this helper later needspath.join, it would silently resolve to the string argument instead of the module.♻️ Proposed simplification
-function writeAutoApprovalCapability(path: string, content?: string): void { - const configuredContents = content === undefined ? [] : [content]; - for (const configuredContent of configuredContents) { - fs.writeFileSync(path, configuredContent, { mode: 0o444 }); - fs.chmodSync(path, 0o444); - } -} +function writeAutoApprovalCapability(filePath: string, content?: string): void { + if (content === undefined) return; + fs.writeFileSync(filePath, content, { mode: 0o444 }); + fs.chmodSync(filePath, 0o444); +}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/langchain-deepagents-code-managed-entrypoints.test.ts` around lines 34 - 40, In writeAutoApprovalCapability, replace the zero-or-one array and for-loop with a direct conditional that writes only when content is provided, and rename the path parameter to avoid shadowing the imported path module. Keep the existing fs.writeFileSync and fs.chmodSync behavior inside that conditional so the helper remains functionally identical while being simpler and safer 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.
Outside diff comments:
In `@src/lib/onboard/machine/handlers/sandbox-resume.ts`:
- Around line 235-261: The resume decision flow in decideSandboxResume and
compatibilityResumeDecision currently lets dcodeAutoApprovalChanged trigger a
generic recreate before the sandboxReuseState === "not_ready" repair path.
Update the branching so not-ready sandboxes with DCode drift still go through
repair-and-recreate, either by gating the DCode drift check when
sandboxReuseState is "not_ready" or by combining both conditions into a
dedicated repair decision. Also add/adjust a test around repairRecordedSandbox
to cover the not_ready + dcodeAutoApprovalChanged case.
---
Nitpick comments:
In `@test/langchain-deepagents-code-managed-entrypoints.test.ts`:
- Around line 34-40: In writeAutoApprovalCapability, replace the zero-or-one
array and for-loop with a direct conditional that writes only when content is
provided, and rename the path parameter to avoid shadowing the imported path
module. Keep the existing fs.writeFileSync and fs.chmodSync behavior inside that
conditional so the helper remains functionally identical while being simpler and
safer to extend.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 9666766d-47b3-460b-b5d7-bd5eb35b950c
📒 Files selected for processing (23)
agents/langchain-deepagents-code/dcode-wrapper.shagents/langchain-deepagents-code/managed-dcode-runtime.pyagents/langchain-deepagents-code/patch-managed-deepagents-code.pydocs/get-started/quickstart-langchain-deepagents-code.mdxdocs/reference/commands.mdxsrc/lib/actions/sandbox/rebuild-dcode-preflight.test.tssrc/lib/actions/sandbox/rebuild-durable-config.tssrc/lib/actions/sandbox/rebuild-gpu-opt-out.tssrc/lib/actions/sandbox/status-snapshot.tssrc/lib/onboard.tssrc/lib/onboard/dcode-auto-approval.test.tssrc/lib/onboard/dcode-auto-approval.tssrc/lib/onboard/dockerfile-patch-dcode-auto-approval.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-resume.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-resume.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/prepared-dcode-rebuild.tstest/helpers/langchain-deepagents-code-patch-fixture.tstest/langchain-deepagents-code-direct-module-patch.test.tstest/langchain-deepagents-code-image.test.tstest/langchain-deepagents-code-managed-entrypoints.test.ts
✅ Files skipped from review due to trivial changes (1)
- src/lib/onboard/dockerfile-patch-dcode-auto-approval.test.ts
🚧 Files skipped from review as they are similar to previous changes (14)
- test/langchain-deepagents-code-image.test.ts
- src/lib/actions/sandbox/status-snapshot.ts
- src/lib/actions/sandbox/rebuild-gpu-opt-out.ts
- src/lib/actions/sandbox/rebuild-durable-config.ts
- src/lib/onboard/dcode-auto-approval.test.ts
- test/helpers/langchain-deepagents-code-patch-fixture.ts
- src/lib/onboard/prepared-dcode-rebuild.ts
- agents/langchain-deepagents-code/dcode-wrapper.sh
- docs/reference/commands.mdx
- agents/langchain-deepagents-code/managed-dcode-runtime.py
- agents/langchain-deepagents-code/patch-managed-deepagents-code.py
- test/langchain-deepagents-code-direct-module-patch.test.ts
- docs/get-started/quickstart-langchain-deepagents-code.mdx
- src/lib/onboard/dcode-auto-approval.ts
…ad-autorun # Conflicts: # src/lib/actions/sandbox/status-snapshot.ts # src/lib/actions/sandbox/status-text.ts
E2E Target Results — ✅ All requested jobs passedRun: 28975917298
|
E2E Target Results — ✅ All requested jobs passedRun: 28975917250
|
E2E Target Results —
|
| Job | Result |
|---|---|
| live |
|
Maintainer follow-up at exact head The concrete human security request is addressed:
The complete acceptance/evidence set is still not finished:
Bottom line: review-cleared for the reported fail-open bug, but not yet complete for the full #6478 acceptance claim or exact-head release evidence. |
Signed-off-by: cjagwani <cjagwani@nvidia.com>
E2E Target Results — ❌ Some jobs failedRun: 28976266793
|
Signed-off-by: cjagwani <cjagwani@nvidia.com>
E2E Target Results — ✅ All requested jobs passedRun: 28976984496
|
E2E Target Results — ✅ All requested jobs passedRun: 28976984584
|
E2E Target Results — ❌ Some jobs failedRun: 28976984424
|
<!-- markdownlint-disable MD041 --> ## Summary Prepares the user documentation for NemoClaw v0.0.78 by replacing the unreleased section with release highlights and synchronizing the affected inference, lifecycle, messaging, and CLI reference pages with merged behavior. ## Changes - Publish the v0.0.78 release-notes section with links to the most specific user guides for each shipped behavior. - Document authoritative Deep Agents route health, Nemotron Ultra profile behavior, and Hermes compatible-endpoint context metadata. - Document forced rebuild recovery after total backup failure and the ownership-safe tunnel/full-stop behavior. - Keep command examples and shared agent variants aligned with the current OpenClaw, Hermes, and Deep Agents interfaces. Source mapping: - [#3787](#3787) -> `docs/about/release-notes.mdx`: Record reliable workspace template seeding during sandbox startup. - [#4960](#4960) -> `docs/about/release-notes.mdx`: Record safer detection of rewritten OpenClaw gateway processes. - [#5676](#5676) -> `docs/about/release-notes.mdx`: Record warning-tolerant agent-list JSON handling. - [#5857](#5857) -> `docs/about/release-notes.mdx`: Record synchronization of explicit OpenClaw main-agent model state. - [#5929](#5929) -> `docs/about/release-notes.mdx`: Record copyable SSH port-forward guidance for remote dashboards. - [#6068](#6068) -> `docs/about/release-notes.mdx`: Record custom-image plugin provenance reconciliation. - [#6116](#6116) -> `docs/about/release-notes.mdx`: Record live-loopback dashboard-forward recovery. - [#6122](#6122) -> `docs/about/release-notes.mdx`: Announce validated, round-trippable policy YAML output. - [#6211](#6211) -> `docs/manage-sandboxes/lifecycle.mdx`, `docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Explain the explicit no-backup `rebuild --force` recovery boundary. - [#6283](#6283) -> `docs/about/release-notes.mdx`: Record Hermes WebUI port alignment. - [#6293](#6293) -> `docs/inference/switch-inference-providers.mdx`, `docs/about/release-notes.mdx`: Document compatible-endpoint context-length probing for Hermes. - [#6320](#6320) -> `docs/about/release-notes.mdx`: Record bounded gateway-recovery waits. - [#6377](#6377) -> `docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Explain rebuild diagnostics and prepared MCP-destroy recovery. - [#6412](#6412) -> `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/about/release-notes.mdx`: Document authoritative agent-visible inference route health. - [#6421](#6421) -> `docs/about/release-notes.mdx`: Record the longer quiet-pull window for managed vLLM images. - [#6431](#6431) -> `docs/inference/model-capability-audit.mdx`, `docs/about/release-notes.mdx`: Document the version-pinned Nemotron Ultra profile plugin. - [#6439](#6439) -> `docs/about/release-notes.mdx`: Summarize the authenticated, pinned credential-capture helper boundary. - [#6450](#6450) -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document host-forward cleanup and ownership-safe gateway-port release. - [#6474](#6474) -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/about/release-notes.mdx`: Record composable OpenClaw messaging runtime loaders. - [#6475](#6475) -> `docs/about/release-notes.mdx`: Record removal of the unavailable Kimi K2.6 production endpoint option. - [#6480](#6480) -> `docs/about/release-notes.mdx`: Record stderr routing for the plugin registration banner. - [#6481](#6481) -> `docs/about/release-notes.mdx`: Record post-pull Ollama model discovery checks. - [#6482](#6482) -> `docs/about/release-notes.mdx`: Record Ollama model warm-up after daemon restart. - [#6486](#6486) -> `docs/about/release-notes.mdx`: Publish the opt-in, thread-scoped Deep Agents auto-approval boundary. - [#6490](#6490) -> `docs/about/release-notes.mdx`: Record diagnostics for custom images missing the managed runtime. - [#6494](#6494) -> `docs/inference/model-capability-audit.mdx`, `docs/about/release-notes.mdx`: Document nonempty tool-call content preservation and placeholder rejection. - [#6497](#6497) -> `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/about/release-notes.mdx`: Document isolated Deep Agents route-probe output. - [#6506](#6506) -> `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/about/release-notes.mdx`: Document observability-preserving managed route probes. - [#6508](#6508) -> `docs/about/release-notes.mdx`: Link the new extension taxonomy and SDK-readiness reference from the release summary. Release-source verification: GitHub reports all 29 cited source PRs as merged with base `main`, and every merge commit is an ancestor of `origin/main` at `17bf9a6a9688b3b1d69cf4b37d3f23110acb055e`. No source-mapping mismatches were found. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Documentation-only release-prep changes; `npm run docs` validates variants, routes, and Fern content. - [x] 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: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: Tests are not applicable to this documentation-only change set. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [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) — exited 0 with zero errors; Fern reported the existing unauthenticated redirect-check and light-mode contrast 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) --- <!-- 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: Charan Jagwani <cjagwani@nvidia.com> --------- Signed-off-by: cjagwani <cjagwani@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR adds an explicit, default-disabled `thread-opt-in` auto-approval capability for managed LangChain Deep Agents Code sandboxes. Operators inspect it through status and change it transactionally for a named sandbox through rebuild, while each DCode thread must still opt in and NemoClaw's existing sandbox security boundaries remain enforced. ## Related Issue Partially addresses NVIDIA#6478. This PR intentionally does not close the issue because Brev launchable embedded-terminal validation remains outstanding; see Verification for the explicit acceptance gap. ## Changes - Add the named `rebuild --dcode-auto-approval <disabled|thread-opt-in>` control, durable registry state, status output, prepared-image verification, and fail-closed validation. - Bake a root-owned capability file into managed DCode images, reject ambient or malformed overrides, gate `-y`/`--auto-approve`, and reset active approval across thread and agent transitions. - Add focused CLI and runtime coverage, a live cloud E2E check for enable, per-thread reset, policy boundaries, and disable rollback, plus user/security/reference documentation. ## 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 exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [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: independent read-only adversarial review covered runtime fail-closed behavior, rebuild preflight, prepared-image handoff, mutation ordering, and scope reduction; all concrete findings were addressed with regression tests. - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 285 focused DCode CLI/integration tests, 14 E2E-support tests, and `npm run check:diff` passed - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — `npm test`: 1,280 files and 14,344 tests passed; seven unrelated permission-mode failures passed when rerun under the expected `umask 0022`; one unchanged gateway process-identity test remains locally failing - [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) — passed with 0 errors and 2 pre-existing Fern 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) The issue's Brev launchable embedded-terminal acceptance run remains outstanding; the PR includes the reusable live DCode check but does not claim that external manual evidence. --- <!-- 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: Julie Yaunches <jyaunches@nvidia.com> --------- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Signed-off-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary Prepares the user documentation for NemoClaw v0.0.78 by replacing the unreleased section with release highlights and synchronizing the affected inference, lifecycle, messaging, and CLI reference pages with merged behavior. ## Changes - Publish the v0.0.78 release-notes section with links to the most specific user guides for each shipped behavior. - Document authoritative Deep Agents route health, Nemotron Ultra profile behavior, and Hermes compatible-endpoint context metadata. - Document forced rebuild recovery after total backup failure and the ownership-safe tunnel/full-stop behavior. - Keep command examples and shared agent variants aligned with the current OpenClaw, Hermes, and Deep Agents interfaces. Source mapping: - [NVIDIA#3787](NVIDIA#3787) -> `docs/about/release-notes.mdx`: Record reliable workspace template seeding during sandbox startup. - [NVIDIA#4960](NVIDIA#4960) -> `docs/about/release-notes.mdx`: Record safer detection of rewritten OpenClaw gateway processes. - [NVIDIA#5676](NVIDIA#5676) -> `docs/about/release-notes.mdx`: Record warning-tolerant agent-list JSON handling. - [NVIDIA#5857](NVIDIA#5857) -> `docs/about/release-notes.mdx`: Record synchronization of explicit OpenClaw main-agent model state. - [NVIDIA#5929](NVIDIA#5929) -> `docs/about/release-notes.mdx`: Record copyable SSH port-forward guidance for remote dashboards. - [NVIDIA#6068](NVIDIA#6068) -> `docs/about/release-notes.mdx`: Record custom-image plugin provenance reconciliation. - [NVIDIA#6116](NVIDIA#6116) -> `docs/about/release-notes.mdx`: Record live-loopback dashboard-forward recovery. - [NVIDIA#6122](NVIDIA#6122) -> `docs/about/release-notes.mdx`: Announce validated, round-trippable policy YAML output. - [NVIDIA#6211](NVIDIA#6211) -> `docs/manage-sandboxes/lifecycle.mdx`, `docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Explain the explicit no-backup `rebuild --force` recovery boundary. - [NVIDIA#6283](NVIDIA#6283) -> `docs/about/release-notes.mdx`: Record Hermes WebUI port alignment. - [NVIDIA#6293](NVIDIA#6293) -> `docs/inference/switch-inference-providers.mdx`, `docs/about/release-notes.mdx`: Document compatible-endpoint context-length probing for Hermes. - [NVIDIA#6320](NVIDIA#6320) -> `docs/about/release-notes.mdx`: Record bounded gateway-recovery waits. - [NVIDIA#6377](NVIDIA#6377) -> `docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Explain rebuild diagnostics and prepared MCP-destroy recovery. - [NVIDIA#6412](NVIDIA#6412) -> `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/about/release-notes.mdx`: Document authoritative agent-visible inference route health. - [NVIDIA#6421](NVIDIA#6421) -> `docs/about/release-notes.mdx`: Record the longer quiet-pull window for managed vLLM images. - [NVIDIA#6431](NVIDIA#6431) -> `docs/inference/model-capability-audit.mdx`, `docs/about/release-notes.mdx`: Document the version-pinned Nemotron Ultra profile plugin. - [NVIDIA#6439](NVIDIA#6439) -> `docs/about/release-notes.mdx`: Summarize the authenticated, pinned credential-capture helper boundary. - [NVIDIA#6450](NVIDIA#6450) -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document host-forward cleanup and ownership-safe gateway-port release. - [NVIDIA#6474](NVIDIA#6474) -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/about/release-notes.mdx`: Record composable OpenClaw messaging runtime loaders. - [NVIDIA#6475](NVIDIA#6475) -> `docs/about/release-notes.mdx`: Record removal of the unavailable Kimi K2.6 production endpoint option. - [NVIDIA#6480](NVIDIA#6480) -> `docs/about/release-notes.mdx`: Record stderr routing for the plugin registration banner. - [NVIDIA#6481](NVIDIA#6481) -> `docs/about/release-notes.mdx`: Record post-pull Ollama model discovery checks. - [NVIDIA#6482](NVIDIA#6482) -> `docs/about/release-notes.mdx`: Record Ollama model warm-up after daemon restart. - [NVIDIA#6486](NVIDIA#6486) -> `docs/about/release-notes.mdx`: Publish the opt-in, thread-scoped Deep Agents auto-approval boundary. - [NVIDIA#6490](NVIDIA#6490) -> `docs/about/release-notes.mdx`: Record diagnostics for custom images missing the managed runtime. - [NVIDIA#6494](NVIDIA#6494) -> `docs/inference/model-capability-audit.mdx`, `docs/about/release-notes.mdx`: Document nonempty tool-call content preservation and placeholder rejection. - [NVIDIA#6497](NVIDIA#6497) -> `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/about/release-notes.mdx`: Document isolated Deep Agents route-probe output. - [NVIDIA#6506](NVIDIA#6506) -> `docs/get-started/quickstart-langchain-deepagents-code.mdx`, `docs/about/release-notes.mdx`: Document observability-preserving managed route probes. - [NVIDIA#6508](NVIDIA#6508) -> `docs/about/release-notes.mdx`: Link the new extension taxonomy and SDK-readiness reference from the release summary. Release-source verification: GitHub reports all 29 cited source PRs as merged with base `main`, and every merge commit is an ancestor of `origin/main` at `17bf9a6a9688b3b1d69cf4b37d3f23110acb055e`. No source-mapping mismatches were found. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: Documentation-only release-prep changes; `npm run docs` validates variants, routes, and Fern content. - [x] 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: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: Tests are not applicable to this documentation-only change set. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [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) — exited 0 with zero errors; Fern reported the existing unauthenticated redirect-check and light-mode contrast 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) --- <!-- 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: Charan Jagwani <cjagwani@nvidia.com> --------- Signed-off-by: cjagwani <cjagwani@nvidia.com>
Summary
This PR adds an explicit, default-disabled
thread-opt-inauto-approval capability for managed LangChain Deep Agents Code sandboxes. Operators inspect it through status and change it transactionally for a named sandbox through rebuild, while each DCode thread must still opt in and NemoClaw's existing sandbox security boundaries remain enforced.Related Issue
Partially addresses #6478. This PR intentionally does not close the issue because Brev launchable embedded-terminal validation remains outstanding; see Verification for the explicit acceptance gap.
Changes
rebuild --dcode-auto-approval <disabled|thread-opt-in>control, durable registry state, status output, prepared-image verification, and fail-closed validation.-y/--auto-approve, and reset active approval across thread and agent transitions.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpm run check:diffpassednpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes —npm test: 1,280 files and 14,344 tests passed; seven unrelated permission-mode failures passed when rerun under the expectedumask 0022; one unchanged gateway process-identity test remains locally failingnpm run docsbuilds without warnings (doc changes only) — passed with 0 errors and 2 pre-existing Fern warningsThe issue's Brev launchable embedded-terminal acceptance run remains outstanding; the PR includes the reusable live DCode check but does not claim that external manual evidence.
Signed-off-by: Julie Yaunches jyaunches@nvidia.com
Summary by CodeRabbit
New Features
--dcode-auto-approval <disabled|thread-opt-in>.--json).Bug Fixes
/clear//force-clear, thread switches/resumes, and agent switches.NEMOCLAW_DCODE_AUTO_APPROVAL*values are ignored at runtime.Documentation