Skip to content

refactor(onboard): trim runtime boundary recorders - #5648

Merged
cv merged 18 commits into
mainfrom
refactor/onboard-fsm-trim-recorders
Jun 24, 2026
Merged

refactor(onboard): trim runtime boundary recorders#5648
cv merged 18 commits into
mainfrom
refactor/onboard-fsm-trim-recorders

Conversation

@cv

@cv cv commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Trim the runtime boundary recorder bag so it only exposes recorders consumed as phase dependencies. Compatibility result recording remains available as a direct boundary method for tests and orchestration that intentionally need it.

Changes

  • Remove recordStateResultWithStepCompatibility from OnboardRuntimeBoundary.recorders().
  • Update final-flow runtime tests to bind the compatibility method directly from the boundary.
  • Keep the existing compatibility behavior unchanged.

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
    • Simplified internal recorder API by removing a compatibility-tracking method from public exposure while maintaining existing functionality through internal invocation.

@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: 60c6aa4a-6fbb-4952-bdc3-eb9182c4150a

📥 Commits

Reviewing files that changed from the base of the PR and between 3ce5930 and e8fba20.

📒 Files selected for processing (2)
  • src/lib/onboard/machine/final-flow-phases.runtime.test.ts
  • src/lib/onboard/runtime-boundary.ts
💤 Files with no reviewable changes (1)
  • src/lib/onboard/runtime-boundary.ts

📝 Walkthrough

Walkthrough

OnboardRuntimeBoundary.recorders() no longer returns recordStateResultWithStepCompatibility as a named recorder entry. Three runtime boundary tests are updated to spy on the method by binding directly to harness.boundary instead of reading from the recorders map.

Changes

Compatibility Recorder Encapsulation

Layer / File(s) Summary
Remove recordStateResultWithStepCompatibility from recorders()
src/lib/onboard/runtime-boundary.ts
Deletes the recordStateResultWithStepCompatibility binding from the recorder object returned by recorders(); the method remains implemented on the class and is still called internally.
Update tests to spy via harness.boundary
src/lib/onboard/machine/final-flow-phases.runtime.test.ts
In all three affected test cases, compatibilityRecorder is now created by wrapping harness.boundary.recordStateResultWithStepCompatibility bound to harness.boundary, replacing the removed recorders-based reference.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5646: Directly related — both PRs refactor how recordStateResultWithStepCompatibility is wired and exposed in the onboarding runtime boundary and its tests.

Suggested reviewers

  • jyaunches

Poem

🐇 A recorder once listed in public display,
Now tucked in the boundary, out of the way.
The tests find it still, bound snugly in place,
No recorders map needed — just boundary's embrace.
Hop hop, small change, but clean all the same! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: refactoring the runtime boundary to remove (trim) the recordStateResultWithStepCompatibility recorder from the public API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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-trim-recorders

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... e8fba20 +/-
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... e8fba20 +/-
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 24, 2026 03:49 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: No advisor follow-up required beyond maintainer review.
Open items: 0 required · 0 warnings · 0 suggestions · 0 test follow-ups
Since last review: 0 prior items resolved · 0 still apply · 0 new items found

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: onboard-resume-e2e,onboard-repair-e2e,cloud-onboard-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • onboard-resume-e2e (medium): Required for onboarding resume compatibility changes: validates an interrupted onboard can resume through the real CLI/sandbox flow without corrupting persisted step/state progress.
  • onboard-repair-e2e (medium): Required alongside resume coverage for onboarding runtime-boundary compatibility changes: validates repair behavior against persisted/partial onboarding state in a real flow.
  • cloud-onboard-e2e (high): Required because the production onboarding runtime boundary can affect full hosted onboarding state transitions, sandbox creation, policy application, and final verification.

Optional E2E

  • None.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: onboard-resume-e2e,onboard-repair-e2e,cloud-onboard-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 touch onboarding runtime-boundary state-result compatibility behavior and final-flow resume compatibility coverage. The onboarding resume compatibility rule requires the focused live Vitest resume job for src/lib/onboard state-machine resume paths.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=onboard-resume-vitest
  • onboard-repair-vitest: The runtime-boundary compatibility path can affect persisted-session repair/backstop execution, so repair coverage is required alongside resume for this onboarding state-machine compatibility change.
    • 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/final-flow-phases.runtime.test.ts
  • src/lib/onboard/runtime-boundary.ts

@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow refactor PR restructures code without intended behavior change labels Jun 23, 2026
@cv cv added the v0.0.67 label Jun 23, 2026
@jyaunches jyaunches added v0.0.68 and removed v0.0.67 labels Jun 24, 2026
Base automatically changed from refactor/onboard-fsm-drop-record-only-runner to main June 24, 2026 03:44
@cv
cv merged commit 6fb9754 into main Jun 24, 2026
44 checks passed
@cv
cv deleted the refactor/onboard-fsm-trim-recorders branch June 24, 2026 03:54
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Trim the runtime boundary recorder bag so it only exposes recorders
consumed as phase dependencies. Compatibility result recording remains
available as a direct boundary method for tests and orchestration that
intentionally need it.

## Changes
- Remove `recordStateResultWithStepCompatibility` from
`OnboardRuntimeBoundary.recorders()`.
- Update final-flow runtime tests to bind the compatibility method
directly from the boundary.
- Keep the existing compatibility behavior unchanged.

## 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**
* Simplified internal recorder API by removing a compatibility-tracking
method from public exposure while maintaining existing functionality
through internal invocation.

<!-- 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
Trim the runtime boundary recorder bag so it only exposes recorders
consumed as phase dependencies. Compatibility result recording remains
available as a direct boundary method for tests and orchestration that
intentionally need it.

## Changes
- Remove `recordStateResultWithStepCompatibility` from
`OnboardRuntimeBoundary.recorders()`.
- Update final-flow runtime tests to bind the compatibility method
directly from the boundary.
- Keep the existing compatibility behavior unchanged.

## 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**
* Simplified internal recorder API by removing a compatibility-tracking
method from public exposure while maintaining existing functionality
through internal invocation.

<!-- 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
Trim the runtime boundary recorder bag so it only exposes recorders
consumed as phase dependencies. Compatibility result recording remains
available as a direct boundary method for tests and orchestration that
intentionally need it.

## Changes
- Remove `recordStateResultWithStepCompatibility` from
`OnboardRuntimeBoundary.recorders()`.
- Update final-flow runtime tests to bind the compatibility method
directly from the boundary.
- Keep the existing compatibility behavior unchanged.

## 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**
* Simplified internal recorder API by removing a compatibility-tracking
method from public exposure while maintaining existing functionality
through internal invocation.

<!-- 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

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants