Repository navigation
fix(policy): verify preset removal against operator-owned rules - #12983
Conversation
Ignore provider-composed readback entries when comparing policy documents. Keep strict matching for every operator-owned rule and preserve rejection of malformed policy documents. Fixes #12048 Replays the narrow fix from #12111. Co-authored-by: Cestercian <[email protected]> Signed-off-by: Aaron Erickson <[email protected]>
|
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. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 1ac92b5 in the Show a line coverage summary of the most impacted files.
TypeScript / code-coverage/cliThe overall line coverage in commit 1ac92b5 in the Show a line coverage summary of the most impacted files.
Updated |
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
|
Maintainer approval recorded for head 1ac92b5: Aaron explicitly approved and requested merge. All effective CI checks and CodeRabbit pass. The exact-head Docker/Podman E2E comparison satisfies the agreed do-no-harm rule; the evidence is in the PR description. No source changes followed verification. GitHub prohibits author self-approval for this NVIDIA-owned replay, so this records the approval before the authorized admin squash merge. Cestercian's credit is retained in the merge commit. |
…13662) ## Outcome Removing the Tavily preset detaches this sandbox's Tavily providers and verifies that effective policy denies search and extraction requests before reporting success. Shared credentials, other sandboxes, and unrelated operator rules are preserved. Deep Agents onboarding qualification can run without a Tavily key; only its authenticated Tavily check skips, with the reason retained in the uploaded artifacts. ## Reason The preset and provider profile can independently authorize `api.tavily.com`. Removing preset keys alone can leave authenticated requests allowed. Credential replacement also needs an explicit Tavily attachment on the sandbox's recorded gateway. In E2E run [40144054918](https://github.com/NVIDIA/NemoClaw/actions/runs/40144054918/job/121022177417), requiring Tavily skipped the target before onboarding because the workflow withheld that key. The required configuration-export evidence was never written. NVIDIA inference remains required; optional Tavily qualification follows the existing credential trust rules. ### Related issues Fixes #13082. Preserves the managed Python and operator-rule behavior from #6134 and #12983. ## Changes - Save disabled web-search intent before detaching both Tavily provider profiles. Verify sandbox identity, attachment readback, and effective denial. Preserve shared registrations and unrelated rules; report incomplete removal when verification fails. - Carry the saved selection through creation and rebuild so a removed provider is not inherited again. Give Tavily credential replacement an explicit attachment path on the recorded gateway. Other provider types retain rebuild guidance, including partial-reset and unavailable-metadata cases. - Keep authenticated Tavily coverage in the existing Deep Agents target. With a key, require HTTP 200 before removal and a fresh `DENIED` audit event for the managed Python probe's PID and `api.tavily.com:443` afterward. The real key stays on the host and gateway; sandbox Python sends a placeholder rewritten at egress. - Without a Tavily key, skip only `09-deepagents-code-tavily-opt-in.sh` and retain its status and reason under the uploaded `actions/` artifacts. Continue the other checks and required configuration export. Remove the obsolete planner rejection for required Tavily credentials. Credential exposure rules, authenticated failure checks, and live assertions remain unchanged. - Clean up only the preset applied by this invocation, remove its disposable provider, and restore the prior audit setting. Earlier setup failures preserve existing policy. Document attachment, gateway lookup, and rebuild behavior. ## Verification - The same focused regression selection produced 7 failures and 8 passes with the runner and registry from `5604f905b554cded1fdb63527560facc787dffb8`, then 15 passes with the repair. It covers absent and empty Tavily keys, required inference metadata, command selection, retained skip reasons, credential isolation, authenticated failures, and workflow trust cases. - `node_modules/.bin/vitest run test/e2e/support/platform-parity-cloud-experimental.test.ts test/e2e/support/trusted-target-routing-workflow-boundary.test.ts test/e2e/support/workflow-plan.test.ts test/e2e/support/workflow-plan-launchable.test.ts test/automation/pull-requests/growth-guardrails.test.ts --maxWorkers=1 --fileParallelism=false`: 249 passed with a test-local temporary directory. - `npm run e2e:assertions:check`: passed, with 1267 direct assertions across 77 live files. No live assertions or assertion-budget entries changed. - The installed pre-commit, commit-msg, and pre-push hooks passed, including publication validation and the CLI TypeScript check. - Oxfmt and `git diff --check` passed. The diff contains no secrets, API keys, or credentials. - Historical runtime tests at `8f79ad435e38c397e3ce1ffc716aeced8e395bc2`: 107 credential adapter, reset-outcome, and compiled-command cases passed. Those tests produced 14 failures and 93 passes against the earlier reset implementation. Credential runtime code is unchanged by the subsequent qualification repairs. - Historical `npm run docs` at `526827f8dda013aa95503dc8cff27ae5c02a027f`: 125 published pages, zero errors, and two Fern warnings. Rendered Deep Agents procedures and OpenClaw/Hermes variants were inspected. The later repairs do not change `docs/**`, navigation, or redirects. Hosted evaluation of latest PR commit `6ae77cedbe2acc1192368517128d04da14d8980e` is pending. Authenticated Linux x86_64 Tavily enforcement and audit qualification remain unverified for this commit. WSL ARM qualification is manual because this scenario has no supported selector. ## Review notes Decision: Accept sandbox-scoped Tavily revocation with conservative remaining-access verification. Reason: preset absence must agree with effective denial while preserving unrelated grants. Placement: the existing policy lifecycle and OpenShell attachment operations. Accountable maintainer: @deepujain. Validation plan: focused identity, partial-write, preserved-rule, production-wiring and rebuild regressions, followed by authenticated Linux x86_64 and manual WSL ARM qualification. A different binary path alone does not prove denial. OpenShell can authorize process ancestors or relax binary matching through trusted runtime configuration. Verification therefore retains possible grants when policy evidence is inconclusive, including audit mode, TLS passthrough, other protocols, and unsupported glob syntax. The nine [Advisor specialist reviews](https://github.com/NVIDIA/NemoClaw/actions/runs/40142367137) cleared `5604f905b554cded1fdb63527560facc787dffb8`. Self-review and the documentation writing review of latest PR commit `6ae77cedbe2acc1192368517128d04da14d8980e` found no additional blocker in this repair. Fresh independent automated review is pending. Sensitive policy, credential, onboarding, workflow, and E2E paths still require human review. DGX Station host-setup evidence is not applicable. --- Signed-off-by: Deepak Jain <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Tavily egress can be explicitly attached to individual sandboxes and must be reattached after a rebuild if needed. * Removing the Tavily policy preset detaches Tavily providers and verifies that access is revoked, while preserving shared gateway credentials. * Builds attach Tavily providers only when Tavily is enabled in the saved web-search selection. * Cloud E2E checks include an optional Tavily connectivity check when a key is available; otherwise, that check is skipped. * **Documentation** * Updated Tavily setup, credential management, troubleshooting, and rebuild guidance to explain attachment, access removal, and credential replacement. * Clarified that resetting a credential removes it from the gateway; next steps depend on the provider type. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Deepak Jain <[email protected]>
Outcome
Removing a policy preset returns success when OpenShell adds provider-composed entries to readback and every requested operator-owned rule matches. Missing or changed operator-owned rules still fail verification.
Reason
NemoClaw already strips reserved
_provider_*entries before policy writes, but compared the complete readback afterward. This produced a failure result even when the requested preset was removed.Related issues
Fixes #12048. Replays #12111 from Cestercian; keep the original open until this replay lands.
Changes
Verification
1ac92b5ded87b73a3e68f13283e9c6a6bac83e09. CodeRabbit reported minimal merge risk and no actionable comments.9cd663f. The PR reuses the immutable base-image cohort from that baseline; no image inputs changed.Do no harm verified on the unchanged head. Each of the 43 original head failures either subsequently passed (18) or matches a retained exact-baseline cause at the same stage (25). The complete E2E workflow remains red for inherited failures; this is a comparison verdict, not a claim that every E2E test passes.
The previously unresolved live cases were run sequentially using the original full workflow's unexpired, staged toolchains:
Deep Agents Code completed all nine functional phases, including fresh re-onboarding, cloud checks, export, and final-state verification. Its only failure is permission-denied cleanup of
/sandbox/.openclaw/workspace/POLICY.mdand/sandbox/.openclaw/agents/main/sessions; both paths and the same cleanup refusal are also recorded in the baseline.Other retained baseline failures include unsupported V1 messaging/configuration export, legacy custom-image/build-contract failures, Hermes initial model mismatch, Pi HTTP 401, sibling-create identity/recovery refusal, Slack credential-isolation assertions, native-home cleanup, publication health failures, and NIM disk exhaustion. Matching names alone were not used to clear them. The earlier provider-selection timing failure was traced to HTTP 429 retry waits and then cleared by a complete passing OpenClaw run.
No production, dependency, workflow, or E2E assertion changes were made during this comparison.
Review notes
The two policy paths are sensitive. Self-review checked strict matching of operator-owned fields, reserved provider ownership, invalid-document rejection, and preservation of the effective-policy concurrency check. The original PR's approval refers to an older commit; it does not approve this replay. CodeRabbit reviewed the published commit and reported no actionable comments; human approval remains separate from the original fork review.
Co-authored-by: Cestercian [email protected]
Signed-off-by: Aaron Erickson [email protected]
Summary by CodeRabbit