Skip to content

feat(onboard): make configuration review editable - #9037

Open
prekshivyas wants to merge 3 commits into
mainfrom
agent/onboard-review-boundary
Open

feat(onboard): make configuration review editable#9037
prekshivyas wants to merge 3 commits into
mainfrom
agent/onboard-review-boundary

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replace the onboarding review's yes/no confirmation with an explicit action menu so users can correct the inference provider/model or sandbox name before applying the configuration. This is the first small replacement slice after #8171: provider registration and sandbox materialization remain behind Apply configuration, while web search, messaging, resources, policy, and general post-Apply editing remain out of scope.

Related Issue

Part of #6005

Tracks NVBug 6392526.

Changes

  • Add typed review actions for Apply configuration, Edit inference provider or model, Edit sandbox name, and Exit onboarding using the existing prompt-helper module.
  • Return inference edits to provider/model selection, preserve the sandbox name, and clear the discarded selection's staged credential before collecting a replacement.
  • Re-prompt sandbox-name edits with the prior name as the default while preserving the inference selection.
  • Keep non-interactive behavior unchanged and stop Exit before new provider registration or inference setup.
  • Preserve the existing post-Apply inference-failure recovery path: if setup offers back, users can select a provider/model again and review the updated configuration.
  • Update the OpenClaw, Hermes, Deep Agents, and command-reference documentation to describe the exact boundary and remove the inaccurate “back at any prompt” claim.

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 — reviewer/approval link/justification: Exact-head review passed. No raw credential values are persisted or logged; discarded staged credential env is cleared in finally on edit and Exit; existing provider, model, and sandbox validators remain authoritative; provider registration and sandbox materialization remain behind Apply; no authentication, authorization, dependency, cryptography, network-policy, or security-header behavior changes; focused and broad tests cover action parsing, state transitions, cleanup ordering, preservation, Exit, resume, and non-interactive behavior.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: Reviewed docs/get-started/quickstart.mdx, docs/get-started/quickstart-hermes.mdx, docs/get-started/quickstart-langchain-deepagents-code.mdx, and docs/reference/commands.mdx against the exact implementation; confirmed the four actions, credential cleanup, preserved selections, resumable interrupted-review checkpoint, non-interactive and Exit behavior, and the post-Apply inference-failure recovery exception; generated OpenClaw, Hermes, and Deep Agents command references were verified; npm run docs passed with 0 errors and 2 existing Fern warnings.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

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 validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run --project cli for the five focused onboarding suites passed 68/68; npm run build:cli, npm run typecheck:cli -- --incremental, npm run lint, git diff --check, and npm run docs passed on the rebased head.
  • Applicable broad gate passed — npx vitest run --changed origin/main --project cli --project plugin --project e2e-support --maxWorkers=4 passed 1,808/1,808 tests across 152 files.
  • 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)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

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

Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
@prekshivyas prekshivyas self-assigned this Aug 13, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 13, 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 Aug 13, 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: 922f97ab-488c-4154-9692-5dfda4d754c0

📥 Commits

Reviewing files that changed from the base of the PR and between 845bd55 and 224e4d5.

📒 Files selected for processing (6)
  • src/lib/onboard.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/provider-inference-route-containment.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.test-support.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/machine/handlers/provider-review-recovery.test.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/lib/onboard/machine/handlers/provider-inference-route-containment.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.test-support.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/provider-review-recovery.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts

📝 Walkthrough

Walkthrough

The onboarding flow replaces the confirmation prompt with a four-action configuration review. It supports applying, editing inference settings, editing the sandbox name, or exiting. It preserves or clears staged state and supports recovery after inference setup failures.

Changes

Onboarding configuration review

Layer / File(s) Summary
Configuration review prompt contract
src/lib/onboard/prompt-helpers.ts, src/lib/onboard/prompt-helpers.test.ts, src/lib/onboard/sandbox-agent.ts, src/lib/onboard/sandbox-agent.test.ts
Adds typed review actions, input aliases, defaults, invalid-input retries, and previous sandbox-name support.
Provider review and recovery flow
src/lib/onboard.ts, src/lib/onboard/machine/handlers/provider-inference.ts, src/lib/onboard/machine/handlers/*test*
Wires the generic prompt into provider setup. Editing inference clears the discarded credential and reselects inference. Editing the sandbox name preserves inference settings.
Onboarding documentation alignment
docs/get-started/*.mdx, docs/reference/commands.mdx
Documents review actions, state handling, recovery, exit behavior, and non-interactive execution.

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

Mergeability Score: ⚪ Minimal · up to 224e4

The configuration review changes are merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Sequence Diagram(s)

sequenceDiagram
  participant OnboardingFlow
  participant reviewProviderConfiguration
  participant promptOnboardConfigurationReview
  participant ProviderSetup

  OnboardingFlow->>reviewProviderConfiguration: submit provider, model, credential, and sandbox
  reviewProviderConfiguration->>promptOnboardConfigurationReview: request review action
  promptOnboardConfigurationReview-->>reviewProviderConfiguration: return action

  alt apply
    reviewProviderConfiguration->>ProviderSetup: continue inference setup
  else edit inference
    reviewProviderConfiguration->>ProviderSetup: reselect provider and model
    ProviderSetup-->>reviewProviderConfiguration: return updated inference
  else edit sandbox name
    reviewProviderConfiguration-->>OnboardingFlow: prompt with previous name
  else exit
    reviewProviderConfiguration-->>OnboardingFlow: clear staged choices and exit
  end
Loading

Possibly related PRs

Suggested labels: area: onboarding, feature

Suggested reviewers: cv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% 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
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the onboarding configuration review editable.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/onboard-review-boundary

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

@github-actions

Copy link
Copy Markdown
Contributor

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

github-code-quality Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 224e4d5 in the agent/onboard-review... branch remains at 96%, unchanged from commit 0810a95 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 224e4d5 in the agent/onboard-review... branch remains at 82%, unchanged from commit a774d0a in the main branch.

Show a code coverage summary of the most impacted files.
File main a774d0a agent/onboard-review... 224e4d5 +/-
src/lib/onboard...file-builder.ts 95% 91% -4%
src/lib/onboard...-transaction.ts 94% 92% -2%
src/lib/actions...ild-pipeline.ts 96% 95% -1%
src/lib/onboard...er-inference.ts 96% 96% 0%
src/lib/actions...light-guards.ts 87% 87% 0%
src/lib/inference/config.ts 98% 98% 0%
src/lib/sandbox...rce-identity.ts 85% 85% 0%
src/lib/sandbox...rsion-scheme.ts 100% 100% 0%
src/lib/onboard...andbox-agent.ts 67% 68% +1%
src/lib/onboard...ompt-helpers.ts 59% 67% +8%

Updated August 13, 2026 22:16 UTC

@prekshivyas
prekshivyas requested a review from cv August 13, 2026 21:33
@prekshivyas prekshivyas added the v0.0.109 Release target label Aug 13, 2026
@prekshivyas
prekshivyas marked this pull request as ready for review August 13, 2026 21:35
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

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

Advisory only. These are normalized differences from the primary terminology receipt.

  • Apply configuration at src/lib/onboard/prompt-helpers.ts:72: primary classified it as define; the second opinion classified it as justified.
  • configuration review at src/lib/onboard/prompt-helpers.test.ts:37: selected only by the second-opinion lane as established.
  • Edit inference at src/lib/onboard/prompt-helpers.ts:58: selected only by the second-opinion lane as justified.
  • Exit onboarding at src/lib/onboard/prompt-helpers.ts:75: selected only by the second-opinion lane as justified.
  • Edit sandbox at src/lib/onboard/prompt-helpers.ts:59: selected only by the second-opinion lane as justified.

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

3 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • define — Apply configuration at src/lib/onboard/prompt-helpers.ts:72: Use Apply configuration only for the review action that continues to provider registration.
  • established — staged credential at docs/get-started/quickstart.mdx:327: Keep staged credential for a credential that remains in process memory before registration.
  • justified — routine editing at docs/reference/commands.mdx:574: Retain the modifier when distinguishing pre-application review edits from inference-failure recovery.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite for the commit under review.

Recommended E2E: managed-image-protected-runtime, inference-routing

Manual-only E2E: cloud-onboard, managed-image-multiarch-startup, onboard-repair, onboard-resume, network-policy
The manual PR workflow does not run these selectors for the commit under review. Run them from reviewed code on main.

1 optional E2E recommendation
  • double-onboard

Workflow run details

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

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

cv commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Maintainer review: this PR cannot pass the product-scope gate.

Issue #6005 remains labeled needs: design. Its design audit requires a secret-free draft and no provider, Docker, gateway, or filesystem mutation before Review and Apply.

The commit under review does not preserve that boundary:

As a result, Edit inference or Exit onboarding can leave host runtime or checkpoint effects from a discarded selection. Moving these effects after Review and Apply requires the broader draft and materialization refactor described in the issue audit. That refactor would materially change this PR's narrow intent, so I am skipping this PR instead of pushing that redesign onto its branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.109 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants