Skip to content

fix(onboard): avoid repeating completed prompts on resume - #6934

Merged
cv merged 5 commits into
mainfrom
fix/onboard-resume-completed-prompts-6743
Jul 15, 2026
Merged

fix(onboard): avoid repeating completed prompts on resume#6934
cv merged 5 commits into
mainfrom
fix/onboard-resume-completed-prompts-6743

Conversation

@sandl99

@sandl99 sandl99 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

nemoclaw onboard --resume previously repeated completed sandbox configuration prompts after a later onboarding interruption. This change checkpoints completed OpenClaw choices and registers validated web-search and messaging credentials with OpenShell before the next interruptible prompt, so resume continues at the first incomplete choice without persisting raw credentials.

Passed Test

➜  NemoClaw git:(fix/onboard-resume-completed-prompts-6743) nemoclaw onboard --resume

  NemoClaw Onboarding
  (resume mode)
  ===================

  [1/8] Preflight checks
  ──────────────────────────────────────────────────
  [resume] Skipping preflight (cached)
  ✓ Docker can start bridge containers
  ✓ Container DNS resolution works

  [2/8] Starting OpenShell gateway
  ──────────────────────────────────────────────────
  [resume] Skipping gateway (running)

  [3/8] Configuring inference (NIM)
  ──────────────────────────────────────────────────
  [resume] Skipping provider_selection (nvidia-prod / nvidia/nemotron-3-super-120b-a12b)
  [resume] Reusing sandbox name: tm.

  [4/8] Setting up inference provider
  ──────────────────────────────────────────────────
  [resume] Skipping inference (nvidia-prod / nvidia/nemotron-3-super-120b-a12b)
  [resume] Reusing Brave Search credential registered with OpenShell.

  [5/8] Messaging channels
  ──────────────────────────────────────────────────
  [resume] Reusing messaging channels: discord.

  Resource profiles:
    1) creator (cpu=50%, ram=50%)
    2) gamer (cpu=25%, ram=25%)
    3) game-developer (cpu=60%, ram=60%)
    4) developer (cpu=75%, ram=75%)
    5) custom (enter values manually)
    6) No profile (OpenShell defaults)
  Choose [6]: 

Related Issue

Fixes #6932
Part of #6743

Changes

  • Persist completion markers for sandbox name, web-search selection, messaging selection and non-secret settings, and resource profile, including explicit disabled/default choices.
  • Register a validated web-search credential after its checkpoint and before messaging; register validated messaging credentials after their checkpoint and before resource selection.
  • Create a missing provider or update an exact existing provider through the intended OpenShell gateway, recording only non-secret provider names in the session.
  • Reuse a credential only when the same session recorded successful registration and the live provider has the exact expected name, type, and credential key; otherwise reacquire the credential without reopening completed choices.
  • Keep the behavior scoped to OpenClaw; Hermes and other agents retain their prior onboarding behavior.
  • Update command, troubleshooting, credential-storage, and lifecycle documentation.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — nine-category security review: PASS, no blockers or warnings
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npm run test:changed (190 files, 1,868 tests); focused resume/credential tests; npm run typecheck:cli
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Not applicable to this path-scoped onboarding fix; changed-test, type-check, docs, hook, and guardrail gates passed.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only) — not applicable to this code-and-docs PR; build passed with 0 errors and 2 pre-existing warnings
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

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

Summary by CodeRabbit

Summary

  • New Features
    • Improved nemoclaw onboard --resume with finer-grained checkpointing for sandbox name, web search, messaging selection/config, and resource profile.
    • Messaging resume can reuse completed channel selections and credentials when bindings still match.
  • Bug Fixes
    • Hardened credential persistence: secrets are never saved; resume re-prompts credentials unless a matching successful registration can be verified.
    • Resource-profile reuse is prevented when relevant env overrides are present.
  • Documentation
    • Expanded onboarding, troubleshooting, and credential-storage docs to clarify persisted state and resume/non-interactive behavior.
  • Tests
    • Added/updated coverage for durable resume checkpoints and messaging reconciliation.

@sandl99 sandl99 added VDR Linked to VDR finding area: cli Command line interface, flags, terminal UX, or output area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression platform: dgx-spark Affects DGX Spark hardware or workflows v0.0.84 labels Jul 15, 2026
@sandl99 sandl99 self-assigned this Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 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: 9d8c834f-a24d-4e9c-a82e-42492e42e605

📥 Commits

Reviewing files that changed from the base of the PR and between deddbe1 and f23c8d8.

📒 Files selected for processing (2)
  • src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts

📝 Walkthrough

Walkthrough

Onboarding now persists secret-free checkpoints for sandbox name, web search, messaging, and resource selection. Resume reuses completed choices and exact registered provider bindings, reacquires unavailable credentials, stages providers before sandbox creation, and preserves non-secret configuration across interruptions.

Changes

Onboarding resume and credential checkpointing

Layer / File(s) Summary
Persisted checkpoint session contract
src/lib/state/onboard-session.ts, src/lib/onboard/session-bootstrap.ts, docs/reference/*, docs/security/*
Sessions persist validated prompt progress, resource profiles, and non-secret provider receipts; resume validation, clearing behavior, lifecycle contracts, and CLI guidance describe the resulting semantics.
Credential-only provider matching and staging
src/lib/onboard/credential-provider-registration.ts, src/lib/onboard/gateway-provider-metadata.ts, src/lib/onboard/messaging-prep.ts, src/lib/onboard/sandbox-messaging-preflight.ts, src/lib/onboard/sandbox-create-intent-resolution.ts, src/lib/onboard.ts
Exact provider name, type, and credential-key matching controls provider reuse, creation, updates, staging receipts, and messaging preflight behavior without persisting raw credentials.
Completed messaging checkpoint reconciliation
src/lib/onboard/machine/handlers/sandbox-messaging.ts, src/lib/onboard/messaging-channel-setup.ts, src/lib/onboard/machine/handlers/*test.ts
Resume restores durable channel selections, validates hashes or live provider bindings, preserves completed non-secret configuration, and requests only missing credentials.
Sandbox prompt and resource resume flow
src/lib/onboard/machine/handlers/sandbox.ts, src/lib/onboard/sandbox-agent.ts, src/lib/onboard.ts, src/lib/onboard/machine/handlers/*test.ts
Sandbox recreation checkpoints prompt groups in order, invalidates sandbox-bound messaging state when names change, reuses eligible resource profiles, stages providers, and propagates the credential-reuse intent.

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

Suggested labels: refactor

Suggested reviewers: cv

Sequence Diagram(s)

sequenceDiagram
  participant Operator
  participant Onboard
  participant Session
  participant OpenShell
  participant Sandbox
  Operator->>Onboard: nemoclaw onboard --resume
  Onboard->>Session: load completed prompt checkpoints
  Onboard->>OpenShell: validate staged provider bindings
  OpenShell-->>Onboard: matching bindings or credential requirements
  Onboard->>Sandbox: resolve remaining choices and create sandbox
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main resume fix and matches the PR's focus.
Linked Issues check ✅ Passed The changes checkpoint completed prompts, reuse exact validated credentials, and add tests/docs matching #6932's acceptance criteria.
Out of Scope Changes check ✅ Passed The added docs, tests, and helper refactors all support the resume-checkpointing and credential-reuse work, with no clear unrelated changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/onboard-resume-completed-prompts-6743

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

@github-code-quality

github-code-quality Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

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

TypeScript / code-coverage/cli

The overall coverage in the fix/onboard-resume-c... branch remains at 80%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main 051bb4e fix/onboard-resume-c... f23c8d8 +/-
src/lib/onboard...on-bootstrap.ts 82% 74% -8%
src/lib/onboard...ox-messaging.ts 95% 90% -5%
src/lib/onboard.ts 30% 29% -1%
src/lib/onboard...lers/sandbox.ts 96% 97% +1%
src/lib/onboard...hannel-setup.ts 87% 89% +2%
src/lib/adapter...tion-session.ts 92% 95% +3%
src/lib/onboard...andbox-agent.ts 56% 67% +11%
src/lib/actions...ge-preflight.ts 74% 89% +15%
src/lib/core/pr...mpt-activity.ts 67% 92% +25%
src/lib/onboard...registration.ts 0% 86% +86%

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: Review the warnings below.
Findings: 0 blockers · 1 warning · 0 suggestions
Status: Canonical ledger: 0 blocker(s), 1 warning(s), 0 suggestion(s).

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 fewer warning, the same number of suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, credential-sanitization, security-posture, inference-routing, network-policy, onboard-repair, onboard-resume

4 optional E2E recommendations
  • messaging-providers
  • onboard-negative-paths
  • brave-search
  • ubuntu-repo-cloud-openclaw
1 warning · 0 suggestions

Warnings

Warnings do not block.

PRA-1 Warning — Revalidate provider identity at the credential update boundary

  • Location: src/lib/onboard/credential-provider-registration.ts:145
  • Category: security
  • Problem: Staging checks an existing provider's exact name/type/credential-key binding in canRegisterCredential(), then calls upsertMessagingProviders(), whose underlying upsertProvider() checks only whether the provider exists before updating its credential. A gateway-side change between those operations can therefore cause a credential to be written to a provider that no longer has the exact binding that authorized reuse.
  • Impact: A concurrent or out-of-band gateway mutation can bypass the intended fail-closed credential-binding guarantee and attach a web-search or messaging credential to a changed provider configuration.
  • Recommendation: Make identity validation and credential mutation atomic in OpenShell if supported; otherwise re-read and compare the exact provider metadata immediately before each update/create operation and abort on any mismatch.
  • Verification: Inspect providers.upsertMessagingProviders/upsertProvider and simulate metadata changing after canRegisterCredential returns true but before the update command is issued.
  • Test coverage: Add a staged-registration test that changes an existing provider's type, credential key, or config keys between precheck and mutation and asserts no provider update command is issued.
  • Evidence: credential-provider-registration.ts filters token definitions through canRegisterCredential() before calling upsertMessagingProviders() at lines 139-148. canRegisterCredential() performs the exact metadata comparison before the later mutation at lines 118-132. providers.ts upsertProvider() bases its update/create action on providerExistsInGateway() and does not repeat the metadata comparison before invoking the command (lines 434-464).

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

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

🧹 Nitpick comments (1)
src/lib/onboard/providers.test.ts (1)

373-402: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Assert that the thrown diagnostic excludes the credential.

toThrow("...gateway rejected") still passes if the full error contains the token afterward. Capture the error and assert its message does not contain token, protecting the user-visible failure boundary.

As per path instructions, “Review tests for behavioral confidence rather than implementation lock-in.”

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

In `@src/lib/onboard/providers.test.ts` around lines 373 - 402, Update the test
around stageMessagingProvidersCreateMissingOnly to capture the thrown error,
assert its message includes the gateway rejection context, and explicitly verify
it does not contain the token. Keep the existing assertions that no
secret-bearing command or update/delete operation is attempted.

Source: Path instructions

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

Inline comments:
In `@docs/reference/commands.mdx`:
- Around line 231-235: Rewrite the new resume-rule sentences in the
documentation using direct second-person, active, present-tense wording. Address
the reader as “you” and preserve the existing semantics for prompt checkpoints,
legacy sessions, credential storage, provider validation, and interactive versus
non-interactive resume behavior.

In `@src/lib/onboard.ts`:
- Around line 3793-3818: Update stageSandboxCredentialProviders so existing
staged receipts are preserved when stageMessagingProvidersCreateMissingOnly
reports a reused provider. Clear receipts only when the provider is mismatched
or indeterminate, and continue setting them for created providers; avoid
unconditionally clearing receipts before probing.
- Line 1030: Update providerMatchesGatewayCredential in src/lib/onboard.ts at
lines 1030-1030 to require stagedCredentialProviders to contain the provider
name before applying the exact gateway metadata matcher. In
src/lib/onboard/messaging-prep.test.ts at lines 99-120, add coverage showing an
exact provider without a session receipt is not reusable, then add the receipt
and verify the provider becomes reusable.

In `@src/lib/onboard/gateway-provider-metadata.test.ts`:
- Around line 72-82: Add a test case in the
matchesGatewayCredentialOnlyProviderBinding suite using metadata with an empty
credentialKeys array, and assert that it returns false. Keep the existing
incorrect-key and multiple-key cases unchanged.

In `@src/lib/onboard/providers.ts`:
- Around line 519-635: Remove the `@ts-nocheck` suppression from providers.ts and
make the credential-staging path type-check under tsconfig.cli.json. Add
explicit types for providerCommandOutput, inspectStagedProvider,
stagedProviderCreateArgs, and stageMessagingProvidersCreateMissingOnly,
including runner results, token definitions, options, and returned collections;
resolve all resulting type errors without changing behavior.

In `@src/lib/onboard/sandbox-agent.ts`:
- Line 178: Move checkpointSandboxName(validatedSandboxName) out of the
validateName() try/catch boundary so checkpoint session-write failures propagate
as checkpoint errors rather than being reported as name-validation errors; keep
the existing validation error handling and validated-name flow unchanged.

In `@src/lib/state/onboard-session.ts`:
- Around line 381-410: The messaging progress validation in
parseSandboxPromptProgress must be tied to the recorded sandbox: pass
choices.sandboxName into parseSandboxMessagingPlan when validating
choices.messagingPlan, while preserving null handling and existing completion
checks. Add a regression test covering a messaging plan for a different sandbox
being rejected and messaging remaining incomplete.

---

Nitpick comments:
In `@src/lib/onboard/providers.test.ts`:
- Around line 373-402: Update the test around
stageMessagingProvidersCreateMissingOnly to capture the thrown error, assert its
message includes the gateway rejection context, and explicitly verify it does
not contain the token. Keep the existing assertions that no secret-bearing
command or update/delete operation is attempted.
🪄 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: c836a145-7712-459a-88a3-fe4927385347

📥 Commits

Reviewing files that changed from the base of the PR and between 55fdc3f and 1d4bb75.

📒 Files selected for processing (35)
  • docs/reference/commands.mdx
  • docs/reference/troubleshooting.mdx
  • docs/security/credential-storage.mdx
  • src/lib/onboard.ts
  • src/lib/onboard/agent-resume-state.ts
  • src/lib/onboard/gateway-provider-metadata.test.ts
  • src/lib/onboard/gateway-provider-metadata.ts
  • src/lib/onboard/lifecycle-contracts.md
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.ts
  • src/lib/onboard/machine/handlers/sandbox-route-mutation-lock.test.ts
  • src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
  • src/lib/onboard/machine/handlers/sandbox.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/messaging-channel-setup.test.ts
  • src/lib/onboard/messaging-channel-setup.ts
  • src/lib/onboard/messaging-prep.test.ts
  • src/lib/onboard/messaging-prep.ts
  • src/lib/onboard/providers.test.ts
  • src/lib/onboard/providers.ts
  • src/lib/onboard/sandbox-agent.test.ts
  • src/lib/onboard/sandbox-agent.ts
  • src/lib/onboard/sandbox-create-intent-resolution.ts
  • src/lib/onboard/sandbox-messaging-preflight.test.ts
  • src/lib/onboard/sandbox-messaging-preflight.ts
  • src/lib/onboard/session-bootstrap.test.ts
  • src/lib/onboard/session-bootstrap.ts
  • src/lib/state/onboard-session-sandbox-prompts.test.ts
  • src/lib/state/onboard-session.ts
  • test/onboard-inference-reconciliation.test.ts
  • test/onboard-messaging.test.ts
  • test/onboard.test.ts

Comment thread docs/reference/commands.mdx Outdated
Comment thread src/lib/onboard.ts Outdated
Comment thread src/lib/onboard.ts Outdated
Comment thread src/lib/onboard/gateway-provider-metadata.test.ts
Comment thread src/lib/onboard/providers.ts Outdated
Comment thread src/lib/onboard/sandbox-agent.ts Outdated
Comment thread src/lib/state/onboard-session.ts Outdated
Signed-off-by: San Dang <sdang@nvidia.com>
@sandl99

sandl99 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

Security review

Verdict: PASS — no blockers or warnings.

  1. Secrets and credentials: Raw web-search and messaging credentials remain process-only and are passed to OpenShell through the command environment, never argv or onboard-session.json.
  2. Input validation: Resume requires a same-session receipt plus an exact live provider name, type, single credential key, and no config keys. Persisted messaging plans must match the saved sandbox name.
  3. Authorization: Missing providers may be created; existing providers are updated only after an exact binding match. Mismatches are left unchanged and receive no receipt.
  4. Dependencies: No dependency or lockfile changes.
  5. Logging and errors: Provider errors retain existing redaction; new logs expose only fixed labels and non-secret provider names. Failed registration cannot create a receipt.
  6. Cryptography: No new cryptographic primitives. Existing credential hashes remain change detectors only.
  7. Secure defaults: New checkpoints default to incomplete, malformed state fails closed, and the behavior is limited to OpenClaw resume.
  8. Tests: Coverage includes secret-free serialization, missing/create/exact-update/mismatch provider paths, rejected credential validation, cross-sandbox messaging-plan rejection, and registration/lock ordering.
  9. Holistic/TOCTOU: Early provider operations are explicitly scoped to the intended gateway and run under the gateway-route mutation lock. Receipts are cleared before mutation and written only after the registration batch succeeds; create-time capabilities are rebound before materialization.

Residual informational note: OpenShell exposes credential binding metadata, not credential values, so an out-of-band value-only rotation cannot be distinguished from the previously registered value. Such a mutation already requires gateway credential-administration authority.

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

@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 `@src/lib/onboard/credential-provider-registration.ts`:
- Around line 107-117: Verify every caller of providerMatchesGatewayCredential,
especially the resume or skip-the-prompt decision path, checks that
session.stagedCredentialProviders includes the provider name before trusting the
predicate result. Add or move this same-session receipt gate into the caller if
missing, while keeping providerMatchesGatewayCredential limited to live gateway
metadata matching.
🪄 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: 1b987169-1c5e-4e6a-a53f-07ed11335ed7

📥 Commits

Reviewing files that changed from the base of the PR and between 1d4bb75 and 4fa97d4.

📒 Files selected for processing (27)
  • docs/reference/commands.mdx
  • docs/reference/troubleshooting.mdx
  • docs/security/credential-storage.mdx
  • src/lib/onboard.ts
  • src/lib/onboard/credential-provider-registration.test.ts
  • src/lib/onboard/credential-provider-registration.ts
  • src/lib/onboard/gateway-provider-metadata.test.ts
  • src/lib/onboard/lifecycle-contracts.md
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.ts
  • src/lib/onboard/machine/handlers/sandbox-route-mutation-lock.test.ts
  • src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
  • src/lib/onboard/machine/handlers/sandbox.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/messaging-prep.test.ts
  • src/lib/onboard/messaging-prep.ts
  • src/lib/onboard/sandbox-agent.test.ts
  • src/lib/onboard/sandbox-agent.ts
  • src/lib/onboard/sandbox-create-intent-resolution.ts
  • src/lib/onboard/sandbox-messaging-preflight.test.ts
  • src/lib/onboard/sandbox-messaging-preflight.ts
  • src/lib/onboard/session-bootstrap.ts
  • src/lib/onboard/types.ts
  • src/lib/state/onboard-session-sandbox-prompts.test.ts
  • src/lib/state/onboard-session.ts
🚧 Files skipped from review as they are similar to previous changes (16)
  • src/lib/onboard/machine/handlers/sandbox-route-mutation-lock.test.ts
  • src/lib/onboard/sandbox-agent.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/sandbox-messaging-preflight.ts
  • src/lib/state/onboard-session-sandbox-prompts.test.ts
  • docs/reference/commands.mdx
  • src/lib/onboard/sandbox-messaging-preflight.test.ts
  • src/lib/onboard/machine/handlers/sandbox-messaging.ts
  • src/lib/state/onboard-session.ts
  • src/lib/onboard/messaging-prep.ts
  • src/lib/onboard/gateway-provider-metadata.test.ts
  • src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
  • docs/security/credential-storage.mdx
  • src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
  • src/lib/onboard/lifecycle-contracts.md
  • src/lib/onboard/machine/handlers/sandbox.ts

Comment thread src/lib/onboard/credential-provider-registration.ts
@sandl99

sandl99 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review Advisor follow-up

I verified both findings against the full onboarding sequence and OpenShell 0.0.72.

PRA-1 — no code change

The reported null-name ordering is not reachable through a valid supported onboarding flow. The core flow always runs provider/inference before sandbox setup (core-flow-phases.ts:72-154). That phase resolves a missing sandbox name before advancing:

  • fresh, forced, or not-ready inference: provider-inference.ts:758-761
  • ready-inference resume with an incomplete sandbox: provider-inference.ts:653-658
  • ready Hermes inference: provider-inference.ts:593-597

promptValidatedSandboxName checkpoints the validated OpenClaw name before returning (sandbox-agent.ts:201-202). A completed-sandbox resume is seeded from the completed session (onboard.ts:4212-4244), and non-interactive resume without a recoverable name exits during bootstrap (session-bootstrap.ts:144-164). Existing tests cover fresh unnamed onboarding, incomplete resume, and prompt checkpointing.

The only way to reach recreateSandbox without a name is a manually inconsistent session that claims steps.sandbox.status === "complete" while storing sandboxName: null. Normal sandbox completion writes the name with the completed step. Adding recovery behavior for that corrupt-state-only case would expand #6932 and could bind saved web-search choices to a newly entered name, so I am not changing the prompt order in this PR.

PRA-2 — accepted residual warning

The check/update boundary is a real residual control-plane race, but OpenShell 0.0.72 exposes no provider-ID or expected-resource-version/compare-and-swap option for provider update. A second inspection can only narrow or detect the race; it cannot prevent a credential from first being written if another authorized gateway client replaces the provider in the command window.

This PR keeps the available containment: registration is pinned to the intended gateway, serialized under NemoClaw's gateway mutation lock, receipts are cleared before mutation and recorded only after a successful command, and credential-free resume requires both the same-session receipt and a fresh exact live name/type/credential-key match. Exploiting the remaining window requires existing authority to mutate the target OpenShell gateway.

Closing that warning atomically requires an upstream OpenShell conditional-update API. Porting the MCP inspect/mutate/inspect compensation here would add provider-ID/resource-version lifecycle machinery while retaining the underlying race, so it is outside this completed-prompt resume fix.

All E2E lanes selected by the advisor, including onboard-resume, cloud-onboard, credential-sanitization, security posture, inference routing, network policy, and onboard repair, passed on the current head.

@sandl99
sandl99 requested a review from cv July 15, 2026 13:11
@github-actions

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All selected tests passed

Run: 29420793234
Workflow ref: fix/onboard-resume-completed-prompts-6743
Requested targets: cloud-onboard,credential-sanitization,security-posture,inference-routing,network-policy,onboard-repair,onboard-resume
Requested test IDs: (default — all default-enabled tests; explicit-only tests openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 7 passed, 0 failed, 0 cancelled, 0 skipped, 0 unknown

Test Result Total wall clock time
cloud-onboard ✅ success 5m 22s
credential-sanitization ✅ success 4m 58s
inference-routing ✅ success 2m 16s
network-policy ✅ success 7m 28s
onboard-repair ✅ success 4m 38s
onboard-resume ✅ success 4m 39s
security-posture ✅ success 9m 5s

@prekshivyas prekshivyas self-assigned this Jul 15, 2026

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

Maintainer review complete for commit f23c8d8. Resume-state persistence, interruption handling, product scope, DCO, automated review, targeted tests, and the recovered E2E evidence all pass.

@cv
cv merged commit 468fade into main Jul 15, 2026
117 of 121 checks passed
@cv
cv deleted the fix/onboard-resume-completed-prompts-6743 branch July 15, 2026 16:46
cv pushed a commit that referenced this pull request Jul 16, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds the canonical `docs/changelog/2026-07-15.mdx` entry with the exact
`## v0.0.84` heading for the release candidate range from `v0.0.83`
through `710d2b36b9eebcb6bca3c2b2f796a1bdb69c3a31`.
Fills two owner-page gaps for model-aware local inference health and
pre-write OpenClaw candidate validation.

## Changes

- Add the complete shared Fern changelog entry for `v0.0.84`, with
literal CLI names and root-absolute OpenClaw and Hermes routes.
- Document that sandbox status and doctor compare the configured Ollama
or vLLM model with provider inventory without issuing a completion.
- Document that host-side OpenClaw `config set` validates the complete
candidate before replacing live config or reaching gateway restart.
- Reconcile the `v0.0.84` release label with the commit range. PR #6773
is already contained in `v0.0.83` and remains documented there; CI,
test-harness, docs-infrastructure, and `.js` to `.mts` migration-only
changes require no additional user guidance.

### Source summary

- [#6882](#6882) ->
`docs/manage-sandboxes/backup-restore.mdx`,
`docs/changelog/2026-07-15.mdx`: Explain that OpenClaw runtime identity
and pairing state are excluded from snapshots and ignored during
restore.
- [#6873](#6873) ->
`docs/inference/set-up-ollama.mdx`, `docs/changelog/2026-07-15.mdx`:
Record the Ollama requested-model environment fallback and interactive
default.
- [#6835](#6835) ->
`docs/changelog/2026-07-15.mdx`: Include the sandbox name in the
documented rebuild resume-recovery behavior.
- [#6886](#6886) ->
`docs/inference/custom-endpoint-security.mdx`,
`docs/inference/set-up-openai-compatible-endpoint.mdx`,
`docs/changelog/2026-07-15.mdx`: Explain the exact-host trusted-private
endpoint opt-in and retained SSRF boundaries.
- [#6887](#6887) ->
`docs/reference/commands.mdx`, `docs/changelog/2026-07-15.mdx`: Document
Telegram channel health verdicts, summary behavior, and exit status.
- [#6863](#6863) ->
`docs/manage-sandboxes/lifecycle.mdx`, `docs/changelog/2026-07-15.mdx`:
Add the missing model-inventory behavior for local status and doctor
checks.
- [#6902](#6902) ->
`docs/manage-sandboxes/runtime-controls.mdx`,
`docs/changelog/2026-07-15.mdx`: Add the missing pre-write OpenClaw
candidate-validation contract.
- [#6916](#6916) ->
`docs/changelog/2026-07-15.mdx`: Preserve the failed-session
fresh-install recovery correction in the release entry.
- [#6934](#6934) ->
`docs/reference/commands.mdx`, `docs/reference/troubleshooting.mdx`,
`docs/security/credential-storage.mdx`, `docs/changelog/2026-07-15.mdx`:
Summarize completed-prompt checkpointing and validated credential reuse
during OpenClaw resume.
- [#6898](#6898) ->
`docs/inference/switch-models.mdx`,
`docs/inference/switch-providers.mdx`,
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`:
Explain Hermes dashboard convergence after in-place inference changes.
- [#6711](#6711) ->
`docs/manage-sandboxes/run-sandboxes.mdx`,
`docs/manage-sandboxes/uninstall-nemoclaw.mdx`,
`docs/reference/architecture.mdx`, `docs/reference/commands.mdx`,
`docs/changelog/2026-07-15.mdx`: Summarize port-scoped host state and
uninstall preservation.
- [#6767](#6767) ->
`docs/inference/configure-model-limits.mdx`,
`docs/inference/set-up-ollama.mdx`,
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`:
Record the Hermes `64000`-token Ollama floor and unchanged OpenClaw
floor.
- [#6862](#6862) ->
`docs/get-started/quickstart.mdx`,
`docs/inference/verify-inference-route.mdx`,
`docs/changelog/2026-07-15.mdx`: Explain retryable not-ready
finalization for unhealthy inference routes.
- [#6766](#6766) ->
`docs/security/tcb-boundary.mdx`, `docs/changelog/2026-07-15.mdx`:
Document definitive stale transition-lock recovery and fail-closed
ambiguous cases.
- [#6948](#6948) ->
`docs/manage-sandboxes/manage-mcp-servers.mdx`,
`docs/changelog/2026-07-15.mdx`: Include Hermes MCP apply-state race
recovery in the release entry without changing the established user
workflow.
- [#6964](#6964) ->
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`:
Record complete agent-specific fresh-install and resume recovery
commands.
- [#6883](#6883) ->
`docs/get-started/quickstart.mdx`, `docs/inference/set-up-vllm.mdx`,
`docs/reference/platform-support.mdx`, `docs/changelog/2026-07-15.mdx`:
Summarize the DGX Station Nemotron Ultra express path and pinned
managed-vLLM recipe.
- [#6985](#6985) ->
`docs/inference/set-up-vllm.mdx`, `docs/reference/commands.mdx`,
`docs/changelog/2026-07-15.mdx`: Capture the final automated and
interactive storage-warning behavior.

## Type of Change

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

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior —
`test/changelog-docs.test.ts` validates the dated-entry structure, exact
version heading, and preserved history.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` (6 passed)
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not run for this doc-only change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors; Fern reported the unchanged unauthenticated
redirect-check and light-theme contrast warnings.
- [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)
— the native changelog entry uses the required parser-safe MDX SPDX
comment and intentionally has no frontmatter.

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


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

## Summary by CodeRabbit

* **Documentation**
* Added the v0.0.84 changelog entry covering setup, endpoint onboarding,
model handling, sandbox readiness, recovery, channel status, and
configuration safeguards.
* Clarified that sandbox health checks validate configured models
against local Ollama and vLLM provider inventories without generating
completions or consuming tokens.
* Documented that invalid runtime configuration changes are rejected
while preserving the existing working configuration.

<!-- 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: cli Command line interface, flags, terminal UX, or output area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression platform: dgx-spark Affects DGX Spark hardware or workflows VDR Linked to VDR finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nemoclaw onboard --resume repeats completed prompts

3 participants