fix(onboard): exclude inactive Hermes messaging presets - #10281
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
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:
📝 WalkthroughWalkthroughHermes onboarding now removes inactive repository messaging presets while preserving custom presets. Policy persistence failures now stop completion. Selection callbacks wait for sandbox readiness and synchronization. Rebuilds filter inactive presets. Discord endpoint binding now requires an exact protocol match. ChangesHermes messaging preset pruning
Hermes Discord protocol binding
Estimated code review effort: 3 (Moderate) | ~30 minutes Merge Risk: ⚪ Minimal · up to The PR’s inactive-preset behavior is covered by focused tests and no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant PolicySelection
participant SandboxControlPlane
participant PolicySynchronization
participant SelectionCallback
PolicySelection->>SandboxControlPlane: check readiness
SandboxControlPlane-->>PolicySelection: readiness result
PolicySelection->>PolicySynchronization: synchronize policies
PolicySynchronization-->>PolicySelection: synchronization result
PolicySelection->>SelectionCallback: report selection after success
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 11.76% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 17 functions across 20 files. (4 skipped: 4 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
|
Current head c1f19da has one candidate-owned CI blocker that the advisor did not report.\n\ncli-test-shards (7) fails in src/lib/onboard/openclaw-otel-policy-presets.test.ts at line 78 because its messaging-policy-presets mock does not export the new pruneInactiveHermesMessagingPolicyPresets function called by policy-preset-reconciliation.ts at line 52. Update that mock, preferably by retaining the real module exports and overriding only the test dependency, then run the focused test before pushing.\n\nThe shard 3 setup-nim-flow-serving-profile.test.ts timeout appears unrelated to this diff. After the mock fix, let ordinary CI rerun and complete the required common-egress-agent-hermes-open-reference,hermes-discord focused E2E before moving this draft toward approval. |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
I found no blocking correctness, product-scope, or security issue at commit e85bb2e. The manifest-derived Hermes pruning preserves operator-owned presets and OpenClaw behavior, and focused tests cover the changed paths. I am deferring approval because checks for the latest PR commit are still running. The available Review Advisor result applies to an earlier commit.
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
Current head
I will re-review the corrected exact head and approve once the blocker, receipts, ordinary checks, and focused E2E evidence are complete. |
|
Blocking review finding on exact head The Google Chat matrix commit addresses the earlier coverage blocker. One blocking correctness and security defect remains, matching Advisor PRA-1.
Move each I am not treating PRA-2 as a blocking correctness or security finding. The same-name assertion may be more restrictive than the registry implementation, but it does not create a current behavior defect. Security review: FAIL for Configuration and Security Headers because failed policy removal can persist session state that understates live egress. The other eight security categories pass for this head. The documentation receipt still names |
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
Exact-head review classification for The prior session-persistence ordering defect is fixed. Advisor PRA-1 is non-blocking. Advisor PRA-2 identifies a valid pre-existing registry-persistence gap, but Security review: PASS in all nine categories. The change only narrows repository-owned Hermes messaging policy selection, preserves same-name custom ownership and OpenClaw behavior, adds no authority, exposes no credential, and fails before recording the narrower session state when synchronization or readiness fails. Focused regression coverage includes inactive Slack and Google Chat, enabled-channel preservation, custom ownership, resume, and synchronization failure. This is not an approval. The recovery run for CLI shard 7 and the current managed-image check are still in progress, and the required exact-commit focused |
|
Exact-commit focused E2E classification for
All ordinary PR checks are green after the shard-7 recovery. No approval was submitted. |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
…tive-messaging-presets # Conflicts: # src/lib/onboard/policy-selection.ts # test/onboarding/onboard-policy-suggestions.test.ts
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
rsliter
left a comment
There was a problem hiding this comment.
Exact-head Advisor reconciliation for f53c448bdb2bc04a99c7ef7059821cec886a4eda:
The Test Design finding is valid for one candidate-owned hunk. test/onboarding/onboard-policy-suggestions.test.ts expands the pre-existing self-derived suggestion and finalization paths contribute identical channel presets oracle by adding googlechat. That oracle derives its expected value from the same registry used by both paths, so the added row cannot independently catch a bad Google Chat mapping. The direct mapping tests, literal suggestion assertions, and onboard-preset-diff Google Chat cases already protect the behavior.
Make the smallest scoped correction: revert only the candidate addition of googlechat to that pre-existing cross-verification matrix. Keep the literal Google Chat suggestion and application regressions. Run the focused file and refresh exact-head receipts after the new commit.
The Design and Architecture import-coupling finding is not candidate-owned. Current main already imports isStaleBuiltinWebSearchPolicyPreset from policy-selection in rebuild-backup-phase.ts; this PR does not change that import. It does not block this fix.
Security review remains PASS across all nine categories. This is review feedback, not an approval.
|
Reviewed exact head Two changes are required before approval:
I found no behavior, trust, operations, dependency-use, migration, or documentation defect in the current effective patch. Exact focused |
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
|
PR review advisory complete for commit |
|
Both required focused branch E2Es passed on latest PR commit 14be190. common-egress-agent-hermes-open-reference: https://github.com/NVIDIA/NemoClaw/actions/runs/33038874545/job/98408045584 hermes-discord: https://github.com/NVIDIA/NemoClaw/actions/runs/33038874545/job/98408045727 Full exact run: https://github.com/NVIDIA/NemoClaw/actions/runs/33038874545 |
Resolve the conflict against NVIDIA#10314 and NVIDIA#10281 by keeping main's suggestion gate and its shared inactive-preset helper. The original wrapper-based prune is dropped here and replaced by an agent-set change in the next commit. Signed-off-by: Hung Le <hple@nvidia.com>
NVIDIA#10281 stopped Hermes from carrying a repository messaging preset for a channel the sandbox does not configure. OpenClaw reaches the same selection paths, so it kept applying a preset for an unconfigured channel, including the Discord preset that names a sandbox-scoped credential provider create-plan validation rejects. Resolve the agent set from supportedAgents in the channel manifests instead of naming Hermes in the guard, and rename the helper to match what it now covers. An agent that appears in no manifest keeps its selection untouched, a missing messaging plan stays no authority to call a channel inactive, and a custom preset that shadows the name is still preserved. Read the rebuild agent from the messaging plan rather than the registry entry. getSandboxAgentRegistryFields stores agent as null for OpenClaw, so the registry field made every default OpenClaw rebuild skip the guard. Build rebuild's enabled-channel set with getActiveChannelIdsFromPlan. Filtering on `disabled` alone counted a configured channel the plan cannot start, which kept its egress preset and left the same dangling credential binding behind. Give the rebuild fixtures production-shaped plans. The existing custom-policy fixture passes even when the shared helper is a no-op, and the lifecycle fixture omitted `active` and its credential hashes, so it read as fully inactive once rebuild resolved the canonical active set. Refs NVIDIA#10153 Signed-off-by: Hung Le <hple@nvidia.com>
Summary
Hermes post-boot policy selection could retain repository-owned messaging presets when
enabledChannelsdid not include those channels. The selector now removes those inactive presets, preserves same-name custom presets, and retains required presets for enabled channels without changing OpenClaw selection.Related Issue
Part of #10153.
Supersedes #10296. This PR preserves Charan Jagwani's protocol-aware Hermes Discord fixture correction as commit
3cf9274893309fa837c994ae15680ce9849ae185and adds the production inactive-preset correction.E2E Root-Cause Claim
E2E root cause: Hermes policy selection / post-boot preset reconciliation / an inactive repository-owned messaging preset survives the authoritative enabled-channel set and references an unattached provider.
Source run: https://github.com/NVIDIA/NemoClaw/actions/runs/32869481833
Affected jobs:
Stable signature:
credential_binding references provider '<sandbox>-slack-app', but that provider is not attached to the sandbox.Scope: one root cause across two jobs. PR #10271 separately owns the earlier equal-specificity Slack route ambiguity. The Hermes Slack API HTTP 500 result is not part of this PR.
Focused E2E selectors:
common-egress-agent-hermes-open-reference,hermes-discord.Changes
The shared pruner serves the fresh, resume, and custom selection consumers. Separate filters at each call site would duplicate the channel-to-preset authority. The focused suggestion, resume, selection, and handler tests protect these paths.
Type of Change
Quality Gates
f53c448bdb2bc04a99c7ef7059821cec886a4eda; resultPASSwith no findings. The latest commit is a signed empty child of39aaae46641a133818622f441d63410905b4f574with the identical reviewed tree. The selector narrows repository-owned Hermes messaging presets to enabled channels, preserves same-name custom policies, restores required presets after pruning, and persists the selection only after live synchronization and readiness succeed. The change does not expose credentials or widen hosts, providers, methods, protocols, or policy authority.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubnpm run validate:prpassed for the unchanged effective patch at0273a1deb451f2c106658c27d7d0482eb9f913f9. Commit under reviewf53c448bdb2bc04a99c7ef7059821cec886a4edais a signed empty child with the identical tree, based on current main803a587752aef1896c659f0ed7373d501b3b4b24.npm run validate:pr,npm run docswith 0 errors and 2 existing warnings, andgit diff --checkpassed. The current signed empty child has the identical tree and stable patch ID.npm run validate:prpassed.npm run docsbuilds without warnings (doc changes only)Documentation Writer Review
docs-updatedf53c448bdb2bc04a99c7ef7059821cec886a4edaagainst base SHA803a587752aef1896c659f0ed7373d501b3b4b24. The latest PR commit is a signed empty child of39aaae46641a133818622f441d63410905b4f574with the same tree, and the stable patch ID matches the previously corrected diff. The four changed documentation pages accurately limit inactive built-in messaging preset removal and exact custom-policy preservation to Hermes. Shared onboarding guidance accurately states that skip mode applies required presets for enabled channels. The diagnostic, comments, and behavior-oriented test titles match the implementation. The supplied CLI build and typecheck, repository checks,npm run validate:pr, docs build with 0 errors and 2 existing warnings, focused deterministic tests, rebuild regression, and freshgit diff --checkpassed./root/docs_review_10270)Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com
Summary by CodeRabbit