Skip to content

refactor(messaging): clean up provider credential hashes from SandboxEntry (registry) - #5410

Merged
cv merged 4 commits into
mainfrom
fix/remove-provider-credential-hashes
Jun 15, 2026
Merged

refactor(messaging): clean up provider credential hashes from SandboxEntry (registry)#5410
cv merged 4 commits into
mainfrom
fix/remove-provider-credential-hashes

Conversation

@sandl99

@sandl99 sandl99 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the stale top-level SandboxEntry credential hash map that was reintroduced after the messaging credential binding migration. Sandbox registration and rebuild now rely on messaging.plan.credentialBindings[].credentialHash instead of duplicating that state.

Related Issue

Related: #4908

Changes

  • Remove the duplicate credential hash map from SandboxEntry and registry registration.
  • Stop building/passing the duplicate credential hash map during onboarding and stop preserving it during rebuild.
  • Clean up tests and e2e fixtures/logging that referenced the removed registry field.
  • Ratchet the test/onboard-messaging.test.ts file-size budget after shrinking the test file.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • 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)

Focused checks run after merging current origin/main:

  • npm run build:cli passes
  • npm run typecheck:cli passes
  • npm run test-size:check passes
  • git diff --check passes
  • rg -n "providerCredentialHashes" --hidden --glob '!node_modules' . returns no matches
  • npx vitest run test/registry.test.ts src/lib/onboard/sandbox-registration.test.ts test/onboard-messaging.test.ts test/credential-rotation.test.ts passes

Local full hook notes:

  • npx prek run --all-files, the commit hook, and the pre-push hook were attempted before the merge update but were blocked by broad CLI-suite environment/timeouts unrelated to this change.

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

Summary by CodeRabbit

  • Bug Fixes
    • Improved sandbox image tag derivation to use actual creation output values.
    • Enhanced sandbox rebuild behavior to preserve tool gateway data when available.
  • Refactor
    • Removed credential-hash persistence from sandbox registry entries and rebuild/registration flows.
  • Tests
    • Updated sandbox registration unit tests to match the new registry structure.
    • Adjusted end-to-end scripts: removed credential-hash debug output and updated stored rebuild payload for Hermes.
  • Chores
    • Updated CI test-file-size budget (legacy line limit).

@sandl99 sandl99 self-assigned this Jun 14, 2026
@copy-pr-bot

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

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3f8c618a-dc9b-4cc7-9bc0-0db52a13824e

📥 Commits

Reviewing files that changed from the base of the PR and between 23ca200 and fb5e1a5.

📒 Files selected for processing (3)
  • ci/test-file-size-budget.json
  • src/lib/actions/sandbox/rebuild.ts
  • src/lib/onboard.ts
✅ Files skipped from review due to trivial changes (1)
  • ci/test-file-size-budget.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/onboard.ts

📝 Walkthrough

Walkthrough

Removes providerCredentialHashes from the SandboxEntry interface, CreatedSandboxRegistryEntryInput type, buildCreatedSandboxRegistryEntry output, registerSandbox persistence, rebuildSandbox preserved fields, and the createSandbox caller. Also resolves the sandbox image tag from stream output instead of buildId. Tests, e2e scripts, and CI size budget are updated accordingly.

Changes

Remove providerCredentialHashes from sandbox registry

Layer / File(s) Summary
SandboxEntry interface and registerSandbox storage
src/lib/state/registry.ts
Removes the providerCredentialHashes optional field from the SandboxEntry interface and stops persisting it in registerSandbox during entry reconstruction.
Registration input type, builder, and createSandbox caller
src/lib/onboard/sandbox-registration.ts, src/lib/onboard.ts
Removes providerCredentialHashes from CreatedSandboxRegistryEntryInput and buildCreatedSandboxRegistryEntry output. createSandbox now resolves the actual imageTag via resolveSandboxImageTagFromCreateOutput and drops providerCredentialHashes from the registerCreatedSandbox call.
rebuildSandbox preserved fields
src/lib/actions/sandbox/rebuild.ts
preservedRegistryFields no longer carries over providerCredentialHashes; it now conditionally preserves hermesToolGateways instead.
Unit tests, e2e scripts, and size budget
src/lib/onboard/sandbox-registration.test.ts, test/onboard-messaging.test.ts, test/e2e/test-channels-stop-start.sh, test/e2e/test-rebuild-hermes.sh, ci/test-file-size-budget.json
Removes providerCredentialHashes from unit test inputs and assertions, updates the non-interactive provider reuse assertion to check messagingChannels, removes the field from e2e registry payloads and debug output, and decrements the test file size budget by one line.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5134: Both PRs touch the extracted sandbox registration flow in src/lib/onboard/sandbox-registration.ts and registerCreatedSandbox, with this PR specifically removing providerCredentialHashes from the constructed and registered SandboxEntry.
  • NVIDIA/NemoClaw#5135: Both PRs modify the provider-credential/token preparation flow in createSandbox within src/lib/onboard.ts, where credential-related data is constructed and passed to sandbox registration.

Suggested reviewers

  • cv

Poem

🐇 Hop hop, the hashes are gone today,
No more credential trails left to stray.
The registry is lighter, the sandbox clean,
imageTag resolves from the stream unseen.
One field removed, the tests all agree —
A tidier registry, just as should be! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the primary change: removing provider credential hashes from the SandboxEntry registry object, which is the main refactoring across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/remove-provider-credential-hashes

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

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/test-file-size-budget.json`:
- Line 11: The file size budget increase for test/nemoclaw-start.test.ts in
ci/test-file-size-budget.json (from 5230 to 5231) is a legitimate change caused
by commit e865b500 but lacks documentation. Document this secondary file size
adjustment in the PR description or commit message to explain that the increase
results from the intentional change to remove provider credential hashes from
sandbox entries, clarifying to reviewers that this is an expected secondary
modification alongside the primary objective of adjusting
test/onboard-messaging.test.ts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fd1e96e8-7f21-473e-b9aa-c271b0ca8d79

📥 Commits

Reviewing files that changed from the base of the PR and between 136f656 and e865b50.

📒 Files selected for processing (9)
  • ci/test-file-size-budget.json
  • src/lib/actions/sandbox/rebuild.ts
  • src/lib/onboard.ts
  • src/lib/onboard/sandbox-registration.test.ts
  • src/lib/onboard/sandbox-registration.ts
  • src/lib/state/registry.ts
  • test/e2e/test-channels-stop-start.sh
  • test/e2e/test-rebuild-hermes.sh
  • test/onboard-messaging.test.ts
💤 Files with no reviewable changes (7)
  • src/lib/actions/sandbox/rebuild.ts
  • test/e2e/test-channels-stop-start.sh
  • test/onboard-messaging.test.ts
  • src/lib/state/registry.ts
  • src/lib/onboard/sandbox-registration.ts
  • src/lib/onboard.ts
  • src/lib/onboard/sandbox-registration.test.ts

Comment thread ci/test-file-size-budget.json Outdated
…redential-hashes

# Conflicts:
#	ci/test-file-size-budget.json
@github-code-quality

github-code-quality Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/remove-provider-... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/remove-provider-... fb5e1a5 +/-
nemoclaw/src/se...cret-scanner.ts 100%
nemoclaw/src/commands/slash.ts 100%
nemoclaw/src/li...bprocess-env.ts 100%
nemoclaw/src/bl...eprint/state.ts 98%
nemoclaw/src/onboard/config.ts 98%
nemoclaw/src/bl...int/snapshot.ts 97%
nemoclaw/src/bl...print/runner.ts 95%
nemoclaw/src/co...ration-state.ts 94%
nemoclaw/src/bl...ate-networks.ts 94%
nemoclaw/src/index.ts 94%

TypeScript / code-coverage/cli

The overall coverage in the fix/remove-provider-... branch is 44%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/remove-provider-... fb5e1a5 +/-
src/lib/state/o...oard-session.ts 90%
src/lib/inference/local.ts 77%
src/lib/sandbox/config.ts 72%
src/lib/inference/nim.ts 72%
src/lib/onboard/preflight.ts 64%
src/lib/state/sandbox.ts 55%
src/lib/actions...licy-channel.ts 52%
src/lib/onboard...er-gpu-patch.ts 50%
src/lib/policy/index.ts 49%
src/lib/onboard.ts 17%

Updated June 15, 2026 15:40 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 4 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 3 still apply, 0 new items found

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • Source-of-truth review needed: Top-level providerCredentialHashes removal from sandbox registry entries: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: normalizeSandboxEntry() and serializeSandboxEntryForDisk() preserve unknown properties by spreading the entry, and restoreSandboxEntry() restores captured entries verbatim. The diff removes direct creation/preservation sites but not the persisted source boundary.
  • Legacy providerCredentialHashes can still remain in persisted registry entries (src/lib/state/registry.ts:346): The PR removes the typed SandboxEntry field and stops new onboard/rebuild paths from writing providerCredentialHashes, but existing sandboxes.json entries that already contain the top-level field can still survive. Credential hashes are not raw tokens, but they are credential-derived metadata and can be sensitive for correlation or offline verification risks.
    • Recommendation: Scrub providerCredentialHashes at the registry source boundary, for example in normalizeSandboxEntry() and serializeSandboxEntryForDisk(), or through a focused migration helper used before save/restore. Preserve the intended nested messaging.plan.credentialBindings[].credentialHash while dropping only the legacy top-level map.
    • Evidence: normalizeSandboxEntry() returns rest or { ...entry, messaging }; serializeSandboxEntryForDisk() also spreads the entry; restoreSandboxEntry() assigns data.sandboxes[entry.name] = entry before save(). The diff removes direct providerCredentialHashes references from the type, onboarding registration, and rebuild preservation, but does not sanitize unknown legacy properties already loaded from disk.
  • No regression test proves legacy credential hashes are stripped (src/lib/state/registry.ts:346): The changed tests and E2E fixtures remove references to the top-level providerCredentialHashes field, but they do not exercise the backwards-compatibility path where an existing registry file already contains that field. That is the path most likely to keep credential-derived metadata after this cleanup.
    • Recommendation: Add targeted regression coverage for legacy registry data: load/save or update a sandboxes.json entry containing top-level providerCredentialHashes and assert it is absent on disk while messaging.plan.credentialBindings[].credentialHash is preserved. If stale-recovery restore is sanitized, add a focused test proving restoreSandboxEntry() or the rebuild rollback path does not re-persist the legacy field.
    • Evidence: The diff updates sandbox-registration.test.ts, test/onboard-messaging.test.ts, and E2E fixtures by deleting old expectations/fixture fields. Existing registry tests cover messaging serialization and update paths, but no changed test starts from an on-disk legacy top-level providerCredentialHashes property and verifies it is scrubbed.
  • Source-of-truth cleanup is incomplete for the removed registry field (src/lib/state/registry.ts:346): This PR treats providerCredentialHashes as an invalid duplicate top-level registry field, but the registry source-of-truth boundary still accepts and reserializes unknown fields. The patch removes creation sites rather than making the invalid persisted state impossible.
    • Recommendation: Define the source-of-truth behavior for legacy entries and enforce it at registry normalization/serialization or restore boundaries. If this cannot be fixed at the source in this PR, document the constraint and add regression coverage for the cleanup path and removal condition.
    • Evidence: The invalid state is existing persisted sandboxes.json data. The source boundary is registry load/save/restore. This PR already modifies registry.ts, but normalizeSandboxEntry(), serializeSandboxEntryForDisk(), updateSandbox(), and restoreSandboxEntry() can still carry the legacy top-level property forward.

🌱 Nice ideas

  • None.
Consider writing more tests for
  • **Runtime validation** — Registry load/save strips legacy top-level providerCredentialHashes from an existing sandboxes.json entry while preserving messaging.plan.credentialBindings[].credentialHash.. The behavior affects persisted registry state plus onboard/rebuild lifecycle paths. Unit-level signature changes cover new writes, but the important risk is old runtime state already on disk and recovery snapshots.
  • **Runtime validation** — updateSandbox on a legacy registry entry does not re-persist top-level providerCredentialHashes.. The behavior affects persisted registry state plus onboard/rebuild lifecycle paths. Unit-level signature changes cover new writes, but the important risk is old runtime state already on disk and recovery snapshots.
  • **Runtime validation** — restoreSandboxEntry or stale-recovery rollback drops top-level providerCredentialHashes from a captured legacy snapshot while preserving non-sensitive metadata such as hermesToolGateways and default restoration behavior.. The behavior affects persisted registry state plus onboard/rebuild lifecycle paths. Unit-level signature changes cover new writes, but the important risk is old runtime state already on disk and recovery snapshots.
  • **Runtime validation** — registerSandbox ignores providerCredentialHashes when passed a legacy-shaped entry object via an any-cast or parsed JSON shape.. The behavior affects persisted registry state plus onboard/rebuild lifecycle paths. Unit-level signature changes cover new writes, but the important risk is old runtime state already on disk and recovery snapshots.
  • **Runtime validation** — Rebuild recreate preserves hermesToolGateways and messaging credentialBindings credentialHash without reintroducing a top-level providerCredentialHashes.. The behavior affects persisted registry state plus onboard/rebuild lifecycle paths. Unit-level signature changes cover new writes, but the important risk is old runtime state already on disk and recovery snapshots.
  • **No regression test proves legacy credential hashes are stripped** — Add targeted regression coverage for legacy registry data: load/save or update a sandboxes.json entry containing top-level providerCredentialHashes and assert it is absent on disk while messaging.plan.credentialBindings[].credentialHash is preserved. If stale-recovery restore is sanitized, add a focused test proving restoreSandboxEntry() or the rebuild rollback path does not re-persist the legacy field.
  • **Acceptance clause:** Related: refactor(messaging): migrate conflict detection to manifest-plan architecture (phase 4a, #4392) #4908 — add test evidence or identify existing coverage. The deterministic review context did not include issue refactor(messaging): migrate conflict detection to manifest-plan architecture (phase 4a, #4392) #4908 body text or comments, so no literal linked-issue acceptance clauses were available to verify.
  • **Acceptance clause:** Removes the stale top-level SandboxEntry credential hash map that was reintroduced after the messaging credential binding migration. — add test evidence or identify existing coverage. The TypeScript interface, sandbox registration input/builder, onboard caller, and rebuild preservation path no longer reference providerCredentialHashes, and repo grep found no remaining literal providerCredentialHashes references. However, legacy on-disk registry entries can still retain the unknown top-level field through registry normalization/serialization and verbatim restore.
Since last review details

Current findings:

  • Source-of-truth review needed: Top-level providerCredentialHashes removal from sandbox registry entries: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: normalizeSandboxEntry() and serializeSandboxEntryForDisk() preserve unknown properties by spreading the entry, and restoreSandboxEntry() restores captured entries verbatim. The diff removes direct creation/preservation sites but not the persisted source boundary.
  • Legacy providerCredentialHashes can still remain in persisted registry entries (src/lib/state/registry.ts:346): The PR removes the typed SandboxEntry field and stops new onboard/rebuild paths from writing providerCredentialHashes, but existing sandboxes.json entries that already contain the top-level field can still survive. Credential hashes are not raw tokens, but they are credential-derived metadata and can be sensitive for correlation or offline verification risks.
    • Recommendation: Scrub providerCredentialHashes at the registry source boundary, for example in normalizeSandboxEntry() and serializeSandboxEntryForDisk(), or through a focused migration helper used before save/restore. Preserve the intended nested messaging.plan.credentialBindings[].credentialHash while dropping only the legacy top-level map.
    • Evidence: normalizeSandboxEntry() returns rest or { ...entry, messaging }; serializeSandboxEntryForDisk() also spreads the entry; restoreSandboxEntry() assigns data.sandboxes[entry.name] = entry before save(). The diff removes direct providerCredentialHashes references from the type, onboarding registration, and rebuild preservation, but does not sanitize unknown legacy properties already loaded from disk.
  • No regression test proves legacy credential hashes are stripped (src/lib/state/registry.ts:346): The changed tests and E2E fixtures remove references to the top-level providerCredentialHashes field, but they do not exercise the backwards-compatibility path where an existing registry file already contains that field. That is the path most likely to keep credential-derived metadata after this cleanup.
    • Recommendation: Add targeted regression coverage for legacy registry data: load/save or update a sandboxes.json entry containing top-level providerCredentialHashes and assert it is absent on disk while messaging.plan.credentialBindings[].credentialHash is preserved. If stale-recovery restore is sanitized, add a focused test proving restoreSandboxEntry() or the rebuild rollback path does not re-persist the legacy field.
    • Evidence: The diff updates sandbox-registration.test.ts, test/onboard-messaging.test.ts, and E2E fixtures by deleting old expectations/fixture fields. Existing registry tests cover messaging serialization and update paths, but no changed test starts from an on-disk legacy top-level providerCredentialHashes property and verifies it is scrubbed.
  • Source-of-truth cleanup is incomplete for the removed registry field (src/lib/state/registry.ts:346): This PR treats providerCredentialHashes as an invalid duplicate top-level registry field, but the registry source-of-truth boundary still accepts and reserializes unknown fields. The patch removes creation sites rather than making the invalid persisted state impossible.
    • Recommendation: Define the source-of-truth behavior for legacy entries and enforce it at registry normalization/serialization or restore boundaries. If this cannot be fixed at the source in this PR, document the constraint and add regression coverage for the cleanup path and removal condition.
    • Evidence: The invalid state is existing persisted sandboxes.json data. The source boundary is registry load/save/restore. This PR already modifies registry.ts, but normalizeSandboxEntry(), serializeSandboxEntryForDisk(), updateSandbox(), and restoreSandboxEntry() can still carry the legacy top-level property forward.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: token-rotation-e2e, rebuild-hermes-e2e, messaging-providers-e2e, channels-stop-start-hermes-e2e
Optional E2E: channels-stop-start-openclaw-e2e, rebuild-openclaw-e2e, credential-sanitization-e2e

Dispatch hint: token-rotation-e2e,rebuild-hermes-e2e,messaging-providers-e2e,channels-stop-start-hermes-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • token-rotation-e2e (high): Directly validates credential hash/rotation semantics for Telegram, Discord, and Slack across re-onboard. Removing registry-level providerCredentialHashes is most likely to regress this flow if rotation detection still depends on legacy registry metadata.
  • rebuild-hermes-e2e (high): Directly covers the touched rebuild path and touched test-rebuild-hermes.sh: a Hermes sandbox with messaging credentials is rebuilt non-interactively after host token removal, and the placeholder/config must survive without providerCredentialHashes preservation.
  • messaging-providers-e2e (high): Validates the real provider/placeholder/L7-proxy chain for token-backed messaging credentials after onboard. The PR changes what credential metadata is written at sandbox registration, so this is the broadest provider-chain smoke for the new registry shape.
  • channels-stop-start-hermes-e2e (high): Runs the touched channels stop/start E2E for Hermes, including disabling channels across rebuild and re-enabling from cached gateway credentials with no registry.providerCredentialHashes assertion.

Optional E2E

  • channels-stop-start-openclaw-e2e (high): Useful adjacent coverage for the same touched stop/start script and generic onboard/registry changes, but less directly targeted than the Hermes rebuild/messaging paths changed in this PR.
  • rebuild-openclaw-e2e (high): Optional parity check for the generic rebuild lifecycle after removing registry credential-hash preservation. The direct source/test changes focus on Hermes, so this is confidence coverage rather than merge-blocking.
  • credential-sanitization-e2e (high): Optional security-adjacent check that credential material is still sanitized and not leaked after registry credential metadata changes. The PR removes hashes rather than adding secret exposure, so this is not primary required coverage.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/nightly-e2e.yaml
  • jobs input: token-rotation-e2e,rebuild-hermes-e2e,messaging-providers-e2e,channels-stop-start-hermes-e2e

@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: token-rotation-vitest, channels-add-remove-vitest
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=token-rotation-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • token-rotation-vitest: The PR changes onboarding, registry serialization, and rebuild handling for provider credential metadata. This free-standing Vitest job directly exercises messaging credential rotation, provider reuse/rebuild decisions, and the registry credential-hash contract most affected by removing providerCredentialHashes.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=token-rotation-vitest
  • channels-add-remove-vitest: The PR changes rebuild/onboard registry fields used by messaging channel lifecycle flows. This free-standing Vitest job exercises channels add/remove followed by rebuild, including provider, policy, registry plan, and in-sandbox channel state preservation.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • src/lib/actions/sandbox/rebuild.ts
  • src/lib/onboard.ts
  • src/lib/onboard/sandbox-registration.ts
  • src/lib/state/registry.ts

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@sandl99
sandl99 marked this pull request as ready for review June 14, 2026 04:51
@sandl99 sandl99 changed the title fix(cli): remove provider credential hashes from sandbox entries refactor(messaging): clean up provider credential hashes from SandboxEntry (registry) Jun 14, 2026
@sandl99 sandl99 added refactor PR restructures code without intended behavior change area: messaging Messaging channels, bridges, manifests, or channel lifecycle v0.0.65 labels Jun 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 27488768739
Target ref: fix/remove-provider-credential-hashes
Requested jobs: channels-add-remove-e2e,rebuild-hermes-e2e,rebuild-hermes-stale-base-e2e,messaging-providers-e2e,rebuild-hermes-e2e,channels-stop-start-openclaw-e2e,channels-stop-start-hermes-e2e,token-rotation-e2e,messaging-providers-e2e,rebuild-openclaw-e2e,credential-sanitization-e2e,
Summary: 9 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
channels-add-remove-e2e ✅ success
channels-stop-start-hermes-e2e ✅ success
channels-stop-start-openclaw-e2e ✅ success
credential-sanitization-e2e ✅ success
messaging-providers-e2e ✅ success
rebuild-hermes-e2e ✅ success
rebuild-hermes-stale-base-e2e ✅ success
rebuild-openclaw-e2e ✅ success
token-rotation-e2e ✅ success

@NVIDIA NVIDIA deleted a comment from github-actions Bot Jun 14, 2026
@sandl99
sandl99 requested a review from cv June 14, 2026 05:36
@cv
cv enabled auto-merge (squash) June 15, 2026 15:32
…redential-hashes

# Conflicts:
#	ci/test-file-size-budget.json
@cv
cv merged commit 9ddad20 into main Jun 15, 2026
45 checks passed
@cv
cv deleted the fix/remove-provider-credential-hashes branch June 15, 2026 15:40
@miyoungc miyoungc mentioned this pull request Jun 16, 2026
13 tasks
cv pushed a commit that referenced this pull request Jun 17, 2026
## Summary
Refreshes release-prep documentation for NemoClaw v0.0.65.
Adds the v0.0.65 release-notes section and refreshes generated
`nemoclaw-user-*` skills from the Fern MDX source docs.

## Changes
- Added the v0.0.65 release notes to `docs/about/release-notes.mdx` with
links to the deeper docs pages for lifecycle, troubleshooting,
inference, CLI commands, messaging, credentials, network policy, Hermes,
and sub-agents.
- Regenerated the `nemoclaw-user-*` skills with
`scripts/docs-to-skills.py` so release-prep skill output matches the
merged source docs.
- Used the v0.0.65 announcement discussion as release context:
#5472.

## Source Summary
- #2492 -> `docs/about/release-notes.mdx`: Documents deadline-based
gateway wait reliability in the v0.0.65 recovery summary.
- #4958 -> `docs/about/release-notes.mdx`: Documents re-execed OpenClaw
gateway health check recovery in the sandbox recovery summary.
- #5163 -> `docs/about/release-notes.mdx`: Documents safer uninstall TTY
confirmation behavior in the day-two CLI summary.
- #5178 -> `docs/about/release-notes.mdx`: Documents fail-closed config
restore merge behavior in the rebuild and restore summary.
- #5179 -> `docs/about/release-notes.mdx`: Documents WeChat QR token
redaction in the messaging summary.
- #5182 -> `docs/about/release-notes.mdx`: Documents sustained gateway
serving checks in the recovery summary.
- #5194 -> `docs/about/release-notes.mdx`: Documents model-router
teardown during uninstall in the day-two CLI summary.
- #5195 -> `docs/about/release-notes.mdx`: Documents Shields
auto-restore lock reconfirmation in the rebuild and restore summary.
- #5198 -> `docs/about/release-notes.mdx`: Documents Docker Desktop WSL
CDI injection failure handling in the onboarding diagnostics summary.
- #5201 -> `docs/about/release-notes.mdx`: Documents sandbox
download/upload wrappers and sessions export in the day-two CLI summary.
- #5205 -> `docs/about/release-notes.mdx`: Documents reporter-owned
model metadata preservation in the rebuild and restore summary.
- #5214 -> `docs/about/release-notes.mdx`: Documents managed vLLM model
preflight before side effects in the inference setup summary.
- #5215 -> `docs/about/release-notes.mdx`: Documents managed vLLM extra
serve arguments in the inference setup summary.
- #5216 -> `docs/about/release-notes.mdx`: Documents silent OpenClaw
runtime fallback surfacing in the onboarding diagnostics summary.
- #5225 -> `docs/about/release-notes.mdx`: Documents persisted sandbox
gateway lookup in the gateway recovery summary.
- #5238 -> `docs/about/release-notes.mdx`: Documents sub-agent gateway
dial-back through the sandbox interface in the Hermes and sub-agent
summary.
- #5248 -> `docs/about/release-notes.mdx`: Documents Discord per-account
proxy resolution in the messaging summary.
- #5264 -> `docs/about/release-notes.mdx`: Documents reserved Hermes
port `8642` handling in the Hermes compatibility summary.
- #5267 -> `docs/about/release-notes.mdx`: Documents the narrower Hermes
baseline policy in the Hermes compatibility summary.
- #5321 -> `docs/about/release-notes.mdx`: Documents restored gateway
guard chains in the gateway recovery summary.
- #5328 -> `docs/about/release-notes.mdx`: Documents compact persisted
messaging plans in the messaging summary.
- #5338 -> `docs/about/release-notes.mdx`: Documents manifest channel
migration in the messaging summary.
- #5352 -> `docs/about/release-notes.mdx`: Documents persisted agent
preservation through registry recovery in the rebuild and restore
summary.
- #5371 ->
`.agents/skills/nemoclaw-user-reference/references/commands.md`:
Refreshes generated skill output for custom build cache and
layer-ordering source docs.
- #5379 -> `docs/about/release-notes.mdx`: Documents dashboard port
allocation across multiple NemoClaw gateways in the recovery summary.
- #5382 -> `docs/about/release-notes.mdx`: Documents recovery when an
active gateway has no sandbox spec in the recovery summary.
- #5389 ->
`.agents/skills/nemoclaw-user-reference/references/troubleshooting.md`:
Refreshes generated skill output for declared agent `forward_ports`
recovery source docs.
- #5400 -> `docs/about/release-notes.mdx`: Documents bounded compatible
endpoint probes in the inference setup summary.
- #5410 -> `docs/about/release-notes.mdx`: Documents provider credential
hash removal from sandbox registry entries in the messaging summary.
- #5418 -> `docs/about/release-notes.mdx`: Documents summarized
inference validation failures in the onboarding diagnostics summary.
- #5457 -> `docs/about/release-notes.mdx`: Documents context-window
recomputation after runtime model switches in the inference setup
summary.
- #5463 -> `docs/about/release-notes.mdx`: Documents cleanup of
hard-coded messaging channel stragglers in the messaging summary.

## Skipped
- #5366 matched `docs/.docs-skip` entries through skipped experimental
paths, so this PR does not add new release-note text for that commit.

## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [x] Doc only (includes code sample changes)

## Verification
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [ ] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [ ] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [ ] `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)

