Skip to content

fix(sandbox): harden route probe - #6637

Merged
jyaunches merged 4 commits into
mainfrom
fix/nvbug-6438202-dcode-route-probe
Jul 10, 2026
Merged

fix(sandbox): harden route probe#6637
jyaunches merged 4 commits into
mainfrom
fix/nvbug-6438202-dcode-route-probe

Conversation

@sandl99

@sandl99 sandl99 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

See NVBug 6438202.

Related Issue

NVBug 6438202

Changes

  • See NVBug 6438202.

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: NVBug 6438202 tracks internal security review; public details intentionally withheld.
  • 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
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: targeted CLI tests passed locally; details withheld, see NVBug 6438202.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: San Dang sdang@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved sandbox connectivity checks to reject untrusted probe results, including unexpected startup errors.
    • Added clear failure handling and rebuild guidance when required sandbox helpers are missing.
    • Improved route health reporting for affected Deep Agents sandboxes.
  • Documentation

    • Added troubleshooting guidance for missing sandbox route-probe helpers, including rebuild and verification steps.

@sandl99 sandl99 self-assigned this Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

DCode sandbox route probes now run through a managed launcher with controlled startup environments, preserve stderr for classification, and identify missing helpers. Health and connection flows fail closed with rebuild guidance, supported by expanded tests and troubleshooting documentation.

Changes

DCode route probing

Layer / File(s) Summary
Managed probe execution and result classification
src/lib/actions/sandbox/connect-inference-route-probe.ts, src/lib/actions/sandbox/connect-inference-route-probe.test.ts, test/support/connect-flow-test-harness.ts
DCode probes use the managed launcher with explicit environment settings; stderr takes precedence during parsing, and missing-helper details receive dedicated classification and test coverage.
Inference health compatibility boundary
src/lib/actions/sandbox/inference-route-health.ts, src/lib/actions/sandbox/inference-route-health.test.ts, src/lib/actions/sandbox/connect.ts
Health and connection probes request stream capture and convert recognized missing-helper results into unhealthy route status.
Connection failure handling and remediation
src/lib/actions/sandbox/connect-flow.test.ts, src/lib/actions/sandbox/connect-flow-dcode-probe-preamble.test.ts, docs/reference/troubleshooting.mdx
Connection tests cover missing helpers and startup-file stderr, while troubleshooting documents rebuilding the sandbox and retrying status checks.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ConnectSandbox
  participant OpenShell
  participant RouteProbe as parseSandboxInferenceRouteProbeResult
  participant RouteHealth as probeSandboxInferenceGatewayHealth
  ConnectSandbox->>OpenShell: run inference.local probe with streams
  OpenShell-->>RouteProbe: return status, output, and stderr
  RouteProbe-->>RouteHealth: return route classification
  RouteHealth-->>ConnectSandbox: return healthy or structured unhealthy result
  ConnectSandbox-->>ConnectSandbox: fail closed for untrusted or missing-helper evidence
Loading

Possibly related PRs

  • NVIDIA/NemoClaw#5478: Updates related connectSandbox tests involving OpenShell/spawn behavior and process exit handling.

Suggested labels: security, bug-fix

Suggested reviewers: ericksoa, cv, kjw3

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 is concise and accurately summarizes the main sandbox route-probe hardening changes.
✨ 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/nvbug-6438202-dcode-route-probe

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the fix/nvbug-6438202-dc... branch remains at 77%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main 9dec1fb fix/nvbug-6438202-dc... 9c1a9ed +/-
src/lib/runner.ts 83% 80% -3%
src/lib/adapters/http/probe.ts 91% 89% -2%
src/lib/security/redact.ts 98% 96% -2%
src/lib/adapter...tp/curl-args.ts 99% 97% -2%
src/lib/actions...dbox/connect.ts 74% 75% +1%
src/lib/actions...-monkeypatch.ts 72% 76% +4%
src/lib/state/config-io.ts 88% 93% +5%
src/lib/agent/b...availability.ts 63% 74% +11%
src/lib/actions...onnect-probe.ts 46% 69% +23%
src/lib/sandbox...rsion-scheme.ts 73% 100% +27%

Updated July 10, 2026 13:07 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: inference-routing, network-policy, onboard-repair, onboard-resume
Optional E2E: cloud-onboard

Dispatch hint: inference-routing,network-policy,onboard-repair,onboard-resume

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • inference-routing: Required by the deterministic risk plan for inference-policy changes. The PR changes the live route probe used to verify the selected provider is reachable through inference.local from inside the sandbox.
  • network-policy: Required by the deterministic risk plan for inference-policy changes. The updated probe and health logic must still agree with real sandbox egress policy: intended inference traffic should be allowed and unintended egress denied.
  • onboard-repair: Required by the deterministic risk plan for lifecycle-state changes. The PR changes how broken versus unavailable inference routes are classified, which directly affects whether repair is attempted and whether recovery converges.
  • onboard-resume: Required by the deterministic risk plan for lifecycle-state changes. Connect/readiness and route-health behavior must still converge correctly after interrupted onboarding or persisted sandbox metadata is resumed.

Optional E2E

  • cloud-onboard: Useful adjacent confidence for the hosted Deep Agents onboarding/user flow because this PR changes DCode route probing and troubleshooting behavior used after sandbox creation. Not required by the deterministic floor because the touched files are connect/health probe paths rather than hosted onboarding state-machine code.

New E2E recommendations

  • security-boundary (medium): Existing live jobs validate normal inference routing and policy, but the specific version-skew case where a live Deep Agents sandbox lacks /usr/local/lib/nemoclaw/dcode-managed-exec appears covered only by unit tests and documentation in this PR.
    • Suggested test: Add a live compatibility/fail-closed scenario that runs status/connect/doctor against a Deep Agents sandbox or fixture image without the trusted dcode-managed-exec helper and asserts rebuild guidance without attempting route repair or interactive connect.

Dispatch hint

  • Workflow: .github/workflows/e2e.yaml
  • jobs input: inference-routing,network-policy,onboard-repair,onboard-resume

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

E2E Target Recommendation

Required E2E targets: inference-routing, network-policy, onboard-repair, onboard-resume
Optional E2E targets: None

Dispatch required E2E targets:

  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=inference-routing
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=network-policy
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=onboard-repair
  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=onboard-resume

Workflow run

Full E2E target advisor summary

E2E Target Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E targets

  • inference-routing: Inference selection, reachability, and network policy must agree at the real host-to-sandbox boundary.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=inference-routing
  • network-policy: Inference selection, reachability, and network policy must agree at the real host-to-sandbox boundary.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=network-policy
  • onboard-repair: Onboarding and sandbox state must converge across persisted metadata, reported status, and the live runtime.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=onboard-repair
  • onboard-resume: Onboarding and sandbox state must converge across persisted metadata, reported status, and the live runtime.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=onboard-resume

Optional E2E targets

  • None.

Relevant changed files

  • src/lib/actions/sandbox/connect-flow-dcode-probe-preamble.test.ts
  • src/lib/actions/sandbox/connect-flow.test.ts
  • src/lib/actions/sandbox/connect-inference-route-probe.test.ts
  • src/lib/actions/sandbox/connect-inference-route-probe.ts
  • src/lib/actions/sandbox/connect.ts
  • src/lib/actions/sandbox/inference-route-health.test.ts
  • src/lib/actions/sandbox/inference-route-health.ts
  • test/support/connect-flow-test-harness.ts

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Fix PRA-6: Unmet acceptance: required E2E jobs not executed per risk plan; then add or justify PRA-T1.
Open items: 1 required · 5 warnings · 0 suggestions · 8 test follow-ups
Since last review: 0 prior items resolved · 1 still applies · 5 new items found

Action checklist

  • PRA-6 Fix: Unmet acceptance: required E2E jobs not executed per risk plan in src/lib/actions/sandbox/connect-inference-route-probe.ts:1
  • PRA-1 Resolve or justify: connect.ts monolith continues growing without extraction review in src/lib/actions/sandbox/connect.ts:1182
  • PRA-2 Resolve or justify: connect-flow.test.ts test monolith growing alongside implementation in src/lib/actions/sandbox/connect-flow.test.ts:522
  • PRA-3 Resolve or justify: Probe health authority state transition: missing DCode helper now returns failed boundary instead of unavailable in src/lib/actions/sandbox/inference-route-health.ts:79
  • PRA-4 Resolve or justify: New stderr fail-closed trust boundary: any stderr from probe exec causes immediate fail-closed in src/lib/actions/sandbox/connect-inference-route-probe.ts:96
  • PRA-5 Resolve or justify: Documentation gap: no migration path for existing sandboxes lacking DCode helper in docs/reference/troubleshooting.mdx:1070
  • 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: Acceptance clause
  • PRA-T6 Add or justify test follow-up: Acceptance clause
  • PRA-T7 Add or justify test follow-up: Acceptance clause
  • PRA-T8 Add or justify test follow-up: Acceptance clause

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture src/lib/actions/sandbox/connect.ts:1182 Extract gateway lifecycle checks, inference route probing, DNS/proxy repair, and process recovery into separate modules. At minimum, document why extraction is deferred in this PR.
PRA-2 Resolve/justify architecture src/lib/actions/sandbox/connect-flow.test.ts:522 Split test file by concern: connect flow core, DCode probe preamble, gateway repair, terminal agents, error paths. Or justify why unified harness is necessary.
PRA-3 Resolve/justify correctness src/lib/actions/sandbox/inference-route-health.ts:79 Verify all callers (connect.ts, status command, doctor command) correctly handle the new failed-boundary return value. Document the state transition in migration notes or release notes.
PRA-4 Resolve/justify correctness src/lib/actions/sandbox/connect-inference-route-probe.ts:96 Verify no legitimate stderr paths exist in production probe execution. Consider allowlist for known-benign stderr patterns if any surface in E2E testing.
PRA-5 Resolve/justify docs docs/reference/troubleshooting.mdx:1070 Add migration guidance: workspace preservation steps before rebuild, what state survives rebuild (workspace, agent config), and when to use destroy+onboard vs rebuild.
PRA-6 Required acceptance src/lib/actions/sandbox/connect-inference-route-probe.ts:1 Run required E2E jobs before merge, or explicitly justify why each is deferred with linked follow-up issue. At minimum, inference-routing and network-policy must pass for inference-policy invariants.

🚨 Required before merge

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

PRA-6 Required — Unmet acceptance: required E2E jobs not executed per risk plan

  • Location: src/lib/actions/sandbox/connect-inference-route-probe.ts:1
  • Category: acceptance
  • Problem: Risk plan v1 (head 9c1a9ed) requires 4 tier-2 E2E jobs: inference-routing, network-policy, onboard-repair, onboard-resume for lifecycle-state and inference-policy invariants. PR quality gates show only 'targeted CLI tests passed locally' — npm test and npm run check unchecked. Prior advisor review (PRA-T1 through PRA-T4) explicitly requested runtime validation via these E2E jobs as test follow-ups.
  • Impact: Deterministic regression risks for lifecycle-state (partial failure/retry convergence, status agreement, cleanup preservation) and inference-policy (provider reachability, real-request health, network policy agreement) are not validated against real host-to-sandbox boundary. Unit/mock coverage (29 test blocks) comprehensive but cannot validate real network policy, DNS, TLS, proxy, and gateway interactions.
  • Required action: Run required E2E jobs before merge, or explicitly justify why each is deferred with linked follow-up issue. At minimum, inference-routing and network-policy must pass for inference-policy invariants.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check GitHub Actions for this PR: look for inference-routing, network-policy, onboard-repair, onboard-resume job runs. Verify they pass or have documented deferral.
  • Missing regression test: The 4 required E2E jobs themselves are the regression tests for the risk plan invariants. They must execute and pass.
  • Done when: The required change is committed and verification passes: Check GitHub Actions for this PR: look for inference-routing, network-policy, onboard-repair, onboard-resume job runs. Verify they pass or have documented deferral.
  • Evidence: riskPlan.requiredJobs: inference-routing, network-policy, onboard-repair, onboard-resume all tier 2 PR quality gates: npm test and npm run check unchecked, only targeted CLI tests passed locally Prior advisor review PRA-T1 through PRA-T4 all request these E2E jobs
Review findings by urgency: 1 required fix, 5 items to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

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

PRA-1 Resolve/justify — connect.ts monolith continues growing without extraction review

  • Location: src/lib/actions/sandbox/connect.ts:1182
  • Category: architecture
  • Problem: connect.ts has grown from 1181 to 1182 lines (+1) in this PR, continuing a pattern of monolith growth (22 recent commits in 3 months). The risk context flags this with severity 'warning' and rationale 'review whether extraction is feasible.'
  • Impact: Increasing cognitive load, harder to test in isolation, higher risk of regressions in sandbox connect flow which handles gateway routing, DCode probes, recovery, onboarding, and credential boundaries.
  • Recommended action: Extract gateway lifecycle checks, inference route probing, DNS/proxy repair, and process recovery into separate modules. At minimum, document why extraction is deferred in this PR.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check git history: `git log --oneline -20 -- src/lib/actions/sandbox/connect.ts` shows 22 commits since May 2026. File length: `wc -l src/lib/actions/sandbox/connect.ts`.
  • Missing regression test: No test enforces max file size or module extraction; consider adding a lint rule or CI check for files >1000 lines.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check git history: `git log --oneline -20 -- src/lib/actions/sandbox/connect.ts` shows 22 commits since May 2026. File length: `wc -l src/lib/actions/sandbox/connect.ts`.
  • Evidence: riskPlan.monolithDeltas[1]: connect.ts delta +1, severity warning driftEvidence for connect.ts shows 22 recent commits

PRA-2 Resolve/justify — connect-flow.test.ts test monolith growing alongside implementation

  • Location: src/lib/actions/sandbox/connect-flow.test.ts:522
  • Category: architecture
  • Problem: connect-flow.test.ts grew from 515 to 522 lines (+7) in this PR. The risk context flags this with severity 'warning' and rationale 'review whether extraction is feasible.' Test monolith growth parallels implementation monolith growth.
  • Impact: Test maintenance burden increases; harder to isolate test failures; shared harness mutations risk cross-test contamination; new DCode probe tests add to existing sprawling test file.
  • Recommended action: Split test file by concern: connect flow core, DCode probe preamble, gateway repair, terminal agents, error paths. Or justify why unified harness is necessary.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: File length: `wc -l src/lib/actions/sandbox/connect-flow.test.ts`. Recent commits: `git log --oneline -10 -- src/lib/actions/sandbox/connect-flow.test.ts` shows 12 commits since March 2026.
  • Missing regression test: No test structure governance; consider adding test file size check or module-split CI gate.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: File length: `wc -l src/lib/actions/sandbox/connect-flow.test.ts`. Recent commits: `git log --oneline -10 -- src/lib/actions/sandbox/connect-flow.test.ts` shows 12 commits since March 2026.
  • Evidence: riskPlan.monolithDeltas[0]: connect-flow.test.ts delta +7, severity warning driftEvidence for connect-flow.test.ts shows 12 recent commits

PRA-3 Resolve/justify — Probe health authority state transition: missing DCode helper now returns failed boundary instead of unavailable

  • Location: src/lib/actions/sandbox/inference-route-health.ts:79
  • Category: correctness
  • Problem: inference-route-health.ts:79-86 now returns {ok:false, httpStatus:0, detail:DCODE_MANAGED_EXEC_MISSING_DETAIL} for missing DCode helper instead of null (probe unavailable). This shifts missing-helper from 'retryable/unavailable' to 'definitively failed compatibility boundary' — callers (connect, status, doctor) must treat this as actionable failure requiring rebuild, not transient unavailability. Test at inference-route-health.test.ts:99 confirms new contract.
  • Impact: Breaking change for callers: connect, status, and doctor commands will now fail closed with rebuild guidance instead of retrying or treating as transient. Existing sandboxes without the helper (older images) will fail all three commands until rebuilt.
  • Recommended action: Verify all callers (connect.ts, status command, doctor command) correctly handle the new failed-boundary return value. Document the state transition in migration notes or release notes.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check callers of probeSandboxInferenceGatewayHealth: grep -r 'probeSandboxInferenceGatewayHealth' --include='*.ts'. Verify they handle ok:false with detail=DCODE_MANAGED_EXEC_MISSING_DETAIL as actionable failure.
  • Missing regression test: Add integration test covering connect/status/doctor flow when sandbox lacks dcode-managed-exec helper, verifying rebuild guidance surfaces and commands fail closed.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check callers of probeSandboxInferenceGatewayHealth: grep -r 'probeSandboxInferenceGatewayHealth' --include='*.ts'. Verify they handle ok:false with detail=DCODE_MANAGED_EXEC_MISSING_DETAIL as actionable failure.
  • Evidence: inference-route-health.ts:79-86 returns failed boundary for missing helper inference-route-health.test.ts:99 test confirms new contract connect.ts uses probeSandboxInferenceRouteProbe which uses parseSandboxInferenceRouteProbeResult

PRA-4 Resolve/justify — New stderr fail-closed trust boundary: any stderr from probe exec causes immediate fail-closed

  • Location: src/lib/actions/sandbox/connect-inference-route-probe.ts:96
  • Category: correctness
  • Problem: connect-inference-route-probe.ts:96-103 implements new trust boundary: any non-empty stderr from probe exec → immediate fail-closed (healthy:false, broken:false, httpStatus:0, detail=redacted(stderr)). Hostile-profile tests verify login-shell preamble, .bash_profile, .curlrc, and inherited descriptors cannot emit trusted probe evidence. Stdout-only evidence is now authoritative.
  • Impact: Strengthens probe trust boundary but may cause false positives if legitimate stderr occurs (e.g., curl verbose output, proxy warnings). Redaction runs after missing-helper detection (order matters).
  • Recommended action: Verify no legitimate stderr paths exist in production probe execution. Consider allowlist for known-benign stderr patterns if any surface in E2E testing.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Run E2E inference-routing job and check for stderr in probe results. Test hostile-profile cases: login-shell preamble, startup files, inherited fd spoofing.
  • Missing regression test: E2E test verifying probe succeeds with clean stdout/stderr in production sandbox; hostile-profile tests already cover spoofing vectors.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Run E2E inference-routing job and check for stderr in probe results. Test hostile-profile cases: login-shell preamble, startup files, inherited fd spoofing.
  • Evidence: connect-inference-route-probe.ts:96-103 stderr fail-closed logic connect-inference-route-probe.test.ts:68-95 hostile-profile spoof tests connect-inference-route-probe.test.ts:115-127 token redaction test

PRA-5 Resolve/justify — Documentation gap: no migration path for existing sandboxes lacking DCode helper

  • Location: docs/reference/troubleshooting.mdx:1070
  • Category: docs
  • Problem: troubleshooting.mdx:1070-1082 documents 'Trusted route-probe helper is missing' with rebuild guidance, but no guidance for sandboxes created before helper existed that may have partial state. The fail-closed behavior means connect, status, doctor all fail until rebuild — no graceful degradation or partial-recovery path documented.
  • Impact: Users with older Deep Agents sandboxes will hit hard failures on connect/status/doctor with only rebuild as documented option. No guidance for data preservation, workspace backup, or partial state recovery before rebuild.
  • Recommended action: Add migration guidance: workspace preservation steps before rebuild, what state survives rebuild (workspace, agent config), and when to use destroy+onboard vs rebuild.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read troubleshooting.mdx section 'Trusted route-probe helper is missing' — verify it covers workspace preservation, rebuild vs destroy+onboard decision, and data survival.
  • Missing regression test: Doc review checklist item: verify migration guidance for breaking changes to sandbox compatibility boundaries.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read troubleshooting.mdx section 'Trusted route-probe helper is missing' — verify it covers workspace preservation, rebuild vs destroy+onboard decision, and data survival.
  • Evidence: troubleshooting.mdx:1070-1082 only shows rebuild command inference-route-health.ts:79-86 fails closed for missing helper connect.ts uses probe which will fail closed

💡 In-scope improvements

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

  • None.
Test follow-ups to resolve or justify

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

  • PRA-T1 Runtime validation — Run the `inference-routing` E2E job for Inference selection, reachability, and network policy must agree at the real host-to-sandbox boundary. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy.
  • PRA-T2 Runtime validation — Run the `network-policy` E2E job for Inference selection, reachability, and network policy must agree at the real host-to-sandbox boundary. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy.
  • PRA-T3 Runtime validation — Run the `onboard-repair` E2E job for Onboarding and sandbox state must converge across persisted metadata, reported status, and the live runtime. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/connect.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy.
  • PRA-T4 Runtime validation — Run the `onboard-resume` E2E job for Onboarding and sandbox state must converge across persisted metadata, reported status, and the live runtime. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/connect.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy.
  • PRA-T5 Acceptance clause — Harden DCode route probe diagnostics — add test evidence or identify existing coverage. stderr fail-closed, token redaction, argv isolation, missing-helper detection implemented in connect-inference-route-probe.ts
  • PRA-T6 Acceptance clause — Reject DCode probe stderr — add test evidence or identify existing coverage. connect-inference-route-probe.ts:96-103 implements stderr fail-closed trust boundary
  • PRA-T7 Acceptance clause — Isolate DCode route probe shell env — add test evidence or identify existing coverage. buildSandboxInferenceRouteProbeArgs returns argv with --no-tty --env HOME=/usr/local/lib/nemoclaw --env BASH_ENV= --env ENV= for DCode agents
  • PRA-T8 Acceptance clause — Fail closed on missing DCode probe helper — add test evidence or identify existing coverage. DCODE_MANAGED_EXEC_MISSING_DETAIL constant, isDcodeManagedExecMissingDetail() detector, parseSandboxInferenceRouteProbeResult and probeSandboxInferenceGatewayHealth return failed boundary
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — connect.ts monolith continues growing without extraction review

  • Location: src/lib/actions/sandbox/connect.ts:1182
  • Category: architecture
  • Problem: connect.ts has grown from 1181 to 1182 lines (+1) in this PR, continuing a pattern of monolith growth (22 recent commits in 3 months). The risk context flags this with severity 'warning' and rationale 'review whether extraction is feasible.'
  • Impact: Increasing cognitive load, harder to test in isolation, higher risk of regressions in sandbox connect flow which handles gateway routing, DCode probes, recovery, onboarding, and credential boundaries.
  • Recommended action: Extract gateway lifecycle checks, inference route probing, DNS/proxy repair, and process recovery into separate modules. At minimum, document why extraction is deferred in this PR.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check git history: `git log --oneline -20 -- src/lib/actions/sandbox/connect.ts` shows 22 commits since May 2026. File length: `wc -l src/lib/actions/sandbox/connect.ts`.
  • Missing regression test: No test enforces max file size or module extraction; consider adding a lint rule or CI check for files >1000 lines.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check git history: `git log --oneline -20 -- src/lib/actions/sandbox/connect.ts` shows 22 commits since May 2026. File length: `wc -l src/lib/actions/sandbox/connect.ts`.
  • Evidence: riskPlan.monolithDeltas[1]: connect.ts delta +1, severity warning driftEvidence for connect.ts shows 22 recent commits

PRA-2 Resolve/justify — connect-flow.test.ts test monolith growing alongside implementation

  • Location: src/lib/actions/sandbox/connect-flow.test.ts:522
  • Category: architecture
  • Problem: connect-flow.test.ts grew from 515 to 522 lines (+7) in this PR. The risk context flags this with severity 'warning' and rationale 'review whether extraction is feasible.' Test monolith growth parallels implementation monolith growth.
  • Impact: Test maintenance burden increases; harder to isolate test failures; shared harness mutations risk cross-test contamination; new DCode probe tests add to existing sprawling test file.
  • Recommended action: Split test file by concern: connect flow core, DCode probe preamble, gateway repair, terminal agents, error paths. Or justify why unified harness is necessary.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: File length: `wc -l src/lib/actions/sandbox/connect-flow.test.ts`. Recent commits: `git log --oneline -10 -- src/lib/actions/sandbox/connect-flow.test.ts` shows 12 commits since March 2026.
  • Missing regression test: No test structure governance; consider adding test file size check or module-split CI gate.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: File length: `wc -l src/lib/actions/sandbox/connect-flow.test.ts`. Recent commits: `git log --oneline -10 -- src/lib/actions/sandbox/connect-flow.test.ts` shows 12 commits since March 2026.
  • Evidence: riskPlan.monolithDeltas[0]: connect-flow.test.ts delta +7, severity warning driftEvidence for connect-flow.test.ts shows 12 recent commits

PRA-3 Resolve/justify — Probe health authority state transition: missing DCode helper now returns failed boundary instead of unavailable

  • Location: src/lib/actions/sandbox/inference-route-health.ts:79
  • Category: correctness
  • Problem: inference-route-health.ts:79-86 now returns {ok:false, httpStatus:0, detail:DCODE_MANAGED_EXEC_MISSING_DETAIL} for missing DCode helper instead of null (probe unavailable). This shifts missing-helper from 'retryable/unavailable' to 'definitively failed compatibility boundary' — callers (connect, status, doctor) must treat this as actionable failure requiring rebuild, not transient unavailability. Test at inference-route-health.test.ts:99 confirms new contract.
  • Impact: Breaking change for callers: connect, status, and doctor commands will now fail closed with rebuild guidance instead of retrying or treating as transient. Existing sandboxes without the helper (older images) will fail all three commands until rebuilt.
  • Recommended action: Verify all callers (connect.ts, status command, doctor command) correctly handle the new failed-boundary return value. Document the state transition in migration notes or release notes.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Check callers of probeSandboxInferenceGatewayHealth: grep -r 'probeSandboxInferenceGatewayHealth' --include='*.ts'. Verify they handle ok:false with detail=DCODE_MANAGED_EXEC_MISSING_DETAIL as actionable failure.
  • Missing regression test: Add integration test covering connect/status/doctor flow when sandbox lacks dcode-managed-exec helper, verifying rebuild guidance surfaces and commands fail closed.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Check callers of probeSandboxInferenceGatewayHealth: grep -r 'probeSandboxInferenceGatewayHealth' --include='*.ts'. Verify they handle ok:false with detail=DCODE_MANAGED_EXEC_MISSING_DETAIL as actionable failure.
  • Evidence: inference-route-health.ts:79-86 returns failed boundary for missing helper inference-route-health.test.ts:99 test confirms new contract connect.ts uses probeSandboxInferenceRouteProbe which uses parseSandboxInferenceRouteProbeResult

PRA-4 Resolve/justify — New stderr fail-closed trust boundary: any stderr from probe exec causes immediate fail-closed

  • Location: src/lib/actions/sandbox/connect-inference-route-probe.ts:96
  • Category: correctness
  • Problem: connect-inference-route-probe.ts:96-103 implements new trust boundary: any non-empty stderr from probe exec → immediate fail-closed (healthy:false, broken:false, httpStatus:0, detail=redacted(stderr)). Hostile-profile tests verify login-shell preamble, .bash_profile, .curlrc, and inherited descriptors cannot emit trusted probe evidence. Stdout-only evidence is now authoritative.
  • Impact: Strengthens probe trust boundary but may cause false positives if legitimate stderr occurs (e.g., curl verbose output, proxy warnings). Redaction runs after missing-helper detection (order matters).
  • Recommended action: Verify no legitimate stderr paths exist in production probe execution. Consider allowlist for known-benign stderr patterns if any surface in E2E testing.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Run E2E inference-routing job and check for stderr in probe results. Test hostile-profile cases: login-shell preamble, startup files, inherited fd spoofing.
  • Missing regression test: E2E test verifying probe succeeds with clean stdout/stderr in production sandbox; hostile-profile tests already cover spoofing vectors.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Run E2E inference-routing job and check for stderr in probe results. Test hostile-profile cases: login-shell preamble, startup files, inherited fd spoofing.
  • Evidence: connect-inference-route-probe.ts:96-103 stderr fail-closed logic connect-inference-route-probe.test.ts:68-95 hostile-profile spoof tests connect-inference-route-probe.test.ts:115-127 token redaction test

PRA-5 Resolve/justify — Documentation gap: no migration path for existing sandboxes lacking DCode helper

  • Location: docs/reference/troubleshooting.mdx:1070
  • Category: docs
  • Problem: troubleshooting.mdx:1070-1082 documents 'Trusted route-probe helper is missing' with rebuild guidance, but no guidance for sandboxes created before helper existed that may have partial state. The fail-closed behavior means connect, status, doctor all fail until rebuild — no graceful degradation or partial-recovery path documented.
  • Impact: Users with older Deep Agents sandboxes will hit hard failures on connect/status/doctor with only rebuild as documented option. No guidance for data preservation, workspace backup, or partial state recovery before rebuild.
  • Recommended action: Add migration guidance: workspace preservation steps before rebuild, what state survives rebuild (workspace, agent config), and when to use destroy+onboard vs rebuild.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read troubleshooting.mdx section 'Trusted route-probe helper is missing' — verify it covers workspace preservation, rebuild vs destroy+onboard decision, and data survival.
  • Missing regression test: Doc review checklist item: verify migration guidance for breaking changes to sandbox compatibility boundaries.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read troubleshooting.mdx section 'Trusted route-probe helper is missing' — verify it covers workspace preservation, rebuild vs destroy+onboard decision, and data survival.
  • Evidence: troubleshooting.mdx:1070-1082 only shows rebuild command inference-route-health.ts:79-86 fails closed for missing helper connect.ts uses probe which will fail closed

PRA-6 Required — Unmet acceptance: required E2E jobs not executed per risk plan

  • Location: src/lib/actions/sandbox/connect-inference-route-probe.ts:1
  • Category: acceptance
  • Problem: Risk plan v1 (head 9c1a9ed) requires 4 tier-2 E2E jobs: inference-routing, network-policy, onboard-repair, onboard-resume for lifecycle-state and inference-policy invariants. PR quality gates show only 'targeted CLI tests passed locally' — npm test and npm run check unchecked. Prior advisor review (PRA-T1 through PRA-T4) explicitly requested runtime validation via these E2E jobs as test follow-ups.
  • Impact: Deterministic regression risks for lifecycle-state (partial failure/retry convergence, status agreement, cleanup preservation) and inference-policy (provider reachability, real-request health, network policy agreement) are not validated against real host-to-sandbox boundary. Unit/mock coverage (29 test blocks) comprehensive but cannot validate real network policy, DNS, TLS, proxy, and gateway interactions.
  • Required action: Run required E2E jobs before merge, or explicitly justify why each is deferred with linked follow-up issue. At minimum, inference-routing and network-policy must pass for inference-policy invariants.
  • Expected follow-up: Fix before merge or get explicit maintainer override.
  • Verification: Check GitHub Actions for this PR: look for inference-routing, network-policy, onboard-repair, onboard-resume job runs. Verify they pass or have documented deferral.
  • Missing regression test: The 4 required E2E jobs themselves are the regression tests for the risk plan invariants. They must execute and pass.
  • Done when: The required change is committed and verification passes: Check GitHub Actions for this PR: look for inference-routing, network-policy, onboard-repair, onboard-resume job runs. Verify they pass or have documented deferral.
  • Evidence: riskPlan.requiredJobs: inference-routing, network-policy, onboard-repair, onboard-resume all tier 2 PR quality gates: npm test and npm run check unchecked, only targeted CLI tests passed locally Prior advisor review PRA-T1 through PRA-T4 all request these E2E jobs

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 10, 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 · 6 test follow-ups
Since last review: 3 prior items 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
  • PRA-T5 Add or justify test follow-up: Runtime validation
  • PRA-T6 Add or justify test follow-up: Acceptance clause
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 — Run the `inference-routing` E2E job for Inference selection, reachability, and network policy must agree at the real host-to-sandbox boundary. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy. Checked-in unit and mocked-boundary tests cover the changed parser, argv, health, fail-closed, redaction, and missing-helper behavior. The deterministic risk plan still calls for live validation of lifecycle-state and inference-policy boundaries.
  • PRA-T2 Runtime validation — Run the `inference-routing` E2E job to validate that inference selection and the advertised in-sandbox route remain reachable at the real host-to-sandbox boundary.. Deterministic regression risks require live validation: lifecycle-state, inference-policy. Checked-in unit and mocked-boundary tests cover the changed parser, argv, health, fail-closed, redaction, and missing-helper behavior. The deterministic risk plan still calls for live validation of lifecycle-state and inference-policy boundaries.
  • PRA-T3 Runtime validation — Run the `network-policy` E2E job for Inference selection, reachability, and network policy must agree at the real host-to-sandbox boundary. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy. Checked-in unit and mocked-boundary tests cover the changed parser, argv, health, fail-closed, redaction, and missing-helper behavior. The deterministic risk plan still calls for live validation of lifecycle-state and inference-policy boundaries.
  • PRA-T4 Runtime validation — Run the `network-policy` E2E job to validate that the intended `inference.local` route is permitted while unintended egress remains denied.. Deterministic regression risks require live validation: lifecycle-state, inference-policy. Checked-in unit and mocked-boundary tests cover the changed parser, argv, health, fail-closed, redaction, and missing-helper behavior. The deterministic risk plan still calls for live validation of lifecycle-state and inference-policy boundaries.
  • PRA-T5 Runtime validation — Run the `onboard-repair` E2E job for Onboarding and sandbox state must converge across persisted metadata, reported status, and the live runtime. Matched files: `src/lib/actions/sandbox/connect-inference-route-probe.ts`, `src/lib/actions/sandbox/connect.ts`, `src/lib/actions/sandbox/inference-route-health.ts`.. Deterministic regression risks require live validation: lifecycle-state, inference-policy. Checked-in unit and mocked-boundary tests cover the changed parser, argv, health, fail-closed, redaction, and missing-helper behavior. The deterministic risk plan still calls for live validation of lifecycle-state and inference-policy boundaries.
  • PRA-T6 Acceptance clause — NVBug 6438202 — add test evidence or identify existing coverage. The PR references internal NVBug 6438202, but no public linked GitHub issue clauses or inspectable NVBug details were available in the review context.

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/actions/sandbox/connect-inference-route-probe.ts (1)

109-134: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Normalize stderr before returning probe detail. The early stderr return skips isDcodeManagedExecMissingDetail, so a missing-launcher error on stderr won’t get the rebuild hint. It also preserves ANSI/control bytes in detail; strip them here before truncating, or run stderr through the same canonicalization path as stdout.

🤖 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/connect-inference-route-probe.ts` around lines 109 -
134, Normalize stderr through the same canonicalization used for probe output
before returning it from the early stderr branch. Apply ANSI/control-byte
stripping and whitespace normalization, then pass the cleaned detail through
isDcodeManagedExecMissingDetail so missing-launcher errors receive
DCODE_MANAGED_EXEC_MISSING_DETAIL before truncation.

Source: Path instructions

🧹 Nitpick comments (2)
src/lib/actions/sandbox/connect-inference-route-probe.test.ts (1)

219-231: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add stderr-channel coverage for missing-helper detection.

This test only models the missing-launcher failure via stdout/status: 127. Since parseSandboxInferenceRouteProbeResult now treats non-empty stderr as an immediate, differently-handled failure path (see companion comment on connect-inference-route-probe.ts Lines 109-134), add a parallel case using stderr to confirm the rebuild-guidance detail is still produced through that channel once the ordering issue is fixed.

As per path instructions: "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 `@src/lib/actions/sandbox/connect-inference-route-probe.test.ts` around lines
219 - 231, Add a parallel test for parseSandboxInferenceRouteProbeResult that
supplies the missing DCode launcher message through non-empty stderr, then
assert healthy is false, broken is false, httpStatus is 0, and detail equals
DCODE_MANAGED_EXEC_MISSING_DETAIL with
isDcodeManagedExecMissingDetail(parsed.detail) true. Ensure the test exercises
the real stderr handling path without broad mocks or bypassing the parser logic.

Source: Path instructions

src/lib/actions/sandbox/inference-route-health.test.ts (1)

99-111: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Extend makeCapture to cover the stderr channel.

makeCapture only supports output/status, so no test in this file can exercise the stderr path that includeStreams: true was added to support (Lines 45 in inference-route-health.ts). Add a stderr parameter and a corresponding test case to confirm probeSandboxInferenceGatewayHealth correctly classifies a stderr-sourced missing-helper failure.

As per path instructions: "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 `@src/lib/actions/sandbox/inference-route-health.test.ts` around lines 99 -
111, The test helper makeCapture currently cannot produce stderr-based failures,
leaving the includeStreams path untested. Extend makeCapture to accept and
return a stderr value, then add a probeSandboxInferenceGatewayHealth test that
supplies a stderr-sourced missing-helper error and asserts the same failed
compatibility result and detail classification as the existing output-based
case.

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.

Outside diff comments:
In `@src/lib/actions/sandbox/connect-inference-route-probe.ts`:
- Around line 109-134: Normalize stderr through the same canonicalization used
for probe output before returning it from the early stderr branch. Apply
ANSI/control-byte stripping and whitespace normalization, then pass the cleaned
detail through isDcodeManagedExecMissingDetail so missing-launcher errors
receive DCODE_MANAGED_EXEC_MISSING_DETAIL before truncation.

---

Nitpick comments:
In `@src/lib/actions/sandbox/connect-inference-route-probe.test.ts`:
- Around line 219-231: Add a parallel test for
parseSandboxInferenceRouteProbeResult that supplies the missing DCode launcher
message through non-empty stderr, then assert healthy is false, broken is false,
httpStatus is 0, and detail equals DCODE_MANAGED_EXEC_MISSING_DETAIL with
isDcodeManagedExecMissingDetail(parsed.detail) true. Ensure the test exercises
the real stderr handling path without broad mocks or bypassing the parser logic.

In `@src/lib/actions/sandbox/inference-route-health.test.ts`:
- Around line 99-111: The test helper makeCapture currently cannot produce
stderr-based failures, leaving the includeStreams path untested. Extend
makeCapture to accept and return a stderr value, then add a
probeSandboxInferenceGatewayHealth test that supplies a stderr-sourced
missing-helper error and asserts the same failed compatibility result and detail
classification as the existing output-based case.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 88f5d645-370f-4e59-b092-7aa356d9f61c

📥 Commits

Reviewing files that changed from the base of the PR and between 9dec1fb and e897550.

📒 Files selected for processing (9)
  • docs/reference/troubleshooting.mdx
  • src/lib/actions/sandbox/connect-flow-dcode-probe-preamble.test.ts
  • src/lib/actions/sandbox/connect-flow.test.ts
  • src/lib/actions/sandbox/connect-inference-route-probe.test.ts
  • src/lib/actions/sandbox/connect-inference-route-probe.ts
  • src/lib/actions/sandbox/connect.ts
  • src/lib/actions/sandbox/inference-route-health.test.ts
  • src/lib/actions/sandbox/inference-route-health.ts
  • test/support/connect-flow-test-harness.ts

@sandl99 sandl99 added bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior v0.0.80 platform: dgx-spark Affects DGX Spark hardware or workflows labels Jul 10, 2026
@sandl99
sandl99 requested review from cv and ericksoa July 10, 2026 13:11
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All requested jobs passed

Run: 29095182896
Workflow ref: fix/nvbug-6438202-dcode-route-probe
Requested targets: (default — all supported)
Requested jobs: inference-routing,network-policy,onboard-repair,onboard-resume
Summary: 4 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
inference-routing ✅ success
network-policy ✅ success
onboard-repair ✅ success
onboard-resume ✅ success

@jyaunches
jyaunches merged commit 14dc22c into main Jul 10, 2026
121 of 122 checks passed
@jyaunches
jyaunches deleted the fix/nvbug-6438202-dcode-route-probe branch July 10, 2026 13:20
cv pushed a commit that referenced this pull request Jul 11, 2026
## Summary

Release-prep documentation for **v0.0.80**. Adds the `## v0.0.80`
section to `docs/about/release-notes.mdx` summarizing user-facing
changes since v0.0.79, each bullet linking to the relevant deeper page.

Produced via `nemoclaw-contributor-update-docs` (pre-tag path): scanned
`v0.0.79..HEAD`, applied the docs skip list (no violations), and
confirmed the 8 commits that already shipped in-PR docs are complete. No
new pages needed.

## Source summary

- #6507 -> `docs/about/release-notes.mdx`: Hermes v0.18 + Slack Block
Kit (rich rendering, digest-pinned base image).
- #6584 / #6616 -> `docs/about/release-notes.mdx`: host-local OpenRouter
runtime attribution adapter (port `11437`,
`NEMOCLAW_OPENROUTER_RUNTIME_ADAPTER_PORT`) and native Deep Agents
`openrouter` provider.
- #6210 / #6292 -> `docs/about/release-notes.mdx`: host corporate proxy
CA import into sandbox trust (`NEMOCLAW_CORPORATE_CA_BUNDLE`,
`NEMOCLAW_CORPORATE_CA_IMPORT`).
- #6624 / #6623 / #6656 -> `docs/about/release-notes.mdx`:
release-matched base-image selection, surfaced cluster-image build
diagnostics, preserved Nemotron profile registration.
- #6629 / #6637 -> `docs/about/release-notes.mdx`: bare `connect`
default-sandbox behavior and route-probe hardening.
- #6634 / #6626 / #6596 / #5569 / #6610 / #6655 ->
`docs/about/release-notes.mdx`: onboarding/recovery preservation,
stale-gateway-PID fix, installer backup message, vLLM label on managed
platforms.
- #6578 / #5670 -> `docs/about/release-notes.mdx`: automatic Hermes
light terminal skin and non-interactive `npx` MCP server startup.

## Verification

`npm run docs`: 0 errors, all internal links resolve (2 pre-existing
hidden-page warnings). `_build/` variants for OpenClaw, Hermes, and Deep
Agents all regenerate with the v0.0.80 section.

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

* **Documentation**
  * Added release notes for v0.0.80.
  * Documented Hermes upgrades, including Slack Block Kit rendering.
  * Added details on OpenRouter traffic routing and attribution headers.
* Documented improved proxy certificate handling and sandbox
reliability.
* Highlighted enhanced connection defaults, route-probing safeguards,
onboarding recovery, and terminal/MCP startup behavior.
  * Added references to relevant user-guide documentation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
See NVBug 6438202.

## Related Issue
NVBug 6438202

## Changes
- See NVBug 6438202.

## 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: NVBug 6438202 tracks
internal security review; public details intentionally withheld.
- [ ] 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:
targeted CLI tests passed locally; details withheld, see NVBug 6438202.
- [ ] 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)
- [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: San Dang <sdang@nvidia.com>


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved sandbox connectivity checks to reject untrusted probe
results, including unexpected startup errors.
* Added clear failure handling and rebuild guidance when required
sandbox helpers are missing.
  * Improved route health reporting for affected Deep Agents sandboxes.

* **Documentation**
* Added troubleshooting guidance for missing sandbox route-probe
helpers, including rebuild and verification steps.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary

Release-prep documentation for **v0.0.80**. Adds the `## v0.0.80`
section to `docs/about/release-notes.mdx` summarizing user-facing
changes since v0.0.79, each bullet linking to the relevant deeper page.

Produced via `nemoclaw-contributor-update-docs` (pre-tag path): scanned
`v0.0.79..HEAD`, applied the docs skip list (no violations), and
confirmed the 8 commits that already shipped in-PR docs are complete. No
new pages needed.

## Source summary

- NVIDIA#6507 -> `docs/about/release-notes.mdx`: Hermes v0.18 + Slack Block
Kit (rich rendering, digest-pinned base image).
- NVIDIA#6584 / NVIDIA#6616 -> `docs/about/release-notes.mdx`: host-local OpenRouter
runtime attribution adapter (port `11437`,
`NEMOCLAW_OPENROUTER_RUNTIME_ADAPTER_PORT`) and native Deep Agents
`openrouter` provider.
- NVIDIA#6210 / NVIDIA#6292 -> `docs/about/release-notes.mdx`: host corporate proxy
CA import into sandbox trust (`NEMOCLAW_CORPORATE_CA_BUNDLE`,
`NEMOCLAW_CORPORATE_CA_IMPORT`).
- NVIDIA#6624 / NVIDIA#6623 / NVIDIA#6656 -> `docs/about/release-notes.mdx`:
release-matched base-image selection, surfaced cluster-image build
diagnostics, preserved Nemotron profile registration.
- NVIDIA#6629 / NVIDIA#6637 -> `docs/about/release-notes.mdx`: bare `connect`
default-sandbox behavior and route-probe hardening.
- NVIDIA#6634 / NVIDIA#6626 / NVIDIA#6596 / NVIDIA#5569 / NVIDIA#6610 / NVIDIA#6655 ->
`docs/about/release-notes.mdx`: onboarding/recovery preservation,
stale-gateway-PID fix, installer backup message, vLLM label on managed
platforms.
- NVIDIA#6578 / NVIDIA#5670 -> `docs/about/release-notes.mdx`: automatic Hermes
light terminal skin and non-interactive `npx` MCP server startup.

## Verification

`npm run docs`: 0 errors, all internal links resolve (2 pre-existing
hidden-page warnings). `_build/` variants for OpenClaw, Hermes, and Deep
Agents all regenerate with the v0.0.80 section.

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

* **Documentation**
  * Added release notes for v0.0.80.
  * Documented Hermes upgrades, including Slack Block Kit rendering.
  * Added details on OpenRouter traffic routing and attribution headers.
* Documented improved proxy certificate handling and sandbox
reliability.
* Highlighted enhanced connection defaults, route-probing safeguards,
onboarding recovery, and terminal/MCP startup behavior.
  * Added references to relevant user-guide documentation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior platform: dgx-spark Affects DGX Spark hardware or workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants