Commit 183a9c8
fix(onboard): retire a messaging channel preset the host no longer configures (#9296)
<!-- markdownlint-disable MD041 -->
## Summary
<!-- 1-3 plain sentences: what changes and why. Describe
before-and-after behavior when it applies. Follow the NemoClaw Writing
Guide: https://github.com/NVIDIA/NemoClaw/blob/main/WRITING.md. Do not
add unrelated prose cleanup. -->
A messaging channel's network egress preset was re-applied on later
onboarding runs even after the operator cleared every input the product
exposes, because onboarding re-derived "the operator stopped configuring
this channel" at each consumer instead of recording it, and one consumer
could always miss it. Onboarding now re-reads host inputs on every reuse
path, records the removal in the messaging plan that reaches the
registry, derives its disabled-channel list from the applied preset list
as well as the plans, and names the channel whose egress it dropped.
## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->
Fixes #9283
## Changes
<!-- List concrete changes. If this adds an abstraction, configuration,
fallback, migration, or compatibility path, name its current requirement
and consumer, explain why a direct change is insufficient, and identify
the test that protects it. -->
- `selectionFromRegistryPlan` in
`src/lib/onboard/machine/handlers/sandbox-messaging.ts` runs the
host-input check on the channel-lifecycle branch as well. A plan last
written by `add-channel`, `remove-channel`, `start-channel`, or
`stop-channel` previously returned its recorded selection unchanged, so
a channel the host no longer configures stayed selected and
`detectUnconfiguredMessagingChannels` skipped it downstream. Covered by
`omits a removed host-backed channel from a lifecycle-workflow registry
plan` and `keeps a still-configured channel in a lifecycle-workflow
registry plan`.
- `filterUnconfiguredHostChannelsFromSelection` in the same file marks
the channel inactive and disabled in the returned plan through the new
`disableChannelsInPlan`, instead of filtering only the derived
selection. The plan is what reaches the registry and the next run, so
recording the removal once replaces rediscovering it at every reader.
Covered by `records the removal in the plan so a later reader cannot
re-enable it`, and by the two updated `#9109` cases.
- `handlePoliciesState` in
`src/lib/onboard/machine/handlers/policies.ts` adds the channels behind
the sandbox's applied presets to the candidates it checks. The registry
`policies` list outlives every messaging plan that named the channel, so
without this candidate source a sandbox can carry a channel's egress
with nothing left able to retire it. Covered by `disables a channel
whose preset is applied but which no plan still names` and `leaves a
still-configured channel enabled when its preset is applied`.
- `messagingChannelsForPolicyPresets` in
`src/lib/onboard/messaging-policy-presets.ts` maps preset names back to
their channels for that check, alongside the existing channel-to-preset
direction.
- `filterUnconfiguredHostChannelsFromSelection` reports the channel it
disabled, so a removal is visible in onboarding output rather than
silent.
- `docs/manage-sandboxes/enable-channels-during-onboarding.mdx`
documents removing a channel by clearing its host inputs, including the
in-sandbox QR pairing exemption.
## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Quality Gates
<!-- Check one tests line and one docs line. Check other lines when
applicable. Add every requested justification or approval reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [x] 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:
## Documentation Writer Review
<!-- Required for code and documentation changes after the changes and
applicable validation are complete. Keep one review checkbox and one
instance of each visible or hidden field. For Evidence, list changed
documentation paths. For documentation-only changes, also state that the
writing rules and documentation style were reviewed. For other results,
explain why no documentation change is needed or why the review is
blocked. For Agent, use a consistent product and surface name, such as
Codex Desktop, Codex CLI, Claude Code, or Cursor. After committing all
review changes, put `git rev-parse --short HEAD` and `git rev-parse
--short HEAD:AGENTS.md` in the hidden metadata below. Rerun the review
and refresh that metadata after any new commit. This receipt is advisory
during the data-collection pilot. -->
- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence:
`docs/manage-sandboxes/enable-channels-during-onboarding.mdx`. The
review returned request-changes. It found that the draft told the reader
to clear the stored credential with `credentials reset`, which takes an
OpenShell provider name and does not change what onboarding detects,
because a channel token is read from the environment alone. The
corrections were dropping that step, quoting the CLI output with its
real indentation, introducing the output block with `Expected output:`,
splitting one sentence that carried three instructions, and routing the
frontmatter for the new section.
- Agent: Claude Code
<!-- docs-review-head-sha: 55c71c1 -->
<!-- docs-review-agents-blob-sha: b9fb6a9 -->
## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving or merging.
This is human-reviewed evidence, not authenticated hardware provenance.
Exceptional bypasses use existing repository governance and must be
documented on the PR. -->
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:
## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: `npx
vitest run src/lib/onboard/machine/handlers/sandbox-messaging.test.ts
src/lib/onboard/machine/handlers/policies.test.ts
src/lib/onboard/messaging-policy-presets.test.ts
src/lib/onboard/policy-selection-application.test.ts` — 4 files, 73
tests passed, rerun after merging `origin/main`. Reverting only the two
changed handler sources makes 6 of the new and updated cases fail, so
they guard the behavior rather than restate it. `npm run typecheck:cli`
and `npm run lint` are clean.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [x] `npm run docs` builds without warnings (doc changes only)
- [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)
---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added clearer onboarding guidance for stopping channel configuration,
including removal behavior, network-policy cleanup, credential handling,
and QR-paired channel exceptions.
* Automatically disables messaging channels removed from the active
configuration while preserving channels that remain configured.
* Reports disabled channels during onboarding and sandbox lifecycle
workflows.
* **Bug Fixes**
* Improved reconciliation of previously applied channel settings with
the current messaging plan.
* Preserved valid channel selections when policy presets are applied.
* Ensured removed channels remain disabled across resumed and reused
onboarding flows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Co-authored-by: Deepak Jain <deepujain@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent ffbe742 commit 183a9c8
9 files changed
Lines changed: 375 additions & 30 deletions
File tree
- docs/manage-sandboxes
- src/lib/onboard
- machine/handlers
Lines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
81 | 103 | | |
82 | 104 | | |
83 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
103 | 144 | | |
104 | 145 | | |
105 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
180 | 191 | | |
181 | | - | |
| 192 | + | |
182 | 193 | | |
183 | 194 | | |
184 | 195 | | |
| |||
Lines changed: 128 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
189 | 205 | | |
190 | 206 | | |
191 | 207 | | |
| |||
359 | 375 | | |
360 | 376 | | |
361 | 377 | | |
362 | | - | |
363 | | - | |
364 | 378 | | |
365 | 379 | | |
366 | 380 | | |
367 | 381 | | |
368 | 382 | | |
369 | | - | |
| 383 | + | |
370 | 384 | | |
371 | 385 | | |
372 | 386 | | |
| |||
386 | 400 | | |
387 | 401 | | |
388 | 402 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
393 | 410 | | |
394 | 411 | | |
395 | 412 | | |
| |||
425 | 442 | | |
426 | 443 | | |
427 | 444 | | |
428 | | - | |
429 | | - | |
430 | 445 | | |
431 | 446 | | |
432 | 447 | | |
433 | 448 | | |
434 | | - | |
| 449 | + | |
435 | 450 | | |
436 | 451 | | |
437 | 452 | | |
| |||
466 | 481 | | |
467 | 482 | | |
468 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
469 | 503 | | |
470 | 504 | | |
471 | 505 | | |
| |||
536 | 570 | | |
537 | 571 | | |
538 | 572 | | |
539 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
540 | 653 | | |
541 | 654 | | |
542 | 655 | | |
| |||
557 | 670 | | |
558 | 671 | | |
559 | 672 | | |
560 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
561 | 677 | | |
562 | 678 | | |
563 | 679 | | |
| |||
0 commit comments