Conversation
… rebuild (Fixes #1980) Before recreating an existing sandbox, copy its applied policies from the registry into the onboard session. After the new sandbox comes up, the policy setup step reads those recorded presets and reapplies them instead of reverting to the tier defaults. Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change modifies the onboarding flow to preserve user-selected policy presets when a sandbox is recreated. When Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
ericksoa
left a comment
There was a problem hiding this comment.
Looks good — clean, focused fix for a real user-facing bug. Changes #1 (save presets before destroy) and #2 (reload session) are solid, and the test covers the target scenario well.
One minor thing to double-check: the simplified gating logic (removing the resume and status !== "complete" guards) is correct for the recreate path, but make sure setupPoliciesWithSelection handles the case where it receives selectedPresets during a normal resume where policies are already complete — just so it doesn't re-prompt or reapply unnecessarily.
Side note: issue #1980 has an NVBugs reference ([NVB# 6087043]) in the body on public GitHub — might want to ask the filer to edit that out.
I think this function will only be executed if no policies have been applied, and I dropped it because I loaded the latest session before any guards. So I think it should contain the latest policy presets, and hence the |
… rebuild (Fixes #1980)
Before recreating an existing sandbox, copy its applied policies from the registry into the onboard session. After the new sandbox comes up, the policy setup step reads those recorded presets and reapplies them instead of reverting to the tier defaults.
Summary
Related Issue
Changes
Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)AI Disclosure
Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
Release Notes