refactor(onboard): resolve create intent before mutation#6742
Conversation
|
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:
📝 WalkthroughWalkthroughThe onboarding flow resolves a complete secret-free sandbox create intent before destructive effects, validates capabilities, materializes the plan, and applies extra-provider cleanup separately. Machine handlers, lifecycle contracts, policy handling, and boundary tests were updated. ChangesSandbox create boundary
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant OnboardingMachine
participant IntentResolver
participant PlanMaterializer
participant ProviderRegistry
participant Sandbox
OnboardingMachine->>IntentResolver: resolve complete create intent
IntentResolver-->>OnboardingMachine: return resolved capabilities
OnboardingMachine->>PlanMaterializer: validate and materialize intent
OnboardingMachine->>ProviderRegistry: apply stale-provider reconciliation
PlanMaterializer->>Sandbox: create sandbox
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/lib/onboard/machine/handlers/sandbox-recreate-resume.test.ts (1)
84-90: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winFragile positional-index mock assertion.
createSandboxCall[14]combined with theas unknown[]cast discards type safety and hardcodes the argument position. If a new positional parameter is ever inserted before this increateSandbox, this index silently drifts. Prefer.at(-1)(as used insandbox-create-intent-boundary.test.ts) to reliably target the trailing options object regardless of positional-argument count.♻️ Suggested fix
- const createSandboxCall = calls.createSandbox.mock.calls[0] as unknown[]; - expect(createSandboxCall[14]).toMatchObject({ + const createSandboxCall = calls.createSandbox.mock.calls[0]; + expect(createSandboxCall.at(-1)).toMatchObject({ extraProviders: [], recreate: true, resolved: expect.objectContaining({ staleExtraProviders: ["stale-extra-provider"] }), });As per path instructions for
**/*.test.{ts,js,mts,mjs,cts,cjs}: "Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions."🤖 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/machine/handlers/sandbox-recreate-resume.test.ts` around lines 84 - 90, Update the createSandbox mock assertion in the sandbox recreate resume test to use the trailing call argument via .at(-1), matching the established pattern in sandbox-create-intent-boundary.test.ts. Remove the positional index and unknown[] cast while preserving the existing options-object expectations.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 `@src/lib/onboard.ts`:
- Around line 3759-3761: Make messagingPreflightDeps.gatewayName in runOnboard
resolve GATEWAY_NAME lazily at call time rather than capturing its module-scope
startup value. Update the dependency contract and Slack pre-enable conflict hook
usage as needed to invoke the getter, preserving the current gateway value after
rebuild or resume paths reassign GATEWAY_NAME.
In `@src/lib/onboard/extra-provider-reconciliation.ts`:
- Around line 220-227: Remove the exported reconcileRegisteredExtraProviders
wrapper and its re-export from sandbox-provider-cleanup.ts, updating tests to
call planRegisteredExtraProviders and applyExtraProviderReconciliation directly.
If compatibility requires retaining the wrapper, document its purpose and add a
clear retirement note.
---
Nitpick comments:
In `@src/lib/onboard/machine/handlers/sandbox-recreate-resume.test.ts`:
- Around line 84-90: Update the createSandbox mock assertion in the sandbox
recreate resume test to use the trailing call argument via .at(-1), matching the
established pattern in sandbox-create-intent-boundary.test.ts. Remove the
positional index and unknown[] cast while preserving the existing options-object
expectations.
🪄 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: 4c49cb4e-d13c-412e-8bca-85ad6871ae00
📒 Files selected for processing (22)
src/lib/onboard.tssrc/lib/onboard/extra-provider-reconciliation.test.tssrc/lib/onboard/extra-provider-reconciliation.tssrc/lib/onboard/lifecycle-contracts.mdsrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-recreate-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.tssrc/lib/onboard/sandbox-provider-cleanup.tssrc/lib/onboard/types.tstest/onboard-pre-destructive-intent.test.tstest/onboard-prepared-build-context.test.ts
762e172 to
e43be18
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
src/lib/onboard/sandbox-messaging-preflight.test.ts (1)
247-247: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the conflict outcome, not the getter call count.
toHaveBeenCalledOnce()couples the test to the current implementation and can reject valid refactors without changing public behavior. Rely on the existing observable conflict result instead; make the returned gateway affect that result rather than asserting invocation count.🤖 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/sandbox-messaging-preflight.test.ts` at line 247, Update the test around the gateway conflict scenario to assert the existing observable conflict result instead of deps.gatewayName invocation count. Configure the returned gateway value from deps.gatewayName so it drives the expected conflict outcome, and remove the toHaveBeenCalledOnce assertion to keep the test independent of implementation details.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 `@src/lib/onboard/machine/core-flow-phases.test.ts`:
- Around line 211-238: Update the resolveSandboxCreateIntent mock in
core-flow-phases.test.ts to accept and return staleExtraProviders from its input
instead of always using an empty list. Add a test case with a non-empty
stale-provider list and assert that the machine preserves it through deferred
cleanup.
In `@test/onboard-pre-destructive-intent.test.ts`:
- Around line 103-109: Update the child environment setup in the test that
invokes createSandbox() to remove all inherited DISCORD_* and TELEGRAM_*
variables before spawning the helper, while preserving the existing HOME and
NEMOCLAW_* overrides. Ensure locally configured messaging credentials cannot
influence provider selection or stale-binding validation.
- Around line 100-110: Bound the synchronous child process in the spawnSync
invocation within the onboarding test by adding a per-call timeout below
Vitest’s 60-second limit, such as 55,000 milliseconds, so stalled onboarding
fails fast.
---
Nitpick comments:
In `@src/lib/onboard/sandbox-messaging-preflight.test.ts`:
- Line 247: Update the test around the gateway conflict scenario to assert the
existing observable conflict result instead of deps.gatewayName invocation
count. Configure the returned gateway value from deps.gatewayName so it drives
the expected conflict outcome, and remove the toHaveBeenCalledOnce assertion to
keep the test independent of implementation details.
🪄 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: 55549532-1e3d-4135-9b0a-00fc5d19da48
📒 Files selected for processing (24)
src/lib/onboard.tssrc/lib/onboard/extra-provider-reconciliation.test.tssrc/lib/onboard/extra-provider-reconciliation.tssrc/lib/onboard/lifecycle-contracts.mdsrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-recreate-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.tssrc/lib/onboard/sandbox-messaging-preflight.test.tssrc/lib/onboard/sandbox-messaging-preflight.tssrc/lib/onboard/sandbox-provider-cleanup.tssrc/lib/onboard/types.tstest/onboard-pre-destructive-intent.test.tstest/onboard-prepared-build-context.test.ts
🚧 Files skipped from review as they are similar to previous changes (20)
- src/lib/onboard/sandbox-provider-cleanup.ts
- src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
- src/lib/onboard/types.ts
- src/lib/onboard/extra-provider-reconciliation.test.ts
- src/lib/onboard/machine/handlers/sandbox-dcode-selection.test.ts
- src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
- test/onboard-prepared-build-context.test.ts
- src/lib/onboard/machine/handlers/sandbox.test.ts
- src/lib/onboard/sandbox-create-intent-resolution.ts
- src/lib/onboard/machine/handlers/sandbox-recreate-resume.test.ts
- src/lib/onboard/sandbox-create-intent.ts
- src/lib/onboard/lifecycle-contracts.md
- src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
- src/lib/onboard/sandbox-create-intent-types.ts
- src/lib/onboard/extra-provider-reconciliation.ts
- src/lib/onboard/sandbox-create-plan-materialization.ts
- src/lib/onboard/sandbox-create-plan.ts
- src/lib/onboard.ts
- src/lib/onboard/sandbox-create-plan.test.ts
- src/lib/onboard/machine/handlers/sandbox.ts
e43be18 to
01e1e3f
Compare
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/handlers/sandbox.ts`:
- Around line 641-654: Update the outer CompleteSandboxCreateIntent construction
near the resolved sandbox creation flow so policyTier preserves an explicit null
authoritativePolicyTier, distinguishing it from undefined. Replace the
truthy-based handling with an undefined-only check, while retaining the existing
resolved policy tier fallback for unmanaged configurations.
🪄 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: f300fe87-3d8b-4789-96ff-caa1f5b52d4a
📒 Files selected for processing (24)
src/lib/onboard.tssrc/lib/onboard/extra-provider-reconciliation.test.tssrc/lib/onboard/extra-provider-reconciliation.tssrc/lib/onboard/lifecycle-contracts.mdsrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-recreate-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.tssrc/lib/onboard/sandbox-messaging-preflight.test.tssrc/lib/onboard/sandbox-messaging-preflight.tssrc/lib/onboard/sandbox-provider-cleanup.tssrc/lib/onboard/types.tstest/onboard-pre-destructive-intent.test.tstest/onboard-prepared-build-context.test.ts
🚧 Files skipped from review as they are similar to previous changes (19)
- src/lib/onboard/types.ts
- src/lib/onboard/sandbox-provider-cleanup.ts
- src/lib/onboard/extra-provider-reconciliation.test.ts
- src/lib/onboard/sandbox-messaging-preflight.test.ts
- src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
- test/onboard-prepared-build-context.test.ts
- src/lib/onboard/sandbox-messaging-preflight.ts
- src/lib/onboard/machine/handlers/sandbox-dcode-selection.test.ts
- src/lib/onboard/sandbox-create-intent-resolution.ts
- src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
- src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
- src/lib/onboard/extra-provider-reconciliation.ts
- src/lib/onboard/lifecycle-contracts.md
- src/lib/onboard/sandbox-create-intent-types.ts
- src/lib/onboard/sandbox-create-plan.ts
- src/lib/onboard/sandbox-create-plan-materialization.ts
- src/lib/onboard/sandbox-create-plan.test.ts
- src/lib/onboard/machine/handlers/sandbox.test.ts
- src/lib/onboard.ts
01e1e3f to
dced8eb
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts (1)
10-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReset the shared module mock between tests.
detectMessagingChannelsFromEnvis a module-scopedvi.fn; addbeforeEach(() => vi.clearAllMocks())(or equivalent) so call history and future implementation changes cannot leak between cases.🤖 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/machine/handlers/sandbox-create-intent-boundary.test.ts` around lines 10 - 12, Reset the shared detectMessagingChannelsFromEnv mock before each test by adding a beforeEach hook that clears all mocks. Keep the existing mock setup unchanged and ensure both call history and mock implementations are isolated between test cases.Source: Coding guidelines
🤖 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/handlers/sandbox-create-intent-boundary.test.ts`:
- Around line 40-71: Strengthen the test around handleSandboxState so each
captured create intent is validated as complete before cross-variant
comparisons: assert all required intent fields, confirm it is serializable, and
verify it contains no credential-bearing values. Keep the existing equality
checks between fresh and resumed intents after these per-intent assertions.
---
Nitpick comments:
In `@src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts`:
- Around line 10-12: Reset the shared detectMessagingChannelsFromEnv mock before
each test by adding a beforeEach hook that clears all mocks. Keep the existing
mock setup unchanged and ensure both call history and mock implementations are
isolated between test cases.
🪄 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: d7b6599a-b5d9-42c6-9d68-7ad741e07d7e
📒 Files selected for processing (24)
src/lib/onboard.tssrc/lib/onboard/extra-provider-reconciliation.test.tssrc/lib/onboard/extra-provider-reconciliation.tssrc/lib/onboard/lifecycle-contracts.mdsrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-recreate-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.tssrc/lib/onboard/sandbox-messaging-preflight.test.tssrc/lib/onboard/sandbox-messaging-preflight.tssrc/lib/onboard/sandbox-provider-cleanup.tssrc/lib/onboard/types.tstest/onboard-pre-destructive-intent.test.tstest/onboard-prepared-build-context.test.ts
🚧 Files skipped from review as they are similar to previous changes (22)
- src/lib/onboard/sandbox-provider-cleanup.ts
- src/lib/onboard/machine/handlers/sandbox-dcode-selection.test.ts
- src/lib/onboard/extra-provider-reconciliation.test.ts
- src/lib/onboard/machine/handlers/sandbox-recreate-resume.test.ts
- src/lib/onboard/sandbox-messaging-preflight.ts
- src/lib/onboard/sandbox-messaging-preflight.test.ts
- src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
- src/lib/onboard/types.ts
- src/lib/onboard/sandbox-create-intent.ts
- src/lib/onboard/lifecycle-contracts.md
- src/lib/onboard/sandbox-create-intent-types.ts
- src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
- src/lib/onboard/machine/core-flow-phases.test.ts
- src/lib/onboard/sandbox-create-plan.ts
- src/lib/onboard/machine/handlers/sandbox.test.ts
- test/onboard-prepared-build-context.test.ts
- src/lib/onboard.ts
- src/lib/onboard/sandbox-create-intent-resolution.ts
- src/lib/onboard/sandbox-create-plan-materialization.ts
- src/lib/onboard/extra-provider-reconciliation.ts
- src/lib/onboard/sandbox-create-plan.test.ts
- src/lib/onboard/machine/handlers/sandbox.ts
Signed-off-by: Ho Lim <subhoya@gmail.com>
dced8eb to
cc2dd93
Compare
|
✨ Thanks for the refactor work, @HOYALIM. Resolving sandbox create intent before mutation in the onboarding FSM should improve consistency and prevent stale-binding issues. Ready for maintainer review. Related open issues: Related open issues: |
E2E Target Results — ✅ All requested tests passedRun: 29272396963
|
cjagwani
left a comment
There was a problem hiding this comment.
Requesting one focused correctness fix on exact head cc2dd93d65882531e4608b5ccfabeb58d557ea05.
[P1] Ordinary noninteractive policy selection is suppressed by null/undefined drift. runOnboard passes authoritativePolicyTier: null when authoritative resume is false. This refactor changes the sandbox handler from a truthy spread to !== undefined, so ordinary-path null now survives into resolveSandboxCreatePolicyTier(). That resolver treats every non-undefined value—including null—as authoritative and never reads NEMOCLAW_POLICY_TIER. With NEMOCLAW_POLICY_TIER=balanced, undefined resolves to balanced while null resolves to null; initial policy then omits the balanced/open create-time presets and the sandbox can initially register policyTier: null.
Please omit/pass undefined for non-authoritative onboarding (for example, only preserve opts.policyTier ?? null when authoritativeResumeConfig === true) while retaining explicit null for authoritative rebuild/resume. Add a real machine/runOnboard regression proving ordinary noninteractive balanced/restricted environment tiers reach create intent, materialization, and registration, while authoritative null remains null.
The pre-destructive intent resolution, credential exclusion/rebinding, provider/capability drift checks, and deferred stale-provider cleanup otherwise passed review. Standard CI and exact live cloud-onboard/onboard-repair/onboard-resume are green; the fork also still lacks a canonical bot sticky Advisor verdict.
Signed-off-by: Ho Lim <subhoya@gmail.com>
|
Addressed the ordinary-policy-tier regression in
Validation:
@coderabbitai review |
|
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/onboard-fsm-live-slices.test.ts (1)
209-214: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftAssert policy-tier behavior at the public sandbox boundary.
Replacing
createCoreOnboardFlowPhasesonly proves a private options object was assembled; the sentinel prevents the sandbox state from consuming it. Exercise the real phase and assert the resulting sandbox/materialized plan instead.As per path instructions, “Prefer observable outcomes through the public boundary over source-text, private-shape, or mock-call assertions.”
Also applies to: 491-506
🤖 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 `@test/onboard-fsm-live-slices.test.ts` around lines 209 - 214, Update the policy-tier scenarios in the relevant test block to stop replacing createCoreOnboardFlowPhases or asserting the private options capture. Run the real onboarding phase through the public sandbox boundary, then assert the resulting sandbox state or materialized plan reflects the expected authoritative policy tier, including the undefined case.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 `@test/onboard-pre-destructive-intent.test.ts`:
- Line 17: Update the test setup around tmpDir in the onboard pre-destructive
intent test to wrap the test body in a try/finally block, and remove the
temporary directory in finally with recursive, forced cleanup via fs.rmSync.
Ensure cleanup runs for both successful and failing test executions.
---
Nitpick comments:
In `@test/onboard-fsm-live-slices.test.ts`:
- Around line 209-214: Update the policy-tier scenarios in the relevant test
block to stop replacing createCoreOnboardFlowPhases or asserting the private
options capture. Run the real onboarding phase through the public sandbox
boundary, then assert the resulting sandbox state or materialized plan reflects
the expected authoritative policy tier, including the undefined case.
🪄 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: 917252fb-b695-44b9-83f6-a8fb2e2c46fa
📒 Files selected for processing (26)
src/lib/onboard.tssrc/lib/onboard/extra-provider-reconciliation.test.tssrc/lib/onboard/extra-provider-reconciliation.tssrc/lib/onboard/lifecycle-contracts.mdsrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-recreate-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.tssrc/lib/onboard/sandbox-messaging-preflight.test.tssrc/lib/onboard/sandbox-messaging-preflight.tssrc/lib/onboard/sandbox-provider-cleanup.tssrc/lib/onboard/types.tstest/onboard-fsm-live-slices.test.tstest/onboard-pre-destructive-intent.test.tstest/onboard-prepared-build-context.test.tstest/onboard-sandbox-recreation.test.ts
🚧 Files skipped from review as they are similar to previous changes (22)
- src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
- src/lib/onboard/sandbox-messaging-preflight.ts
- src/lib/onboard/machine/handlers/sandbox-dcode-selection.test.ts
- src/lib/onboard/extra-provider-reconciliation.test.ts
- src/lib/onboard/lifecycle-contracts.md
- src/lib/onboard/types.ts
- test/onboard-prepared-build-context.test.ts
- src/lib/onboard/machine/handlers/sandbox-recreate-resume.test.ts
- src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
- src/lib/onboard/extra-provider-reconciliation.ts
- src/lib/onboard/sandbox-create-intent.ts
- src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
- src/lib/onboard/sandbox-create-intent-types.ts
- src/lib/onboard/machine/handlers/sandbox.test.ts
- src/lib/onboard/machine/core-flow-phases.test.ts
- src/lib/onboard/sandbox-provider-cleanup.ts
- src/lib/onboard/sandbox-create-plan.ts
- src/lib/onboard/sandbox-messaging-preflight.test.ts
- src/lib/onboard.ts
- src/lib/onboard/sandbox-create-plan.test.ts
- src/lib/onboard/machine/handlers/sandbox.ts
- src/lib/onboard/sandbox-create-plan-materialization.ts
E2E Target Results — ✅ All requested tests passedRun: 29281467517
|
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 `@test/onboard-pre-destructive-intent.test.ts`:
- Around line 20-26: Update the test’s createSandbox setup to use an injected
dependency seam or loader-based mock for the runner and registry modules instead
of assigning to exports returned by require(). Ensure the child-process stubs
reliably replace runner.run and registry.registerSandbox, so the pre-intent
failure path reaches and verifies the intended mutation boundary.
🪄 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: a1b24b42-39ab-4ef3-9fa4-f1094a94691c
📒 Files selected for processing (26)
src/lib/onboard.tssrc/lib/onboard/extra-provider-reconciliation.test.tssrc/lib/onboard/extra-provider-reconciliation.tssrc/lib/onboard/lifecycle-contracts.mdsrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.tssrc/lib/onboard/machine/handlers/sandbox-dcode-selection.test.tssrc/lib/onboard/machine/handlers/sandbox-recreate-resume.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.tssrc/lib/onboard/machine/handlers/sandbox.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.tssrc/lib/onboard/sandbox-messaging-preflight.test.tssrc/lib/onboard/sandbox-messaging-preflight.tssrc/lib/onboard/sandbox-provider-cleanup.tssrc/lib/onboard/types.tstest/onboard-fsm-live-slices.test.tstest/onboard-pre-destructive-intent.test.tstest/onboard-prepared-build-context.test.tstest/onboard-sandbox-recreation.test.ts
🚧 Files skipped from review as they are similar to previous changes (24)
- src/lib/onboard/types.ts
- src/lib/onboard/machine/handlers/sandbox-dcode-selection.test.ts
- test/onboard-prepared-build-context.test.ts
- src/lib/onboard/machine/handlers/sandbox-recreate-resume.test.ts
- src/lib/onboard/sandbox-messaging-preflight.ts
- src/lib/onboard/sandbox-messaging-preflight.test.ts
- src/lib/onboard/sandbox-provider-cleanup.ts
- src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
- src/lib/onboard/machine/core-flow-phases.test.ts
- test/onboard-sandbox-recreation.test.ts
- src/lib/onboard/machine/handlers/sandbox.test.ts
- src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
- src/lib/onboard/sandbox-create-intent-types.ts
- src/lib/onboard/extra-provider-reconciliation.test.ts
- test/onboard-fsm-live-slices.test.ts
- src/lib/onboard/sandbox-create-plan.ts
- src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
- src/lib/onboard/sandbox-create-intent.ts
- src/lib/onboard/lifecycle-contracts.md
- src/lib/onboard/sandbox-create-plan-materialization.ts
- src/lib/onboard/sandbox-create-intent-resolution.ts
- src/lib/onboard/machine/handlers/sandbox.ts
- src/lib/onboard/sandbox-create-plan.test.ts
- src/lib/onboard.ts
Signed-off-by: Ho Lim <subhoya@gmail.com>
<!-- markdownlint-disable MD041 --> ## Summary Release-prep documentation for v0.0.82 now summarizes user-facing changes merged since v0.0.81. It also closes stale wording in the stopped-sandbox backup, snapshot-clone, Ollama selection, and custom-policy authoring guidance. ## Changes - Add the `v0.0.82` section to `docs/about/release-notes.mdx` with links to the focused user guides. - Document that snapshot clones receive a destination-owned dashboard port before destructive replacement begins. - Align `backup-all` guidance with eligible stopped Docker-driver sandboxes that NemoClaw starts temporarily. - Describe the running and stopped Ollama menu states without claiming one fixed label. - Document runtime rejection of catch-all hosts in custom policy files. ### Source summary - [#6748](#6748) -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/lifecycle.mdx`, and `docs/reference/commands.mdx`: Summarize non-destructive sandbox `stop` and `start` commands. - [#6723](#6723) -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/backup-restore.mdx`, and `docs/reference/commands.mdx`: Record temporary startup and cleanup for eligible stopped-sandbox backups. - [#6749](#6749) -> `docs/about/release-notes.mdx` and `docs/manage-sandboxes/backup-restore.mdx`: Document destination-owned dashboard ports for snapshot clones. - [#6764](#6764) -> `docs/about/release-notes.mdx`: Summarize installer handling of route-only onboarding placeholders. - [#6771](#6771) -> `docs/about/release-notes.mdx`, `docs/inference/set-up-vllm.mdx`, `docs/inference/choose-inference-provider.mdx`, `docs/reference/commands.mdx`, and `docs/reference/platform-support.mdx`: Summarize managed-vLLM storage gates, immutable image digests, and the explicit override boundary. - [#6759](#6759) -> `docs/about/release-notes.mdx`: Record early, actionable OpenShell gateway-port conflict diagnostics. - [#6753](#6753) -> `docs/about/release-notes.mdx` and `docs/inference/set-up-ollama.mdx`: Document truthful running and stopped Ollama menu states. - [#6776](#6776) -> `docs/about/release-notes.mdx`: Summarize proxy-independent loopback readiness checks. - [#6769](#6769) -> `docs/about/release-notes.mdx`: Record compatible endpoint and agent guidance when Chat Completions is unavailable. - [#6730](#6730) -> `docs/about/release-notes.mdx`: Summarize bounded reuse of an eligible successful Chat Completions check. - [#6768](#6768) -> `docs/about/release-notes.mdx`: Record route-reservation repair during resumed onboarding. - [#6742](#6742) -> `docs/about/release-notes.mdx`: Summarize pre-mutation resolution of secret-free sandbox create intent. - [#6721](#6721) -> `docs/about/release-notes.mdx` and `docs/get-started/quickstart-langchain-deepagents-code.mdx`: Record bounded cleanup of completed managed Deep Agents headless sessions. - [#6731](#6731) -> `docs/about/release-notes.mdx` and `docs/network-policy/customize-network-policy.mdx`: Document runtime rejection of catch-all custom-policy destinations. - [#6729](#6729) -> `docs/about/release-notes.mdx` and `docs/get-started/prerequisites.mdx`: Record the Node.js 22.19 minimum. - [#6735](#6735) -> `docs/about/release-notes.mdx` and `docs/reference/platform-support.mdx`: Summarize the Ubuntu 26.04 userspace contract without claiming pending host or live validation. - [#6775](#6775) -> `docs/about/release-notes.mdx` and `docs/resources/community-contributions.mdx`: Route independent solutions outside canonical supported-product documentation. - [#6740](#6740) -> `docs/about/release-notes.mdx`: Summarize the semantic dependency-upgrade contributor workflow. - [#6777](#6777) -> `docs/about/release-notes.mdx` and `docs/CONTRIBUTING.md`: Summarize the route-safe documentation-refactor workflow. - [#6741](#6741) -> `docs/about/release-notes.mdx` and `docs/security/openclaw-2026.6.10-dependency-review.md`: Summarize reviewed npm archive verification and audit enforcement. - [#6739](#6739) -> `docs/about/release-notes.mdx` and `docs/security/openclaw-2026.6.10-dependency-review.md`: Record the locked offline dependency graph for the managed OpenClaw WeChat runtime. - [#6737](#6737) -> `docs/about/release-notes.mdx`: Record removal of the messaging build plan from final OpenClaw and Hermes image environments. - [#6733](#6733) -> `docs/about/release-notes.mdx`: Summarize cached plugin dependency layers for source and blueprint rebuilds. ### Skipped from docs-skip - None. No commit or changed path in `v0.0.81..origin/main` matched `openclaw-sandbox-permissive.yaml` or `config-show`, and the drafted content contains none of the configured skip terms. ## 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 - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: This is a documentation-only release-prep update; behavior is protected by the merged source PRs, and the documentation build validates the changed routes and agent variants. - [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 the DCO sign-off declaration 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 — tests are not applicable for this documentation-only change. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: not run for this documentation-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) — 0 errors; two pre-existing Fern warnings remain. - [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) — no new pages. --- Signed-off-by: Charan Jagwani <cjagwani@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated release notes with improvements to sandbox recovery, onboarding, session management, policy validation, storage checks, and system requirements. * Clarified Ollama setup instructions and status labels. * Documented safer snapshot restoration, including dedicated ports and protection against destructive failures. * Expanded `backup-all` coverage to include eligible stopped sandboxes. * Added guidance rejecting broad or catch-all network destinations in custom policies. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Summary
prepareSandboxCreatePlanand direct create compatibility surfaces while keeping intent process-localValidation
npm run test:changednpm run build:clinpm run typecheck:clinpm run check:diffCloses #6226
Signed-off-by: Ho Lim subhoya@gmail.com
Summary by CodeRabbit