Verification notes:
- `npm run docs` passed after rerunning outside the sandbox. Fern
reported 0 errors and 1 hidden warning.
- The first sandboxed `npm run docs` attempt failed before validation
because `tsx` could not create its local IPC pipe under sandbox
restrictions.
- `npm run build:cli` passed before push to refresh the local `dist/`
artifacts used by the CLI typecheck hook.
- `npm test` was not run because this is a docs-only release refresh.

---
Signed-off-by: Miyoung Choi <miyoungc@nvidia.com>

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

* **New Features**
* Released NemoClaw v0.0.65 with improved gateway/sandbox recovery,
safer day-two workflows, and enhanced Hermes compatibility.
* Added managed vLLM extra-arguments configuration via
`NEMOCLAW_VLLM_EXTRA_ARGS_JSON`.
* Added Hermes troubleshooting guidance for port forwarding and health
checks.

* **Documentation**
* Updated NVIDIA Endpoints/NIM setup and examples to use
`NVIDIA_INFERENCE_API_KEY`.
* Refined NVIDIA network policy and Model Router API base configuration.
* Expanded CLI/environment variable documentation (including sub-agent
gateway connectivity) and plugin build performance tips.

* **Tests**
  * Expanded Vitest-backed E2E release validation coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
jyaunches added a commit that referenced this pull request Jun 25, 2026
## Summary
Restore issue #5800 parity package `P0-B` for merged
onboard/rebuild/lifecycle bash-suite deltas only.

## Related Issues
Refs #5800
Refs #5098
Refs #5225
Refs #5487
Refs #5410
Refs #5760

## Scope gate
- Package: `P0-B — Onboard/rebuild/lifecycle parity`
- Included PRs all merged and touched `test/e2e`: yes — #5225, #5487,
#5410, #5760
- Out of scope: unmerged/non-bash PRs; shell lane retirement / PR #5756
cleanup

## Parity map
| ID | Source PR | Contract | Inference classification | Vitest
assertion / waiver | Status |
| --- | --- | --- | --- | --- | --- |
| B1 | #5225 | Persisted sandbox-entry gateway resolution is used by
lifecycle commands. | `none` | Existing
`src/lib/actions/sandbox/sandbox-gateway-routing.test.ts`,
`src/lib/onboard/gateway-binding.test.ts`,
`src/lib/onboard/sandbox-registration.test.ts` | covered |
| B2 | #5225 | Onboard repair/double-onboard failures include captured
onboard output diagnostics. | `none` | Existing live
`test/e2e-scenario/live/onboard-repair.test.ts`,
`test/e2e-scenario/live/double-onboard.test.ts`; diagnostics are
bash-runner-only verbosity and not a durable Vitest assertion. | waived
|
| B3 | #5487 | Plain `nemoclaw onboard` auto-detects an `in_progress`
session and resumes without `--resume`; `--fresh` suppresses
auto-resume. | `hosted-compatible capable` |
`test/e2e-scenario/live/onboard-resume.test.ts` Phase 3.5 mutates the
completed session to `in_progress`, asserts `(resume mode)` + cached
skips, then asserts `--fresh` fails at injected preflight without resume
banner. | covered |
| B4 | #5410 | Rebuild resumes messaging from `messaging.plan` rather
than legacy `providerCredentialHashes`; stale top-level provider hash
state is not used. | `none` |
`test/e2e-scenario/live/rebuild-hermes.test.ts` curated registry omits
`providerCredentialHashes`;
`src/lib/onboard/machine/handlers/sandbox.test.ts` refreshes
registry-plan credential hashes from env on rebuild resume. | covered |
| B5 | #5410 | Empty/staged rebuild messaging plan is preserved and
token-backed channels are not rediscovered. | `none` | Existing
`src/lib/actions/sandbox/rebuild-messaging-stage.test.ts` and
`src/lib/onboard/machine/handlers/sandbox.test.ts`. | covered |
| B6 | #5760 | Hosted-inference/messaging rebuild and live answer
assertions tolerate model whitespace around integer `42`. |
`hosted-compatible capable` | Existing
`test/helpers/e2e-answer-assertions.test.ts`, consumed by
`agent-turn-latency`, `full-e2e`, `launchable-smoke`, and
`sandbox-operations` live Vitests. | covered |
| B7 | #5760 | Stabilized hosted inference and messaging rebuild remain
validated by live full/sandbox/launchable/rebuild targets. |
`hosted-compatible capable` | Existing live targets remain unchanged;
local live execution blocked by Docker daemon unavailable. Selective
workflow required after PR opens. | follow-up |

## Inference mode support
- Default mode for touched live targets: `hosted-compatible capable` for
onboard-resume/rebuild-hermes/full/sandbox/launchable answer paths;
`none` for unit/process registry and gateway routing tests.
- Real inference support preserved: yes for existing hosted-compatible
live targets; no new inference adapter seam added here.
- Modes validated in this PR: local unit/process Vitests only; live
hosted-compatible validation needs GitHub runner/secrets because local
Docker daemon is unavailable.
- If not validated with real inference: local
`NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project
e2e-scenarios-live test/e2e-scenario/live/onboard-resume.test.ts
test/e2e-scenario/live/rebuild-hermes.test.ts` failed at prereq Docker
daemon check before scenario assertions.

## Validation
- [x] `git diff --check`
- [x] `npm test -- src/lib/onboard/machine/handlers/sandbox.test.ts
test/helpers/e2e-answer-assertions.test.ts
src/lib/actions/sandbox/sandbox-gateway-routing.test.ts
src/lib/onboard/entry-options.test.ts
src/lib/onboard/sandbox-registration.test.ts
src/lib/actions/sandbox/rebuild-messaging-stage.test.ts`
- [x] `npm run typecheck:cli`
- [x] `npm run build:cli`
- [x] `npm run test-size:check`
- [ ] hosted-compatible selective E2E workflow: pending PR / runner
dispatch

## Follow-ups / waivers
- Waiver B2: bash-only diagnostic verbosity from #5225 is not a durable
Vitest contract; existing live tests already preserve the functional
repair/double-onboard behavior.
- Follow-up B7: dispatch selective live Vitest scenarios on GitHub
runner with Docker + hosted inference secret after PR opens.


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

## Summary by CodeRabbit

* **Tests**
* Added coverage for sandbox resume flows to verify updated Telegram
credentials are picked up when resuming a rebuild.
* Expanded end-to-end onboarding resume scenarios to confirm implicit
resume behavior, including skipped cached steps and fresh runs starting
from the expected point.
* Strengthened rebuild scenario checks to ensure curated registry
entries no longer include legacy credential-hash data.

<!-- 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
Restore issue NVIDIA#5800 parity package `P0-B` for merged
onboard/rebuild/lifecycle bash-suite deltas only.

## Related Issues
Refs NVIDIA#5800
Refs NVIDIA#5098
Refs NVIDIA#5225
Refs NVIDIA#5487
Refs NVIDIA#5410
Refs NVIDIA#5760

## Scope gate
- Package: `P0-B — Onboard/rebuild/lifecycle parity`
- Included PRs all merged and touched `test/e2e`: yes — NVIDIA#5225, NVIDIA#5487,
NVIDIA#5410, NVIDIA#5760
- Out of scope: unmerged/non-bash PRs; shell lane retirement / PR NVIDIA#5756
cleanup

## Parity map
| ID | Source PR | Contract | Inference classification | Vitest
assertion / waiver | Status |
| --- | --- | --- | --- | --- | --- |
| B1 | NVIDIA#5225 | Persisted sandbox-entry gateway resolution is used by
lifecycle commands. | `none` | Existing
`src/lib/actions/sandbox/sandbox-gateway-routing.test.ts`,
`src/lib/onboard/gateway-binding.test.ts`,
`src/lib/onboard/sandbox-registration.test.ts` | covered |
| B2 | NVIDIA#5225 | Onboard repair/double-onboard failures include captured
onboard output diagnostics. | `none` | Existing live
`test/e2e-scenario/live/onboard-repair.test.ts`,
`test/e2e-scenario/live/double-onboard.test.ts`; diagnostics are
bash-runner-only verbosity and not a durable Vitest assertion. | waived
|
| B3 | NVIDIA#5487 | Plain `nemoclaw onboard` auto-detects an `in_progress`
session and resumes without `--resume`; `--fresh` suppresses
auto-resume. | `hosted-compatible capable` |
`test/e2e-scenario/live/onboard-resume.test.ts` Phase 3.5 mutates the
completed session to `in_progress`, asserts `(resume mode)` + cached
skips, then asserts `--fresh` fails at injected preflight without resume
banner. | covered |
| B4 | NVIDIA#5410 | Rebuild resumes messaging from `messaging.plan` rather
than legacy `providerCredentialHashes`; stale top-level provider hash
state is not used. | `none` |
`test/e2e-scenario/live/rebuild-hermes.test.ts` curated registry omits
`providerCredentialHashes`;
`src/lib/onboard/machine/handlers/sandbox.test.ts` refreshes
registry-plan credential hashes from env on rebuild resume. | covered |
| B5 | NVIDIA#5410 | Empty/staged rebuild messaging plan is preserved and
token-backed channels are not rediscovered. | `none` | Existing
`src/lib/actions/sandbox/rebuild-messaging-stage.test.ts` and
`src/lib/onboard/machine/handlers/sandbox.test.ts`. | covered |
| B6 | NVIDIA#5760 | Hosted-inference/messaging rebuild and live answer
assertions tolerate model whitespace around integer `42`. |
`hosted-compatible capable` | Existing
`test/helpers/e2e-answer-assertions.test.ts`, consumed by
`agent-turn-latency`, `full-e2e`, `launchable-smoke`, and
`sandbox-operations` live Vitests. | covered |
| B7 | NVIDIA#5760 | Stabilized hosted inference and messaging rebuild remain
validated by live full/sandbox/launchable/rebuild targets. |
`hosted-compatible capable` | Existing live targets remain unchanged;
local live execution blocked by Docker daemon unavailable. Selective
workflow required after PR opens. | follow-up |

## Inference mode support
- Default mode for touched live targets: `hosted-compatible capable` for
onboard-resume/rebuild-hermes/full/sandbox/launchable answer paths;
`none` for unit/process registry and gateway routing tests.
- Real inference support preserved: yes for existing hosted-compatible
live targets; no new inference adapter seam added here.
- Modes validated in this PR: local unit/process Vitests only; live
hosted-compatible validation needs GitHub runner/secrets because local
Docker daemon is unavailable.
- If not validated with real inference: local
`NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project
e2e-scenarios-live test/e2e-scenario/live/onboard-resume.test.ts
test/e2e-scenario/live/rebuild-hermes.test.ts` failed at prereq Docker
daemon check before scenario assertions.

## Validation
- [x] `git diff --check`
- [x] `npm test -- src/lib/onboard/machine/handlers/sandbox.test.ts
test/helpers/e2e-answer-assertions.test.ts
src/lib/actions/sandbox/sandbox-gateway-routing.test.ts
src/lib/onboard/entry-options.test.ts
src/lib/onboard/sandbox-registration.test.ts
src/lib/actions/sandbox/rebuild-messaging-stage.test.ts`
- [x] `npm run typecheck:cli`
- [x] `npm run build:cli`
- [x] `npm run test-size:check`
- [ ] hosted-compatible selective E2E workflow: pending PR / runner
dispatch

## Follow-ups / waivers
- Waiver B2: bash-only diagnostic verbosity from NVIDIA#5225 is not a durable
Vitest contract; existing live tests already preserve the functional
repair/double-onboard behavior.
- Follow-up B7: dispatch selective live Vitest scenarios on GitHub
runner with Docker + hosted inference secret after PR opens.


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

## Summary by CodeRabbit

* **Tests**
* Added coverage for sandbox resume flows to verify updated Telegram
credentials are picked up when resuming a rebuild.
* Expanded end-to-end onboarding resume scenarios to confirm implicit
resume behavior, including skipped cached steps and fresh runs starting
from the expected point.
* Strengthened rebuild scenario checks to ensure curated registry
entries no longer include legacy credential-hash data.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: messaging Messaging channels, bridges, manifests, or channel lifecycle refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants