fix(policy): disclose full messaging-preset egress before channels apply - #7187
Conversation
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
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:
📝 WalkthroughWalkthroughThis change adds structured effective-egress rendering for preset YAML, integrates disclosure into policy, channel, and onboarding flows, updates WhatsApp descriptions, and revises related tests and documentation. ChangesPreset scope disclosure
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant ChannelCommand
participant PolicyModule
participant ScopeRenderer
participant Console
participant OpenShell
ChannelCommand->>PolicyModule: load and classify preset YAML
PolicyModule->>ScopeRenderer: render effective scope
ScopeRenderer-->>Console: emit endpoints, rules, and binaries
ChannelCommand->>Console: prompt or report dry-run action
PolicyModule->>OpenShell: apply merged policy when changed
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/actions/sandbox/policy-channel-scope-disclosure.test.ts`:
- Line 42: Update the test cleanup around NEMOCLAW_NON_INTERACTIVE to snapshot
its prior environment value before each test and restore that exact value in
afterEach, deleting it only when it was originally unset. Remove the
unconditional deletion so environment state cannot leak between tests.
In `@src/lib/policy/index.ts`:
- Line 939: Detect whether preset application produces an effective policy delta
before calling logPresetScope: update the single-preset path at
src/lib/policy/index.ts lines 939-939 and the batch path at lines 1081-1082 to
suppress or adjust the disclosure when all incoming policies already exist,
while preserving the current disclosure for newly added policy; add regression
coverage for a fully existing preset.
In `@src/lib/policy/preset-scope-render.test.ts`:
- Line 39: Update the renderPresetScope test suite title in the describe block
to include the linked issue suffix “(`#7179`)”, while leaving the child test
titles unchanged.
In `@test/package-contract/cli/policy-dispatch.test.ts`:
- Around line 252-264: Update the loadPresetFromFile mock used by this test to
return the parsed content of a-good.yaml, preserving the existing bad-file
branch. Read the provided path with fs.readFileSync(p, "utf8") and parse it, or
return an equivalent preset object containing the fixture’s network_policies
endpoint structure so the renderer sees the declared endpoint.
🪄 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: 84b0f957-04b8-412a-8e90-56087a660cbb
📒 Files selected for processing (14)
ci/test-file-size-budget.jsonsrc/lib/actions/sandbox/policy-channel-policy.test.tssrc/lib/actions/sandbox/policy-channel-scope-disclosure.test.tssrc/lib/actions/sandbox/policy-channel.tssrc/lib/messaging/channels/whatsapp/policy/hermes.yamlsrc/lib/messaging/channels/whatsapp/policy/openclaw.yamlsrc/lib/policy/index.tssrc/lib/policy/preset-scope-render.test.tssrc/lib/policy/preset-scope-render.tstest/e2e/live/mcp-bridge-reliability.tstest/e2e/support/mcp-bridge-reliability.test.tstest/package-contract/cli/policy-dispatch.test.tstest/policies.test.tstest/policy-channel-agent-resolution.test.ts
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
apurvvkumaria
left a comment
There was a problem hiding this comment.
Requesting changes on exact head a2b62969816e5859ffa4be47bd63bf76d15ee83d.
There are four merge blockers:
- The new renderer prints untrusted custom-preset YAML fields without terminal-safe escaping. I reproduced
loadPresetFromFile()accepting an ESC-bearing host andrenderPresetScope()returning literal\u001b[2J\u001b[Hbytes, so a malicious preset can erase/spoof the audit block or prompt before the warning is shown. See the inline comment. - The promised path coverage/order is incomplete. Actual non-QR
channels addprompts and mutates gateway/registry state before the disclosure;channels start --dry-runhas no disclosure and non-dry start mutates the stored plan first. Fresh onboarding is also not covered:prepareInitialSandboxPolicy()merges selected presets into the create-time policy, andonboard.tscreates the sandbox after logging only preset names; the new renderer is never called before that mutation. Rebuild can likewise create with those presets and emit the scope only during a later re-apply. Please exercise actual add/start, fresh interactive and headless onboarding, and rebuild ordering—not only the add dry-run stub. - The existing no-op finding is valid:
applyPresetContent()andapplyPresets()unconditionally say egress “would be opened” even when the same effective policy is already live. This is especially visible during rebuild replay. Compare effective policy state and suppress or accurately label no-op/replacement cases. - Required checks are red. The package-contract test fails exactly as CodeRabbit reported (
a-good's loader stub returns a flathost, so the renderer reports no endpoints). The CodeQL required check also reports one high alert in the new test assertion; although that alert appears to be a test-only false positive, it must be resolved/dismissed before merge. Protected E2E was not dispatched because prerequisite CI failed.
The environment-restoration and issue-suffix review threads are also valid cleanup items.
Independent exact-head verification:
- Build completed during dependency installation.
- CLI focused tests: 35/35 passed.
- Integration policy tests: 94/94 passed.
- E2E support tests: 5/5 passed.
- Package-contract policy test: 13/14 passed; the same assertion failed locally and in CI.
- WhatsApp OpenClaw and Hermes renderings accurately include all five endpoints, the exact Baileys GET path, and both Node binaries.
- Commit is GitHub Verified and DCO is green; the PR is mechanically mergeable but review/CI blocked.
…fix substring-URL CodeQL alert The --from-dir package-contract test's loadPresetFromFile stub synthesized minimal fake content instead of reading the real on-disk fixture, so the new egress disclosure assertion could never see the endpoint's port. The substring host:port check in preset-scope-render.test.ts also tripped a CodeQL incomplete-URL-substring-sanitization alert; switched to exact line membership. Also restores NEMOCLAW_NON_INTERACTIVE via vi.stubEnv/ unstubAllEnvs instead of a raw delete, and adds the missing (#7179) suffix to a new describe title per project convention. Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-7187.docs.buildwithfern.com/nemoclaw |
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
…ation path per #7179 Strip terminal control characters from every rendered preset field so a crafted --from-file/--from-dir preset cannot forge or erase the egress disclosure block before a user reviews it. Suppress the disclosure's "would be opened" wording when a preset's declared policies already match the sandbox's live policy, via a new presetIntroducesNewEgress delta check shared by applyPresetContent, applyPresets, and mergePresetNamesIntoPolicy. This also gives onboarding's create-time preset merge (interactive and headless) a full audit block before the sandbox is created, and rebuild's preset replay already routes through the same functions. Add disclosure to channels start --dry-run (previously silent) and make channels add --dry-run no-op aware via a new logSandboxPresetScopeIfNew helper, so a dry-run preview cannot claim new egress for an already-applied preset. Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@docs/reference/commands.mdx`:
- Line 1643: Update the effective-scope description near renderPresetScope to
explicitly include TLS and enforcement when those endpoint fields are rendered,
alongside host, port, access, and protocol settings. Verify the wording against
renderPresetScope and its source fields so the documentation accurately lists
the complete disclosed scope.
In `@src/lib/actions/sandbox/policy-channel.ts`:
- Around line 1452-1465: Extract the duplicated preset load, policy-key
validation, error/exit handling, and discloseChannelPresetScope flow into a
shared helper, then call it from both addSandboxChannelUnlocked and this
disabled-check block. Preserve the existing null/empty validation semantics and
error wording while removing the duplicate inline logic.
In `@src/lib/onboard.ts`:
- Around line 2722-2729: Move the inline discloseInitialSandboxPolicy callback
logic into an exported helper in the InitialSandboxPolicy implementation at
initial-policy.ts, accepting injected logging and file-reading dependencies.
Update onboard.ts to wire the helper directly as
initialPolicy.discloseInitialSandboxPolicy, preserving the existing empty-preset
guard and policy scope logging behavior.
In `@test/package-contract/cli/policy-dispatch.test.ts`:
- Around line 212-234: Rename the test case around the visible behavior
exercised by runPolicyAddExternal: it validates sanitized hostile custom-preset
rendering during --dry-run --yes, not disclosure ordering before an interactive
prompt. Alternatively, add a separate interactive test that explicitly verifies
the disclosure scope appears before credential collection, while keeping this
test focused on dry-run output.
🪄 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: b7f104dc-f3e2-46df-85c4-cb3d52c6640e
📒 Files selected for processing (14)
docs/reference/commands.mdxsrc/lib/actions/sandbox/policy-channel-conflict.test.tssrc/lib/actions/sandbox/policy-channel-scope-disclosure.test.tssrc/lib/actions/sandbox/policy-channel.tssrc/lib/onboard.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/policy/index.tssrc/lib/policy/preset-scope-render.test.tssrc/lib/policy/preset-scope-render.tstest/channels-add-preset.test.tstest/package-contract/cli/policy-dispatch.test.tstest/policy-preset-noop-disclosure.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/lib/actions/sandbox/policy-channel-scope-disclosure.test.ts
- src/lib/policy/preset-scope-render.test.ts
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
Exact-head advisor triage for |
…before-channels' into fix/7179-disclose-preset-egress-before-channels Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
…set-egress-before-channels
Dismissed as stale after exact-head verification at feed1fa: all requested correctness/security fixes are present, no review threads remain unresolved, all ordinary CI is green, and the one-time advisor retry completed successfully in both lanes. Protected E2E coordination remains the only active gate.
…before-channels' into fix/7179-disclose-preset-egress-before-channels Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
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/actions/sandbox/policy-channel-remove-flow.test.ts`:
- Around line 71-85: Update the dry-run test around startSandboxChannel to
explicitly mock runner.runCapture with the expected failure or
unavailable-result behavior, ensuring policies.getPresetContentGatewayState
follows the “live delta unavailable” branch without invoking a real subprocess.
Preserve the existing assertions for scope output, dry-run ordering, and skipped
apply/update/rebuild/exit operations.
🪄 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: fd3ffed2-2943-4034-b69c-4e216e2344bb
📒 Files selected for processing (2)
src/lib/actions/sandbox/policy-channel-remove-flow.test.tssrc/lib/actions/sandbox/policy-channel-scope-disclosure.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/lib/actions/sandbox/policy-channel-scope-disclosure.test.ts
Deliberately stub runner.runCapture to a clean empty policy instead of relying on the real subprocess call failing incidentally, so the disclosure state is a deterministic "absent" rather than an accidental "live delta unavailable". Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
I completed an exact-head maintainer audit and found one actionable blocker: the required pre-mutation egress disclosure was printed a second time when the preset was applied. Fixed in Validation on this revision:
The PR remains mergeable with zero unresolved review threads. Fresh-head CI and both automated advisors are now running; protected E2E will wait for that exact-head gate. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/channels-add-preset.test.ts (1)
213-224: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winScope the
getPresetContentGatewayStatemock to absent-state cases.Returning
"absent"for every test can bypass matching, drift, and no-op behavior, allowing these tests to pass without exercising the relevant policy classification. Use fixture-specific state or override this mock only where absence is the intended precondition.🤖 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/channels-add-preset.test.ts` around lines 213 - 224, Update the getPresetContentGatewayState mock in the test setup to return fixture-specific policy states, and only return "absent" in tests whose precondition requires absence. Ensure matching, drift, and no-op cases exercise their intended classifications instead of sharing the unconditional mock.Source: Path instructions
🧹 Nitpick comments (1)
src/lib/actions/sandbox/policy-channel-refresh.test.ts (1)
124-126: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPrefer asserting disclosure behavior over the internal suppression flag.
These expectations lock tests to the
applyPresetcall shape instead of proving the user-visible contract. Assert that finalized scope is disclosed exactly once and before mutation, while retaining only the arguments needed to verify the public flow.
src/lib/actions/sandbox/policy-channel-refresh.test.ts#L124-L126: replace the exact options-object assertion with an observable no-duplicate-disclosure assertion.src/lib/actions/sandbox/policy-channel-refresh.test.ts#L154-L156: apply the same behavioral assertion to the failure path.test/channels-add-preset.test.ts#L371-L373: verify disclosure/application ordering rather than the internal options object.test/channels-add-preset.test.ts#L405-L408: retain the scope-order assertion and remove the exact suppression flag requirement.test/channels-add-preset.test.ts#L423-L425: verify the failed WhatsApp path does not duplicate disclosure.test/channels-add-preset.test.ts#L521-L523: verify rollback behavior and disclosure ordering.test/channels-add-preset.test.ts#L673-L675: verify observable Slack application behavior.test/channels-add-preset.test.ts#L685-L687: verify observable Slack application behavior.test/channels-add-preset.test.ts#L697-L699: verify observable Slack failure behavior.🤖 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/actions/sandbox/policy-channel-refresh.test.ts` around lines 124 - 126, Replace internal suppressDisclosure/options-object assertions with observable disclosure and application behavior. In src/lib/actions/sandbox/policy-channel-refresh.test.ts:124-126 and :154-156, assert finalized scope disclosure occurs exactly once before mutation, including the failure path. In test/channels-add-preset.test.ts:371-373, :405-408, :423-425, :521-523, :673-675, :685-687, and :697-699, verify disclosure/application ordering, scope order, rollback, and failed WhatsApp/Slack paths without requiring the internal suppression flag; retain only arguments needed to prove the public flow.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.
Outside diff comments:
In `@test/channels-add-preset.test.ts`:
- Around line 213-224: Update the getPresetContentGatewayState mock in the test
setup to return fixture-specific policy states, and only return "absent" in
tests whose precondition requires absence. Ensure matching, drift, and no-op
cases exercise their intended classifications instead of sharing the
unconditional mock.
---
Nitpick comments:
In `@src/lib/actions/sandbox/policy-channel-refresh.test.ts`:
- Around line 124-126: Replace internal suppressDisclosure/options-object
assertions with observable disclosure and application behavior. In
src/lib/actions/sandbox/policy-channel-refresh.test.ts:124-126 and :154-156,
assert finalized scope disclosure occurs exactly once before mutation, including
the failure path. In test/channels-add-preset.test.ts:371-373, :405-408,
:423-425, :521-523, :673-675, :685-687, and :697-699, verify
disclosure/application ordering, scope order, rollback, and failed
WhatsApp/Slack paths without requiring the internal suppression flag; retain
only arguments needed to prove the public flow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e0386a22-15bc-47ab-8168-7cd958be66a2
📒 Files selected for processing (7)
src/lib/actions/sandbox/policy-channel-conflict.test.tssrc/lib/actions/sandbox/policy-channel-policy.test.tssrc/lib/actions/sandbox/policy-channel-refresh.test.tssrc/lib/actions/sandbox/policy-channel.tssrc/lib/policy/index.tstest/channels-add-preset.test.tstest/policy-preset-noop-disclosure.test.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- src/lib/actions/sandbox/policy-channel-conflict.test.ts
- test/policy-preset-noop-disclosure.test.ts
- src/lib/actions/sandbox/policy-channel-policy.test.ts
- src/lib/actions/sandbox/policy-channel.ts
- src/lib/policy/index.ts
Co-authored-by: Tinson Lai <tinsonl@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Addressed the preset-disclosure security warning in signed commit |
cv
left a comment
There was a problem hiding this comment.
Maintainer sweep: approved after current-base CI passed all 53 checks, selected live E2E passed across OpenClaw and Hermes, the full preset scope is disclosed before mutation, live policy state is revalidated before suppressing disclosure, and all YAML-derived terminal output is credential/query redacted and escaped. Product scope is established by #7179. I did not merge.
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry for NemoClaw `v0.0.89` before the release plan captures the tag commit. The entry summarizes the user-visible Station preparation, inference, recovery, policy-disclosure, and CLI-containment changes merged since `v0.0.88`. ## Changes - Add `docs/changelog/2026-07-20.mdx` with the exact `## v0.0.89` release heading, parser-safe SPDX comment, summary, and detailed bullets. - Link each shipped theme to the most specific published OpenClaw documentation routes. - Keep internal E2E, advisory-registry, and review-workflow refactors out of the user-facing release summary. Source summary: - #7214, #7241, #7237, #7223, #7204, #7202, #7183, and #7090 -> `docs/changelog/2026-07-20.mdx`: Summarize qualified DGX Station identity, package-state, PackageKit, DKMS, and reboot-handoff fixes. - #7242, #7221, #7186, #7164, and #6874 -> `docs/changelog/2026-07-20.mdx`: Summarize inference endpoint provenance, provider attachment, managed vLLM cleanup and progress, and Ollama selection guidance. - #7225, #7216, #7192, #7136, #7096, and #6910 -> `docs/changelog/2026-07-20.mdx`: Summarize sandbox readiness, recovery guidance, rebuilt model routing, durable Hermes state, and gateway restart behavior. - #7187 -> `docs/changelog/2026-07-20.mdx`: Summarize complete effective messaging-preset egress disclosure before policy mutation. - #7218, #7165, and #7184 -> `docs/changelog/2026-07-20.mdx`: Summarize structured output containment, terminal-safe route display, and Hermes forward cleanup. ## 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 PR adds release-history prose only; the focused changelog contract test validates its required structure and routes. - [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 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 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 — `mise exec node@22.23.1 -- npx vitest run test/changelog-docs.test.ts` (6 passed). - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable to this doc-only release entry. - [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) — `mise exec node@22.23.1 -- npm run docs` completed with 0 errors and 2 existing site-wide warnings. - [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) — the native changelog entry uses the required parser-safe MDX SPDX comment and does not use frontmatter. --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded DGX Station installation support for qualified GB300 and OTA-upgraded environments. * Preserved selected inference providers, endpoints, model pins, and tuning settings during sandbox creation and rebuilds. * Improved sandbox recovery by validating availability and stability before restarting services. * Added clearer policy output showing the complete effective messaging egress configuration. * **Bug Fixes** * Hardened status and inference route displays by sanitizing terminal control characters. * Improved Hermes uninstall behavior by stopping detached dashboard forwarding. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR documents the full YAML-derived `policy-add --dry-run` disclosure near the preset preview workflow. It also defines the generic Ubuntu package-state boundary for DGX Station preparation. This post-release documentation follow-up does not change a dated changelog entry. ## Changes - [#7187](#7187) -> `docs/network-policy/integration-policy-examples.mdx`: Explain that the preview uses the exact preset YAML and discloses endpoint, HTTP rule, and binary scope. - [#7241](#7241) -> `docs/get-started/dgx-station-preparation.mdx`: Document that NemoClaw accepts and quiesces an idle PackageKit daemon. - [#7202](#7202) -> `docs/get-started/dgx-station-preparation.mdx`: Document the fail-closed package transaction, lock, package-state, and query boundary before mutation. ## 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 PR changes prose only. Existing source tests own the documented behavior, and focused documentation guards pass. - [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: ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable. - Station profile/scenario: Documentation only. - Result: No host behavior changed. - Supporting evidence: Source behavior verified against merged PRs #7241 and #7202 and their focused tests. ## Verification - [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 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 — `npx vitest run test/changelog-docs.test.ts test/station-doc-ownership.test.ts test/policy-roundtrip-docs.test.ts`: 3 files and 12 tests passed. - [ ] Applicable broad gate passed — Not applicable to this doc-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) — The build passed with 0 errors. Fern reported the existing light-mode accent contrast warning. - [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) --- Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Clarified Ubuntu preparation behavior when PackageKit, APT, or dpkg activity is detected, including conditions that stop preparation before changes are made. - Expanded network policy preview guidance to explain that output reflects the maintained preset configuration and includes hosts, ports, access rules, protocols, TLS and enforcement settings, HTTP methods and paths, and binary allowlists. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Every path that newly applies a messaging-preset policy now discloses the full effective egress from the exact YAML being applied — host, port, protocol/TLS/access mode, per-rule methods and paths, and binaries — before any mutation. Before this change,
channels add,channels start,channels add --dry-run, onboarding widening, and rebuild reconciliation short-circuited before the host-only preview that onlypolicy-addprinted, so the WhatsApp preset silently opened a narrowly scopedGET raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Defaults/index.tsfetch that its description did not name.Related Issue
Fixes #7179
Changes
renderPresetScope/logPresetScopeinsrc/lib/policy/preset-scope-render.tsthat walks the parsed YAMLnetwork_policies.*.endpointsand prints host, port, protocol/TLS/access mode, per-rule methods and paths, and the declared binary allowlist. Derived from the exact YAML — description prose is not treated as the disclosure.applyPresetContentandapplyPresetsinsrc/lib/policy/index.tswith the structured render. This is the single choke point every apply path traverses, sochannels add/start, onboarding widening viasyncPresetSelection, and rebuild reconciliation now all disclose without further caller changes.channels add --dry-runandapplyExternalPreset(--from-file/--from-dir) insidesrc/lib/actions/sandbox/policy-channel.ts, because both short-circuit before the choke point. Replace the host-only preview inpolicy-addwith the same structured render.src/lib/messaging/channels/whatsapp/policy/openclaw.yamlandhermes.yamlto name the narrowly scoped Baileys protocol-version fetch. Advisory only; the structured render remains the disclosure.src/lib/policy/preset-scope-render.test.tscovers full-access tunnels, REST rules, exact paths, wildcards, binaries, empty and malformed YAML;src/lib/actions/sandbox/policy-channel-scope-disclosure.test.tsdrivesaddSandboxChannelwith the WhatsApp preset and asserts the narrow Baileys path is disclosed before the "would enable channel" line.test/policies.test.ts,test/policy-channel-agent-resolution.test.ts,test/package-contract/cli/policy-dispatch.test.ts,test/e2e/live/mcp-bridge-reliability.ts,test/e2e/support/mcp-bridge-reliability.test.ts,src/lib/actions/sandbox/policy-channel-policy.test.ts. Ratchet thetest/policies.test.tslegacy line budget down to match its trimmed size.Type of Change
Quality Gates
policy-addoutput that has never been separately documented; user-facing behaviour reads the same YAML the preset already ships.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run src/lib/policy/preset-scope-render.test.ts src/lib/actions/sandbox/policy-channel-scope-disclosure.test.ts src/lib/actions/sandbox/policy-channel-policy.test.ts test/policies.test.ts test/policy-channel-agent-resolution.test.ts test/e2e/support/mcp-bridge-reliability.test.ts— 134 passed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit