Skip to content

refactor(onboard): remove resume flag from live slices - #5643

Merged
cv merged 8 commits into
mainfrom
refactor/onboard-fsm-live-slice-inputs
Jun 24, 2026
Merged

cv merged 8 commits into
mainfrom
refactor/onboard-fsm-live-slice-inputs

Conversation

@cv

@cv cv commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Remove the low-level live-slice resume flag now that compatibility execution is driven by explicit state declarations. This shrinks the slice API and keeps resume-specific decisions in the phase wrappers that know which states are safe to replay.

Changes

  • Drop resume from runLiveOnboardFlowSlice options and tests.
  • Make initial, core, and final wrappers choose compatibility states from their existing resume option.
  • Preserve fresh strict-runner behavior while keeping resume repair/backstop replay explicit.

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

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior
  • Full npm test passes (broad runtime changes only)
  • 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

Summary by CodeRabbit

  • Refactor
    • Updated onboarding flow execution to choose which phases can run based on the current machine state instead of an explicit resume flag.
    • Resume sessions now allow a broader compatibility path, while fresh sessions restrict compatibility to reduce unintended transitions.
  • Tests
    • Adjusted live onboarding slice tests to rely on the new state-based behavior.
    • Added/expanded strict-runner coverage for fresh preflight/provider selection sessions, including branching transitions and ensuring compatibility recording is not triggered.

@cv cv self-assigned this Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fdca17f6-91c0-4bcc-adb2-4ea2b18cd526

📥 Commits

Reviewing files that changed from the base of the PR and between 116e2f9 and 3c9351a.

📒 Files selected for processing (2)
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/initial-flow-phases.test.ts

📝 Walkthrough

Walkthrough

Removes the resume: boolean property from LiveOnboardFlowSliceOptions and its associated gate in runLiveOnboardFlowSlice. Resume behavior is now encoded entirely via conditional compatibilityWhenState list selection at the three call sites (runInitialOnboardFlowSlice, runCoreOnboardFlowSlice, runFinalOnboardFlowSlice). Tests are updated to drop the now-removed option, and new tests validate strict runner execution for fresh sessions across provider selection and preflight states.

Changes

Resume encoded via compatibilityWhenState

Layer / File(s) Summary
Drop resume from interface and remove gate
src/lib/onboard/machine/live-flow-slice.ts
LiveOnboardFlowSliceOptions removes resume: boolean; runLiveOnboardFlowSlice removes the !resume guard so dispatch is driven solely by runWhenState / compatibilityWhenState membership.
Conditional compatibilityWhenState at call sites
src/lib/onboard/machine/initial-flow-phases.ts, src/lib/onboard/machine/core-flow-phases.ts, src/lib/onboard/machine/final-flow-phases.ts
Each slice function now selects a different compatibilityWhenState array via options.resume ? [...] : [...] and drops the explicit resume: argument from its runLiveOnboardFlowSlice call.
Test cleanup
src/lib/onboard/machine/live-flow-slice.test.ts
Nine test invocations of runLiveOnboardFlowSlice remove the resume: true/false argument; all other setup and assertions are unchanged.
New test coverage for strict runner
src/lib/onboard/machine/core-flow-phases.test.ts, src/lib/onboard/machine/initial-flow-phases.test.ts
Import branchTo for transitions, add a test for fresh provider-selection sessions that validates state progression and phase ordering in the strict path, and add a test for fresh preflight sessions verifying downstream transitions and final state correctness.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5642: Directly modifies the same onboarding resume compatibility wiring in runInitialOnboardFlowSlice, runCoreOnboardFlowSlice, runFinalOnboardFlowSlice, and runLiveOnboardFlowSlice.
  • NVIDIA/NemoClaw#5690: Updates compatibilityWhenState passed into runLiveOnboardFlowSlice in downstream flow phases and adjusts resume-related tests.

Poem

🐇 Hop, hop — no more resume key to pass,
The compat list now tells us where we are!
Fresh states run forward, old ones hold their place,
New tests spring forth to validate the grace,
The rabbit's refactor: cleaner, faster pace! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: removal of the resume flag from live slices, which is the core refactoring across all modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/onboard-fsm-live-slice-inputs

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

@github-code-quality

github-code-quality Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the refactor/onboard-fsm... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main refactor/onboard-fsm... 571a10b +/-
nemoclaw/src/se...cret-scanner.ts — 100% —
nemoclaw/src/commands/slash.ts — 100% —
nemoclaw/src/li...bprocess-env.ts — 100% —
nemoclaw/src/bl...eprint/state.ts — 98% —
nemoclaw/src/onboard/config.ts — 98% —
nemoclaw/src/bl...int/snapshot.ts — 97% —
nemoclaw/src/bl...print/runner.ts — 95% —
nemoclaw/src/co...ration-state.ts — 94% —
nemoclaw/src/bl...ate-networks.ts — 94% —
nemoclaw/src/index.ts — 94% —

TypeScript / code-coverage/cli

The overall coverage in the refactor/onboard-fsm... branch is 46%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main refactor/onboard-fsm... 571a10b +/-
src/lib/state/o...oard-session.ts — 91% —
src/lib/inference/local.ts — 76% —
src/lib/sandbox/config.ts — 72% —
src/lib/actions...dbox/rebuild.ts — 67% —
src/lib/onboard/preflight.ts — 64% —
src/lib/actions...licy-channel.ts — 56% —
src/lib/state/sandbox.ts — 55% —
src/lib/onboard...er-gpu-patch.ts — 50% —
src/lib/policy/index.ts — 49% —
src/lib/onboard.ts — 18% —

Updated June 23, 2026 22:27 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 0 suggestions · 5 test follow-ups
Since last review: 0 prior items resolved · 3 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Acceptance clause
  • PRA-T5 Add or justify test follow-up: Acceptance clause
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Add or identify `runInitialOnboardFlowSlice keeps non-resume gateway/provider_selection ahead states on compatibility path without strict applyResult`.. The changed code controls live onboarding orchestration around preflight, provider inference, sandbox setup, policy application, and final verification. Focused unit coverage is present and no blocking gap was found, but wrapper-level runtime validation would increase confidence that real runtime-boundary recorders keep strict and compatibility paths separated.
  • PRA-T2 Runtime validation — Add or identify `runCoreOnboardFlowSlice rejects non-resume policies/finalizing/post_verify before side effects` if excluding those states from the non-resume core compatibility array is intentional.. The changed code controls live onboarding orchestration around preflight, provider inference, sandbox setup, policy application, and final verification. Focused unit coverage is present and no blocking gap was found, but wrapper-level runtime validation would increase confidence that real runtime-boundary recorders keep strict and compatibility paths separated.
  • PRA-T3 Runtime validation — Add or identify maintainer-run targeted test evidence for `src/lib/onboard/machine/live-flow-slice.test.ts`, `src/lib/onboard/machine/initial-flow-phases.test.ts`, and `src/lib/onboard/machine/core-flow-phases.test.ts` covering the changed strict-vs-compatibility behavior.. The changed code controls live onboarding orchestration around preflight, provider inference, sandbox setup, policy application, and final verification. Focused unit coverage is present and no blocking gap was found, but wrapper-level runtime validation would increase confidence that real runtime-boundary recorders keep strict and compatibility paths separated.
  • PRA-T4 Acceptance clause — Targeted tests pass for changed behavior — add test evidence or identify existing coverage. Changed targeted tests are present in `live-flow-slice.test.ts`, `initial-flow-phases.test.ts`, and `core-flow-phases.test.ts`, but this read-only review did not execute tests or inspect CI results.
  • PRA-T5 Acceptance clause — Docs updated for user-facing behavior changes — add test evidence or identify existing coverage. No documentation files changed. The code appears to refactor internal onboarding FSM slice dispatch, but whether maintainers consider it user-facing cannot be established from read-only code review alone.

Workflow run details

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.

@github-actions

github-actions Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: onboard-resume-e2e, onboard-repair-e2e, cloud-onboard-e2e
Optional E2E: None

Dispatch hint: cloud-onboard-e2e,onboard-repair-e2e,onboard-resume-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • onboard-resume-e2e (high): Required by the onboarding resume compatibility rule: this PR changes live slice orchestration and compatibility state handling for resume paths, so unit tests alone are not sufficient.
  • onboard-repair-e2e (high): Required by the onboarding resume compatibility rule: repair/backstop replay can be affected by the compatibilityWhenState changes across initial/core/final slices.
  • cloud-onboard-e2e (high): The PR changes fresh strict-vs-compatibility execution through the hosted onboarding state machine, so a full hosted onboarding E2E should validate the real install/onboard/sandbox/inference flow.

Optional E2E

  • None.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: cloud-onboard-e2e,onboard-repair-e2e,onboard-resume-e2e

@github-actions

github-actions Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: onboard-resume-vitest, onboard-repair-vitest
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=onboard-resume-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=onboard-repair-vitest

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • onboard-resume-vitest: Changes alter src/lib/onboard/machine live slice orchestration and resume compatibility state handling across initial, core, and final onboarding phases. The onboarding resume compatibility rule requires the dedicated live Vitest resume job.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=onboard-resume-vitest
  • onboard-repair-vitest: The same state-machine compatibility changes can affect repair/backstop execution from persisted sessions, so repair coverage is required alongside resume coverage for these paths.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=onboard-repair-vitest

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • src/lib/onboard/machine/core-flow-phases.ts
  • src/lib/onboard/machine/final-flow-phases.ts
  • src/lib/onboard/machine/initial-flow-phases.ts
  • src/lib/onboard/machine/live-flow-slice.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/initial-flow-phases.test.ts
  • src/lib/onboard/machine/live-flow-slice.test.ts

@cv

cv commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review Advisor follow-up:

The requested runtime validations are covered by existing targeted tests for this refactor layer:

  • PRA-T1 / PRA-T2 / PRA-T3: wrapper-level coverage lives in src/lib/onboard/machine/initial-flow-phases.test.ts, core-flow-phases.test.ts, and final-flow-phases.test.ts; these assert resume-at-entry compatibility recording and fresh strict entry behavior where applicable.
  • PRA-T4 / PRA-T5: integration-style slice probes in test/onboard-fsm-live-slices.test.ts verify fresh onboarding enters the initial/core/final strict runners and that resume/ahead sessions use compatibility replay instead of stale strict transitions. CI also ran the broader CLI and E2E gates successfully.

I did not add another runtime test here because this PR only removes the low-level resume parameter after PR #5642 makes compatibility states explicit; adding duplicate E2E coverage would be higher cost than the helper/wrapper contract being changed.

Base automatically changed from refactor/onboard-fsm-compat-states to main June 23, 2026 06:31
…live-slice-inputs

# Conflicts:
#	src/lib/onboard/machine/core-flow-phases.ts
#	src/lib/onboard/machine/final-flow-phases.ts
#	src/lib/onboard/machine/initial-flow-phases.ts
#	src/lib/onboard/machine/live-flow-slice.test.ts
@cv cv added the v0.0.67 label Jun 23, 2026
@wscurran wscurran added the refactor PR restructures code without intended behavior change label Jun 23, 2026
@jyaunches

Copy link
Copy Markdown
Contributor

Nightly E2E regression that #5643 can absorb

I think #5643 is the right place to absorb a regression now showing up in the nightly E2E rebuild/resume lanes, while keeping your intended onboard FSM direction intact.

What regressed

After #5642, runLiveOnboardFlowSlice rejects any current machine state that is not explicitly listed in that slice's compatibilityWhenState, including during --resume.

That is directionally good because compatibility is now explicit, but the declared resume states are incomplete for rebuild/onboard-resume flows. Those flows enter onboard --resume through the initial slice even when the persisted durable machine state has already advanced to a later state such as policies or finalizing. The initial/core wrappers now reject those safe ahead states before the final slice can handle them.

Failing nightly evidence

Post-revert nightly run: https://github.com/NVIDIA/NemoClaw/actions/runs/28050018215

Observed failures:

  • onboard-resume-e2e
    • UnexpectedLiveOnboardFlowSliceStateError: Unexpected onboarding live flow state before slice entry: policies
  • onboard-repair-e2e
    • same policies failure
  • rebuild-hermes-e2e
  • rebuild-hermes-stale-base-e2e
  • upgrade-stale-sandbox-e2e
    • onboard() threw: Unexpected onboarding live flow state before slice entry: finalizing
    • followed by Recreate failed after sandbox was destroyed
  • Rebuild-dependent channel tests then fail secondarily:
    • channels-add-remove-e2e
    • channels-stop-start-hermes-e2e
    • channels-stop-start-openclaw-e2e
    • hermes-discord-e2e
    • messaging-providers-e2e

The same signature was already present in the full nightly run after #5642/#5600, so this does not appear to be caused by the #5600 key-routing revert.

Suggested #5643-compatible fix

I would not restore a global resume bypass in runLiveOnboardFlowSlice. Instead, keep #5643's direction: the wrappers decide the compatibility states explicitly.

For options.resume === true, the earlier wrappers likely need to tolerate all safe ahead states that can be observed when replaying a persisted session:

// initial wrapper, resume=true
compatibilityWhenState: [
  "init", "preflight", "gateway", "provider_selection",
  "inference", "sandbox", "openclaw", "agent_setup",
  "policies", "finalizing", "post_verify",
]

// core wrapper, resume=true
compatibilityWhenState: [
  "provider_selection", "inference", "sandbox",
  "openclaw", "agent_setup", "policies",
  "finalizing", "post_verify",
]

// final wrapper, resume=true
compatibilityWhenState: [
  "openclaw", "agent_setup", "policies",
  "finalizing", "post_verify",
]

The important part is not necessarily this exact list, but that policies and finalizing are accepted by the resume path before side-effect replay reaches the final slice.

Tests to add

Could you add targeted tests in this PR for the two observed regression states?

  1. onboard --resume / initial wrapper sees machine state policies and does not throw before final replay can proceed.
  2. rebuild resume / initial+core wrapper sees machine state finalizing and does not throw before final replay can proceed.

Then the focused E2E validation would be:

  • onboard-resume-e2e
  • onboard-repair-e2e
  • rebuild-hermes-e2e
  • rebuild-hermes-stale-base-e2e
  • upgrade-stale-sandbox-e2e

This should preserve your architecture goal: explicit compatibility declarations at the phase wrappers, record/FSM as the durable source of truth, and no broad resume escape hatch in the low-level slice.

cv added 2 commits June 23, 2026 14:32
…live-slice-inputs

# Conflicts:
#	src/lib/onboard/machine/core-flow-phases.ts
#	src/lib/onboard/machine/initial-flow-phases.ts
@cv

cv commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review Advisor follow-up for latest review:

  • PRA-T1: added wrapper-level coverage in src/lib/onboard/machine/initial-flow-phases.test.ts for runInitialOnboardFlowSlice at fresh preflight. It uses strict runtime.applyResult, asserts the compatibility recorder is not called, and verifies gateway -> provider_selection application.
  • PRA-T2: added wrapper-level coverage in src/lib/onboard/machine/core-flow-phases.test.ts for runCoreOnboardFlowSlice at fresh provider_selection. It uses strict runtime.applyResult, asserts the compatibility recorder is not called, and verifies inference -> sandbox -> openclaw application.
  • PRA-T3: targeted local test evidence: npx vitest run --project cli src/lib/onboard/machine/initial-flow-phases.test.ts src/lib/onboard/machine/core-flow-phases.test.ts passed. CI is also green on the updated head.

The downstream resume regression called out in the maintainer comment was handled by merged hotfix #5690 and is present in this branch via the latest main merge.

@cv
cv enabled auto-merge (squash) June 23, 2026 22:36
@cv
cv requested a review from jyaunches June 23, 2026 22:54
@jyaunches jyaunches added v0.0.68 and removed v0.0.67 labels Jun 24, 2026
@cv
cv disabled auto-merge June 24, 2026 03:10
@cv
cv merged commit a309c1b into main Jun 24, 2026
40 checks passed
@cv
cv deleted the refactor/onboard-fsm-live-slice-inputs branch June 24, 2026 03:10
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Remove the low-level live-slice `resume` flag now that compatibility
execution is driven by explicit state declarations. This shrinks the
slice API and keeps resume-specific decisions in the phase wrappers that
know which states are safe to replay.

## Changes
- Drop `resume` from `runLiveOnboardFlowSlice` options and tests.
- Make initial, core, and final wrappers choose compatibility states
from their existing resume option.
- Preserve fresh strict-runner behavior while keeping resume
repair/backstop replay explicit.

## Type of Change
- [x] 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
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Tests added or updated for new or changed behavior
- [x] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Updated onboarding flow execution to choose which phases can run based
on the current machine state instead of an explicit resume flag.
* Resume sessions now allow a broader compatibility path, while fresh
sessions restrict compatibility to reduce unintended transitions.
* **Tests**
* Adjusted live onboarding slice tests to rely on the new state-based
behavior.
* Added/expanded strict-runner coverage for fresh preflight/provider
selection sessions, including branching transitions and ensuring
compatibility recording is not triggered.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Hadar Cohen <hacohen@redhat.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Remove the low-level live-slice `resume` flag now that compatibility
execution is driven by explicit state declarations. This shrinks the
slice API and keeps resume-specific decisions in the phase wrappers that
know which states are safe to replay.

## Changes
- Drop `resume` from `runLiveOnboardFlowSlice` options and tests.
- Make initial, core, and final wrappers choose compatibility states
from their existing resume option.
- Preserve fresh strict-runner behavior while keeping resume
repair/backstop replay explicit.

## Type of Change
- [x] 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
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Tests added or updated for new or changed behavior
- [x] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Updated onboarding flow execution to choose which phases can run based
on the current machine state instead of an explicit resume flag.
* Resume sessions now allow a broader compatibility path, while fresh
sessions restrict compatibility to reduce unintended transitions.
* **Tests**
* Adjusted live onboarding slice tests to rely on the new state-based
behavior.
* Added/expanded strict-runner coverage for fresh preflight/provider
selection sessions, including branching transitions and ensuring
compatibility recording is not triggered.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Hadar Cohen <hacohen@redhat.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Remove the low-level live-slice `resume` flag now that compatibility
execution is driven by explicit state declarations. This shrinks the
slice API and keeps resume-specific decisions in the phase wrappers that
know which states are safe to replay.

## Changes
- Drop `resume` from `runLiveOnboardFlowSlice` options and tests.
- Make initial, core, and final wrappers choose compatibility states
from their existing resume option.
- Preserve fresh strict-runner behavior while keeping resume
repair/backstop replay explicit.

## Type of Change
- [x] 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
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Tests added or updated for new or changed behavior
- [x] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Updated onboarding flow execution to choose which phases can run based
on the current machine state instead of an explicit resume flag.
* Resume sessions now allow a broader compatibility path, while fresh
sessions restrict compatibility to reduce unintended transitions.
* **Tests**
* Adjusted live onboarding slice tests to rely on the new state-based
behavior.
* Added/expanded strict-runner coverage for fresh preflight/provider
selection sessions, including branching transitions and ensuring
compatibility recording is not triggered.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants