Skip to content

refactor(onboard): run initial phases through FSM slice#4499

Draft
cv wants to merge 1 commit into
stack/onboard-fsm-final-sequence-slicefrom
stack/onboard-fsm-use-initial-slice
Draft

refactor(onboard): run initial phases through FSM slice#4499
cv wants to merge 1 commit into
stack/onboard-fsm-final-sequence-slicefrom
stack/onboard-fsm-use-initial-slice

Conversation

@cv
Copy link
Copy Markdown
Collaborator

@cv cv commented May 29, 2026

Summary

Move the fresh-run preflight/gateway live call site onto the initial FSM flow slice. Resume remains on the compatibility path for now so preflight and gateway backstops still run even when saved machine state is already ahead.

Changes

  • Build an initial OnboardFlowContext in src/lib/onboard.ts for preflight/gateway state.
  • Wrap the existing preflight and gateway handler calls as sequence phases.
  • Use runInitialOnboardFlowSequence(...) for fresh runs that start at preflight.
  • Preserve the compatibility path for resume/ahead-state sessions.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • 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: Carlos Villela cvillela@nvidia.com

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this May 29, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 29, 2026

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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 06b625a0-13e4-4a8f-afef-a94bbd778f32

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stack/onboard-fsm-use-initial-slice

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

@github-actions
Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: ubuntu-repo-cloud-openclaw, ubuntu-repo-cloud-openclaw-resume, ubuntu-no-docker-preflight-negative, gateway-drift-preflight-e2e
Optional E2E: ubuntu-repo-cloud-openclaw-double-same-provider, gpu-repo-local-ollama-openclaw, gateway-health-honest-e2e

Dispatch hint: ubuntu-repo-cloud-openclaw,ubuntu-repo-cloud-openclaw-resume,ubuntu-no-docker-preflight-negative

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/stack/onboard-fsm-final-sequence-slice
Head: HEAD
Confidence: high

Required E2E

  • ubuntu-repo-cloud-openclaw (medium): Required fresh happy-path coverage for the new non-resume sequence path from preflight through gateway, sandbox creation, credentials, and inference readiness.
  • ubuntu-repo-cloud-openclaw-resume (medium): Required because the change explicitly alters the control flow around resume versus fresh onboarding and must prove interrupted onboarding can still resume to completion.
  • ubuntu-no-docker-preflight-negative (low): Required to verify the refactored preflight phase still fails closed before gateway or sandbox side effects when Docker is unavailable.
  • gateway-drift-preflight-e2e (low): Required gateway/preflight regression coverage because gateway lifecycle execution and state-result recording moved behind the new phase wrapper.

Optional E2E

  • ubuntu-repo-cloud-openclaw-double-same-provider (medium): Useful confidence for repeat onboarding and gateway/sandbox reuse after context/session propagation was refactored.
  • gpu-repo-local-ollama-openclaw (high): Useful but expensive coverage for the GPU passthrough fields now carried through the initial onboard flow context into gateway and later setup.
  • gateway-health-honest-e2e (low): Adjacent gateway lifecycle confidence check to ensure the refactor does not mask unhealthy gateway startup as successful.

New E2E recommendations

  • onboarding-state-machine (medium): Existing E2E covers fresh and resume outcomes, but there is no focused E2E that asserts the new sequence-runner path records identical state results and session updates for preflight and gateway compared with the compatibility path.
    • Suggested test: Add a targeted initial-onboard-sequence-parity E2E that runs fresh onboarding through the sequence path with deterministic preflight/gateway fixtures and validates recorded machine states, lastStepStarted/Completed, and no duplicate state-result writes.

Dispatch hint

  • Workflow: .github/workflows/e2e-scenarios.yaml
  • jobs input: ubuntu-repo-cloud-openclaw,ubuntu-repo-cloud-openclaw-resume,ubuntu-no-docker-preflight-negative

@github-actions
Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: None
Optional scenario E2E: None

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/stack/onboard-fsm-final-sequence-slice
Head: HEAD
Confidence: high

Required scenario E2E

  • None. No scenario workflow, scenario metadata, scenario runtime, or validation-suite files changed.

Optional scenario E2E

  • None.

Relevant changed files

  • None.

Comment thread src/lib/onboard.ts
}
session = initialContext.session;
const sandboxGpuConfig = initialContext.sandboxGpuConfig;
const { resumeHasResolvedGpuIntent, requestedGpuPassthrough, gpuPassthrough } = initialContext;
Comment thread src/lib/onboard.ts
}
session = initialContext.session;
const sandboxGpuConfig = initialContext.sandboxGpuConfig;
const { resumeHasResolvedGpuIntent, requestedGpuPassthrough, gpuPassthrough } = initialContext;
Comment thread src/lib/onboard.ts
}
session = initialContext.session;
const sandboxGpuConfig = initialContext.sandboxGpuConfig;
const { resumeHasResolvedGpuIntent, requestedGpuPassthrough, gpuPassthrough } = initialContext;
@github-actions
Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 1 worth checking, 0 nice ideas
Top item: PR review advisor unavailable

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • PR review advisor unavailable: The automated advisor could not complete: Could not parse JSON from PR review advisor output; see /home/runner/work/NemoClaw/NemoClaw/artifacts/pr-review-advisor/pr-review-advisor-raw-output.txt
    • Recommendation: Re-run the PR Review Advisor or perform a manual review.
    • Evidence: Could not parse JSON from PR review advisor output; see /home/runner/work/NemoClaw/NemoClaw/artifacts/pr-review-advisor/pr-review-advisor-raw-output.txt

🌱 Nice ideas

  • None.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@wscurran wscurran added enhancement: feature Use this label to identify requests for new capabilities in NemoClaw. refactor This is a refactor of the code and/or architecture. labels May 29, 2026
@cv cv added the onboarding Making the onboarding experience better label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement: feature Use this label to identify requests for new capabilities in NemoClaw. onboarding Making the onboarding experience better refactor This is a refactor of the code and/or architecture.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants