refactor(onboard): share provider sandbox phase handoff#5941
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRemoves duplicate provider-to-sandbox phase assembly by delegating core onboarding flow setup to shared phase factories. The provider and sandbox transitions now pass handler-produced context through directly, and tests were updated to cover the propagated context across the handoff. ChangesProvider-to-sandbox phase consolidation
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the branch is 96%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the branch is 68%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
Selective E2E Results — ✅ All requested jobs passedRun: 28332122143
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Review follow-up for the Nemotron findings:
Verification after the follow-up: 4 targeted files / 29 tests passed, |
Selective E2E Results — ✅ All requested jobs passedRun: 28332394125
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Final review follow-up:
Post-follow-up verification: 4 files / 31 tests passed, CLI typecheck passed, and complete commit/push hooks passed. The PR remains 23 lines smaller overall and 42 production lines smaller. |
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Additional consolidation follow-up in
The compatibility bridge finding remains unrelated to this diff: Verification: 4 files / 30 tests passed, CLI typecheck passed, and complete commit/push hooks passed. The final diff remains 7 lines smaller overall and 42 production lines smaller. |
Selective E2E Results —
|
| Job | Result |
|---|---|
| onboard-resume-e2e |
There was a problem hiding this comment.
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/machine/flow-sequence.test.ts`:
- Line 254: The test is asserting the default sandboxGpuConfig value already
seeded by context(), so it does not verify the provider-to-sandbox handoff in
flow-sequence.test.ts. Update the relevant test setup in the flow sequence
scenario to override the fixture with a distinct sentinel sandboxGpuConfig
value, then assert that exact value through the public boundary. Use the
existing context() helper and the provider/sandbox handoff path in this test to
ensure the observed config comes from the handler output, not the initial
fixture.
🪄 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: f921774a-f0ee-4272-8628-d4859f03c7a5
📒 Files selected for processing (2)
src/lib/onboard/machine/flow-phases/provider-sandbox.test.tssrc/lib/onboard/machine/flow-sequence.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/onboard/machine/flow-phases/provider-sandbox.test.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 28332841685
|
Selective E2E Results — ✅ All requested jobs passedRun: 28333089681
|
Summary
Routes both onboarding provider/sandbox assembly paths through the existing shared phase factories and carries the fully narrowed context across that boundary. The refactor deletes duplicate field projection and assertion code while consolidating boundary coverage, finishing with 6 fewer lines overall and 42 fewer production lines.
Related Issue
Closes #5938
Changes
createProviderInferencePhase()andcreateSandboxPhase().Type of Change
Quality Gates
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com