Repository navigation
refactor(onboard): route token download through transfer adapter - #11829
Conversation
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
|
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (4)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe change routes onboarding token downloads through the OpenShell transfer adapter and adds output suppression. Dashboard URL, gateway-token, readiness, and finalization paths now support asynchronous dependencies. Tests update mocks and assertions for promise-based execution. ChangesOnboarding transfer and asynchronous command flow
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The onboarding transfer migration retains its intended asynchronous completion and cleanup behavior in the supplied evidence. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 08ad9ec in the TypeScript / code-coverage/cliThe overall line coverage in commit 08ad9ec in the Show a line coverage summary of the most impacted files.
Updated |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
kaofelix
left a comment
There was a problem hiding this comment.
Reviewed commit 08ad9ec. No security or correctness findings. The typed transfer path preserves selected-gateway routing, suppresses credential download output, removes temporary credential files before resource release, and awaits all asynchronous callers. Focused CLI tests and CLI type-check passed; focused integration coverage passed except for one unrelated local port-8080 conflict.
<!-- markdownlint-disable MD041 --> ## Outcome OpenShell inference route reads now flow through one typed observer for the accepted first slice of #9809. Existing gateway targeting, native lifecycle behavior, list/status redaction, and external command behavior remain unchanged. ## Reason Inference consumers independently constructed `openshell inference get` commands and interpreted raw CLI results. Centralizing the read boundary gives each consumer the same scoped, typed, and redacted observation without changing mutation or recovery behavior. ### Related issues Refs #9809 ## Changes - Add typed configured and unconfigured observations plus distinct validation, authentication, timeout, schema, transport, and command failures. - Keep named-gateway scoping, bounded capture, control-sequence cleanup, endpoint-override refusal, and the base gateway's legacy output compatibility inside the OpenShell adapter. - Migrate the accepted CLI, onboarding, connect, readiness, doctor, inventory, status, and config-export readers to typed results. - Remove the superseded production reader and protect the boundary with adapter and consumer tests. Route mutation and rollback (#11738), plugin transport (#9813), generated gRPC transport (#9828), credentials, provider or gateway lifecycle changes, new routing semantics, status lifecycle suppression, and live E2E remain excluded. ## Verification - `NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli` — passed. - `npm run checks:repository` — all 19 repository checks passed with no architecture cycles. - Focused CLI unit selection — 16 files and 377 tests passed, covering the adapter and migrated source consumers. - Focused integration selection — 8 files and 157 tests passed; the status JSON integration suite passed 21/21. - `npm run test:changed` — 3,182 tests passed. The route-observation acceptance set is complete with no candidate-owned failure. Two process-heavy suites were classified environmental after focused replay; `snapshot-auto-create-failure` passed 4/4 unchanged and `runtime-provider-contract` passed 75/75 with a 15-second local diagnostic timeout. - The remaining launch group was classified inherited: 18 cases fail with the same sandbox-replacement journaling error on this candidate and on exact base `3c6591ddba4a321ab8e6b766203e44d6e3b8002e`; this PR changes none of the three owning launch/probe files. - Commit hooks passed, including repository structure, formatting, lint, tests selected by the commit, DCO, and secret checks. - The diff contains no secrets, API keys, or credentials. No live E2E is required because the accepted behavior is fully observable at deterministic adapter and consumer boundaries and does not mutate external state. ## Review notes Sensitive inference and onboarding paths are changed. Pre-publication review covered exact gateway targeting, refusal of endpoint overrides, bounded capture, typed failure separation, redaction, current lifecycle ownership, and the criterion-to-evidence ledger. The refreshed head still requires exact-head CodeRabbit, PR Review Advisor, CI, and human approval before merge. The current-main refresh incorporates related lifecycle and test-contract changes from #11741, #11776, #11792, #11821, #11829, #11865, #11889, #11891, #11908, and #11913 without expanding this PR's behavior. Accepted scope: #9809 (comment) --- Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added structured inference-route checks for configured and unconfigured gateways. - Improved support for named gateways and provider/model verification. - Added clearer handling for timeouts, authentication, connectivity, validation, and schema errors. - Improved sandbox connection, launch readiness, status, onboarding, and recovery flows with verified route information. - **Bug Fixes** - Prevented untrusted or unavailable inference routes from being treated as healthy. - Added recovery guidance and preserved relevant failure details when restoration cannot be confirmed. - **Documentation** - Documented inference-route behavior, gateway scoping, sanitization, timeouts, and error reporting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Signed-off-by: San Dang <sdang@nvidia.com> Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com> Co-authored-by: San Dang <sdang@nvidia.com>
Outcome
Onboarding now reads the OpenClaw gateway token through the typed asynchronous sandbox-transfer adapter while preserving the existing dashboard URL and terminal output. Failed, interrupted, or partial downloads still produce the prior token-free fallback, and temporary credential files are removed before transfer resources are released.
Reason
Issue #11497 is migrating direct sandbox transfer subprocesses to the shared typed adapter. The onboarding token download was the remaining consumer after session export migrated separately.
Related issues
Closes #11497
Refs #9813
Changes
OpenShellSandboxTransferExecutorusing the currently selected gateway.Verification
npx vitest run --project integration test/onboarding/onboard-dashboard.test.ts --pool=forks --maxWorkers=1, 17 tests, passed.npx vitest run --project integration test/onboarding/onboard-inference-reconciliation.test.ts --pool=forks --maxWorkers=1, 25 tests, passed.HOME.NODE_OPTIONS=--max-old-space-size=8192 npm run typecheck:cli, passed.npm run build:cli, passed.08ad9ecef63a53cacc90a6d1866fbcdc7a0c1a7a.Review notes
Repository:
NVIDIA/NemoClaw. Candidate:08ad9ecef63a53cacc90a6d1866fbcdc7a0c1a7a. Sensitive paths includesrc/commands/sandbox/**andsrc/lib/onboard/**. No pre-publication specialist review is available:npm run review:localwas attempted on the same behavior diff, but its ephemeral OpenShell gateway refused connections during reviewer setup. These paths await independent review.Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com
Summary by CodeRabbit