Skip to content

fix(config): export NVIDIA sources and clarify migration prerequisites - #12451

Merged
sandl99 merged 8 commits into
mainfrom
codex/12146-export-prerequisites
Oct 5, 2026
Merged

sandl99 merged 8 commits into
mainfrom
codex/12146-export-prerequisites

Conversation

@hunglp6d

@hunglp6d hunglp6d commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

nemoclaw config export verifies native NVIDIA provider bindings that previously failed live verification. When a successful export omits retained corporate CA state, the CLI reports that omission on stderr. Exported policy omits the gateway's computed provider_credentialed marker so the tested raw YAML passes the pinned v1 parser.

Reason

Users need portable configuration and clear destination prerequisites. The YAML carries credential references, while destination credentials, CA trust, and proxy availability require separate preparation.

Related issues

Closes #12146.
Closes #11421.
Refs #12011 and #12130.

Changes

  • Resolve the native NVIDIA built-in profile through its observed binding, including the current workspace. Missing or foreign bindings still fail verification. Adapter and live-source tests cover accepted and refused bindings.
  • Carry the verified CA-omission fact to the CLI, outside the exported document. Emit the notice only after successful publication, including file output with --json. Tests cover stdout separation, absent CA, retry stability, and publication failures.
  • Remove provider_credentialed from the cloned policy. Projection tests cover both boolean values, preserve authored credential controls, and confirm that the source policy stays unchanged.
  • Document destination credential references, existing proxy reachability, omitted CA trust, and the existing exclusions for host proxy credential replay and experimental runtime identity. This follows the CA-omission decision in Allow config export from sandboxes with imported corporate CA trust #12011; it adds no trust-transfer or credential-provisioning mechanism.

Verification

  • After merging main fcce93c721e87c124442d1b8079cbc3d71fc45df: CLI/plugin builds, CLI typecheck, 266 tests across six changed test files, and all seven growth guardrails passed.
  • npm run docs passed with zero errors. Fern reported two warnings: deployed-redirect comparison requires authentication, and the existing light-theme accent contrast is below its recommendation. Local route validation passed.
  • Manual OpenClaw/native NVIDIA export succeeded on Linux AMD64, DGX Station ARM64, and macOS ARM64. The unchanged exported bytes passed the actual parser/compiler at 88c6600c06b0937907290362eef86912052c4ad0. Linux file output and macOS stdout were exercised; direct file output remains Linux-only, as established by feat(config): export verified sandbox configuration #11015.
  • No secrets, API keys, or credential values are included in the diff. The live checks confirmed credential references in YAML and excluded the known key values from retained output.
Focused test command
npx --no-install vitest run --project cli --project integration src/commands/config/export.test.ts src/lib/domain/config/verify-export-source-corporate-ca.test.ts src/lib/adapters/openshell/providers.test.ts src/lib/adapters/config/live-export-source.test.ts test/onboarding/openshell-sdk-export-reads.test.ts src/lib/domain/config/export-document.test.ts

Additional completed commands: npm run build:cli, npm --prefix nemoclaw run build, npm run typecheck:cli, and npx --no-install vitest run --project integration test/automation/pull-requests/growth-guardrails.test.ts.

Manual qualification revisions and results

Sources were created by the local installer from 3713edeebfca950df302eac428b845d06a5fcd5a, using OpenShell CLI/SDK 0.0.116 and OpenClaw 2026.9.1. The installer prepared and loaded the SDK without CI SDK staging. On macOS, the same pinned OpenShell helper ran first in an authenticated SSH session.

The exporter used node bin/nemoclaw.js config export <sandbox> --output -. Linux also exercised --output <path> --json; custom gateway runs set NEMOCLAW_GATEWAY_PORT.

The installed-source CLI failed native NVIDIA metadata verification on Station and macOS. An untouched ab9c93874f78681ef1a442e5e2b9d6ce5d689038 exporter produced YAML, but the pinned parser rejected it. Adding the projection patch made raw parsing and compilation pass on the same sources. The patch SHA-256 is 3012b63405bbd9d57715ac0522ed2b0d5da57c9b47fd588b52066fc395d9e3bc.

Candidate raw YAML SHA-256 values:

  • Linux AMD64, CA present: c4e8aa60f9d3634f26184d4868aa99422237786bf2e110100b3616fc5f766154.
  • Station ARM64, default gateway, no CA: 48dad688035221a9297d0fdcbba8f3dc7d57ad1247319a1707e46c9e3d852363.
  • Station ARM64, custom gateway, CA present: 5a57054fd58bc465f31acfaf2395ab2f10c8ef448cbd5f1abb779c80c593f1e0.
  • macOS ARM64, no CA: d58b4c499799d034a7a2fd44af780ceec1aa15e856fb0a32532129771cda1803.

Each candidate parsed and compiled successfully, with the input hash unchanged. CA cases emitted one notice on stderr; cases without CA emitted none. Linux file output had mode 0600 and retained the version 1 JSON result. Source registry hashes stayed unchanged; Station and macOS checks also preserved sandbox identity, config/provider revisions, and policy hashes.

These live runs tested ab9c938 plus the projection patch before the main merge. Local checks above cover the merged working tree. The consumer ran on the workstation; this is pinned parser/compiler evidence, not a v1 deployment or compatibility claim for the latest v1 branch. No v1 plan/apply/health/invoke or local full test suite was run for this publication checkpoint.


Signed-off-by: Hung Le [email protected]

Resolve the builtin NVIDIA profile at the provider's bound workspace.
Accept empty or current-workspace bindings after verifying the builtin profile.
Keep custom profiles, config overrides, and foreign bindings outside this derivation.

Add provider, exporter, and generated-SDK regression coverage for both bindings.

Refs #11421

Signed-off-by: Hung Le <[email protected]>
Carry verified CA omission to the CLI after a successful export.
Write a fixed notice to stderr while preserving YAML and the JSON result contract.
Do not emit the notice when observation or publication fails.

Cover CA/no-CA sources, stable observations, and output failures in existing tests.

Refs #12146

Signed-off-by: Hung Le <[email protected]>
@hunglp6d hunglp6d self-assigned this Sep 29, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 72310ab5-b17b-4910-8437-5fe92dd30ea2
📥 Commits

Reviewing files that changed from the base of the PR and between 39e59cd and ebd4d31.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9d84399b-a340-4fa6-9ad3-be9b3c974fa1
📥 Commits

Reviewing files that changed from the base of the PR and between ab9c938 and 967bbc2.

📒 Files selected for processing (3)
  • docs/reference/commands.mdx
  • src/lib/domain/config/export-document.test.ts
  • src/lib/domain/config/export-document.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

Config exports now report when source corporate CA configuration is omitted, without changing exported YAML or version 1 JSON. Exported network policies omit provider_credentialed. Native NVIDIA endpoint resolution accepts empty or current-workspace profile bindings and looks up the profile in the provider’s bound workspace.

Changes

Corporate CA export notice

Layer / File(s) Summary
Mark verified exports with omitted CA state
src/lib/domain/config/export-evidence.ts, src/lib/domain/config/verify-export-source.ts, src/lib/domain/config/verify-export-source-corporate-ca.test.ts
Verified source results include corporateCaOmitted: true when the authority has a corporate CA. Tests cover stable and changing snapshots, and confirm failures do not report the marker.
Propagate the marker and report successful exports
src/lib/actions/config/observe-export-source.ts, src/lib/actions/config/export.ts, src/commands/config/export.ts, src/commands/config/export.test.ts, src/lib/domain/README.md, docs/reference/commands.mdx
The marker passes through observation and export outcomes. After a successful export, the command reports the omission on stderr. Tests cover stdout, file, and JSON exports and confirm failures do not emit the notice. Documentation describes the notice and export requirements.

Native NVIDIA profile workspace binding

Layer / File(s) Summary
Resolve the NVIDIA profile using its binding
src/lib/adapters/openshell/providers.ts, src/lib/adapters/openshell/providers.test.ts, src/lib/adapters/openshell/README.md
NVIDIA endpoint resolution accepts an empty or request-matching profile workspace when provider config is empty. The profile lookup uses that workspace. Tests and documentation describe the accepted bindings and exclusions.
Cover workspace bindings in export integrations
src/lib/adapters/config/live-export-source.test.ts, test/onboarding/openshell-sdk-export-reads.test.ts
Export and onboarding SDK tests check profile lookups for empty and default workspaces. The rejection cases cover foreign bindings.

Exported network policy

Layer / File(s) Summary
Remove provider credential markers from exported policy
src/lib/domain/config/export-document.ts, src/lib/domain/config/export-document.test.ts
Exported endpoint policies omit provider_credentialed while retaining other endpoint controls and policy entries. Tests verify the source policy remains unchanged.

Priority: ➖ Normal

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Verify as completeVerifiedSource
  participant Observe as observeStableExportSource
  participant Export as runConfigExport
  participant Command as config export command
  Verify->>Observe: verified result with optional omission marker
  Observe->>Export: successful observation with marker
  Export->>Command: successful outcome with marker
  Command->>Command: write omission notice to stderr after success
Loading

Suggested reviewers: cv

Merge Risk: ⚪ Minimal · up to 967bb

The change reports omitted CA configuration on export and drops a credential marker from exported network policies. No merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 13 files. (1 skipped: … 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 clearly describes the NVIDIA source export change, which is a major part of the pull request. It does not mention the corporate CA omission notice, but it still summarizes a real, significan…
Full details: Docstring Coverage

Explanation

Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 13 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

@github-code-quality

github-code-quality Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit ebd4d31 in the codex/12146-export-p... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/12146-export-p... ebd4d31 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit ebd4d31 in the codex/12146-export-p... branch is 85%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd codex/12146-export-p... ebd4d31 +/-
src/lib/state/s...tory-restore.ts 86% 0% -86%
src/lib/actions.../status-text.ts 84% 46% -38%
src/lib/state/sandbox.ts 92% 83% -9%
src/lib/onboard...al-inference.ts 84% 90% +6%
src/lib/policy/index.ts 71% 79% +8%
src/lib/state/p...l-retirement.ts 79% 92% +13%
src/lib/onboard.../application.ts 55% 72% +17%
src/lib/adapter...gnostics-cli.ts 0% 87% +87%
src/lib/onboard...ternal-image.ts 0% 94% +94%
src/lib/securit...ig-structure.ts 0% 98% +98%

Updated October 05, 2026 02:47 UTC

@hunglp6d
hunglp6d marked this pull request as ready for review September 29, 2026 08:30
@hunglp6d

hunglp6d commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up on Advisor's native NVIDIA profile-binding recommendation: manual live validation passed for exporter ab9c938 on Linux AMD64 with OpenShell CLI/SDK 0.0.116.

The v0 source was created through local install/onboard at 3713ede, using its published managed image. Both exporters read the same sandbox with the real profileWorkspace: default binding:

  • Baseline fcd2c509: exit 2, provider metadata verification failed, no YAML produced.
  • Candidate ab9c938: exit 0, exported 11,179 bytes of YAML with the expected NVIDIA endpoint and credential reference.

The CA notice appeared once on stderr for both stdout and file/JSON export. The source registry hash remained unchanged, and the exported YAML contained neither the API key nor source CA material. The test sandbox and gateway were removed.

This provides live evidence for the current-workspace binding and successful source export. Legacy empty binding and v1 parser/apply validation were not covered.

@sandl99 sandl99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed commit ab9c93874f78681ef1a442e5e2b9d6ce5d689038.

No blocking code defects or vulnerabilities found. Approval remains pending the exporter compatibility evidence required by #11421 and #12146.

The CA omission notice follows successful publication and stays outside YAML and the version 1 JSON result. The PR does not export the CA bundle, path, or digest. NVIDIA profile lookup now accepts the current-workspace binding while retaining builtin provenance, scope, revision, endpoint, and override checks.

At v1 revision 7f3c4d922fe822dca746b242436d8f4eb5a6a096, sandbox and agent corporate CA trust still has no YAML contract. The existing spec.gateway.tls.ca.env references a local CA file for external gateway mTLS; it does not provision sandbox trust. See the v1 types, gateway transport, and CA qualification status.

Category Severity Location Finding Recommendation
Security testing / compatibility WARNING PR description, Review notes Raw exported YAML has not been validated with a pinned v1 parser, as required by the linked issues. Attach validation of the unmodified real export artifact before approval. Identify the exporter commit, target v1 revision, command, and result.

Collected all nine Advisor specialist reviews for this commit. None reported a code finding. The later live comparison substantiates the real-gateway export recommendation for the current-workspace NVIDIA binding. Record that disposition against the Advisor's unresolved recommendation. Legacy empty-binding live qualification remains absent, as disclosed in the PR.

Local verification: 227 focused tests passed. The optional SDK suite skipped 23 tests because its artifact was unavailable. The unchanged command-help test failed because the isolated checkout lacked the compiled help class; the other 16 command tests passed. This is not a full-suite or live-E2E claim.

Security category Verdict Reason
Secrets and credentials PASS Only a boolean omission flag reaches the notice.
Input validation PASS Unsupported bindings and profile changes remain rejected.
Authentication and authorization PASS Existing gateway and identity checks remain.
Dependencies and third-party libraries PASS No dependency changes.
Error handling and logging PASS The fixed notice follows successful publication only.
Cryptography and data protection PASS CA validation and transport protections remain.
Configuration and security headers PASS Provider overrides remain ineligible.
Security testing WARNING Exporter compatibility evidence remains incomplete.
System security PASS Stable observation and publication checks remain.
Changed files reviewed: 13
  • src/commands/config/export.ts
  • src/commands/config/export.test.ts
  • src/lib/actions/config/export.ts
  • src/lib/actions/config/observe-export-source.ts
  • src/lib/adapters/config/live-export-source.test.ts
  • src/lib/adapters/openshell/providers.ts
  • src/lib/adapters/openshell/providers.test.ts
  • src/lib/adapters/openshell/README.md
  • src/lib/domain/config/export-evidence.ts
  • src/lib/domain/config/verify-export-source.ts
  • src/lib/domain/config/verify-export-source-corporate-ca.test.ts
  • src/lib/domain/README.md
  • test/onboarding/openshell-sdk-export-reads.test.ts

Also traced the adjacent workload authority, SDK validation, live observation, and CLI reporting paths.

@sandl99 sandl99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved after review of ab9c93874f78681ef1a442e5e2b9d6ce5d689038; no blocking code defects or vulnerabilities found.

At the user's explicit direction, the additional pinned v1 parser validation requested in my previous review is waived for this PR. This approval does not claim that validation was performed.

Corporate CA bundle, path, and digest remain omitted from exported YAML. Destination sandbox and agent trust must be provisioned separately.

Merge main fcce93c and preserve the native NVIDIA binding and CA omission fixes.
Omit computed gateway credential markers from exported policy while preserving
authored controls and source state. Add focused projection regression tests.

Document destination credential, proxy, and CA prerequisites and the existing
runtime identity exclusion. Manual source-export qualification used Linux AMD64,
DGX Station ARM64, and macOS ARM64 with the pinned v1 parser at 88c6600.

Validate the merged working tree with focused tests, CLI typecheck, growth
guardrails, and the documentation build. Live evidence predates this main merge.

Refs #12146, #11421

Signed-off-by: Hung Le <[email protected]>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

@hunglp6d hunglp6d changed the title feat(config): report omitted corporate CA after export fix(config): export NVIDIA sources and clarify migration prerequisites Oct 4, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit ebd4d31. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@sandl99
sandl99 merged commit 944973e into main Oct 5, 2026
67 checks passed
@sandl99
sandl99 deleted the codex/12146-export-prerequisites branch October 5, 2026 05:20
@wscurran wscurran added area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior

Projects

None yet

3 participants