Skip to content

feat(policy): support persistent baseline network policy exclusions#7194

Merged
cv merged 73 commits into
mainfrom
feat/baseline-policy-exclusion
Jul 25, 2026
Merged

feat(policy): support persistent baseline network policy exclusions#7194
cv merged 73 commits into
mainfrom
feat/baseline-policy-exclusion

Conversation

@laitingsheng

@laitingsheng laitingsheng commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Operators could not express a persistent, explicit exclusion from an agent's built-in baseline network policy: policy remove only touches presets, and a raw openshell policy set narrowing is not rebuild-stable. This adds a distinct baseline-exclusion operation so an operator can remove an exact baseline entry (for example Hermes nous_research) and keep it removed across rebuild, accepting reduced and unsupported functionality in exchange for tighter egress.

Related Issue

Fixes #7178

Changes

  • Add policy exclude and policy restore: preview the exact removed scope, require explicit acknowledgement for mutation, apply the change to the live policy, and persist or clear the reviewed intent.
  • Persist exclusions as versioned, agent-bound records containing the exact key, reviewed content digest, acknowledgement, and applied agent version. Existing registries with no exclusion field continue to load; malformed, unversioned, or cross-agent exclusion records fail closed.
  • Replay exclusions through the canonical agent baseline resolver during create, rebuild, and snapshot restore. Missing or unreadable agent baselines no longer fall back to another agent's policy.
  • Ship the sandbox-policy schema used by runtime baseline validation and promote the already-locked ajv 8.18.0 from development-only to runtime dependencies so installed packages enforce the same boundary.
  • Reserve excluded keys throughout policy composition and live preset application. A preset or custom entry cannot silently reintroduce egress under an excluded key, including the shipped Hermes pypi collision.
  • Compare recorded intent with both the current baseline and observed live policy. Sandbox status and doctor distinguish agent changes, baseline drift, missing baseline entries, unreadable live policy, and live-policy mismatch instead of trusting registry state alone.
  • Keep managed_inference protected at both command and durable-replay boundaries because it carries the required managed inference route.
  • Surface exclusions in policy listing and sandbox/snapshot output, with recovery guidance for drift or mismatch states.
  • Canonicalize the policy command group to the two-token grammar (policy add, policy remove, and so on), while keeping hyphenated forms as hidden compatibility aliases.
  • Document the operator contract, collision behavior, persistence boundary, and live verification commands.

Maintainer decision

  • Command contract: policy exclude <key> --dry-run previews exact scope; mutation requires explicit acknowledgement; policy restore <key> restores the current baseline entry.
  • Eligibility: Exact current-agent baseline keys may be excluded except managed_inference.
  • Ownership and lifecycle: The operator owns the per-sandbox reduced-function choice. NemoClaw owns versioned persistence across rebuild and snapshot restore. The record cannot migrate implicitly between agents.
  • Compatibility: A legacy registry without baselineExclusions loads unchanged. Because this feature has not shipped, an exclusion record without the released schema version and agent owner is rejected rather than guessed or migrated.
  • Security boundary: Exclusions can only narrow egress. Approvals bind to exact entry content, excluded keys are reserved from other policy sources, and runtime health verifies the observed live policy.
  • Architecture: The four correctness invariants above belong in this feature PR. A later refactor may reorganize the transaction code, but it must not be required to make the feature safe.

Product-scope evidence is issue #7178 and the recorded maintainer decision above. This product decision is separate from GitHub mergeStateStatus, CI, and exact-head review state.

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)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • 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: Codex Desktop security specialist static review PASS for exact head 1f6ddfc8d against base f0f23ade5; all nine categories passed with no findings. This is agent evidence only; no human exact-head or sensitive-path review is claimed. Historical human review covered an earlier head.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: no-docs-needed
  • Evidence: Reviewed exact head f490578c93844bc9ef86036a34e73b4391e46d31. The head commit is empty and only retriggers CI. The substantive pairing retry change remains accurately covered by docs/manage-sandboxes/backup-restore.mdx, which already states that cross-sandbox restore establishes and authenticates OpenClaw gateway pairing and documents failure recovery. Focused suites passed 32/32 and 8/8; CLI typecheck and standard CI passed. No docs build is required because no documentation changed.
  • Agent: Codex Desktop documentation writer subagent

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit: Not applicable; scripts/prepare-dgx-station-host.sh is unchanged.
  • Station profile/scenario: Not applicable.
  • Result: Not applicable.
  • Supporting evidence: Not applicable.

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — exact head 1f6ddfc8d: conflict-adjacent CLI/integration suites 161/161; compiled package contracts 318/318 in a stable single-worker lane; documentation contracts 12/12; command-registry, EOF, and picker contracts 47/47; E2E semantic phase-plan validation passed.
  • Applicable broad gate passed — fresh exact-head GitHub CI is pending.
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only) — not a documentation-only PR; exact-head build passed with 0 errors and 2 pre-existing warnings.
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only) — no new documentation pages.

Additional exact-head evidence:

  • Tested pair: head 1f6ddfc8dd636cf26703b49c483ebcdba34f69c5, base f0f23ade57d7d4fb0bc8644f88b6d9525901d7c0.
  • Refresh: signed, non-force merge; product patch ID 708dc6253792eb3d38fd82cf258ef610deaa0914 and the 147-file changed-file list are identical to the preceding reviewed pair. The latest upstream commit had zero file overlap.
  • Diff-aware hooks: prek pre-commit, commitlint, and prek pre-push passed against upstream/main..HEAD under Node 22.19.0.
  • Diff-aware tests: the aggregate CLI/plugin/E2E-support diagnostic passed 12,314 tests and surfaced 58 high-concurrency/environment failures across 39 files. Every failed file was rerun serially with focused timeouts and repository runtime context (421/422), and the remaining unchanged macOS login-shell PATH case passed its complete file 18/18 with an isolated-home shim. No test finding remains unresolved.
  • Security: Codex Desktop exact-pair static review PASS, no actionable findings; no human exact-head review is claimed.
  • Commit verification: all 69 displayed commits are GitHub Verified.

Signed-off-by: Tinson Lai tinsonl@nvidia.com

Summary by CodeRabbit

  • New Features
    • Added policy exclude and policy restore for individual baseline network-policy entries, with --dry-run previews, acknowledgement safeguards, and durable replay across rebuilds and snapshot restores.
    • Expanded baseline-exclusion visibility across policy list, policy explain, sandbox status, doctor, and rebuild/snapshot flows, including repair-required guidance and fail-closed drift handling.
    • Prevented presets from overwriting reserved baseline-excluded keys; rebuild/snapshot restore can be blocked when repair is pending.
  • Documentation
    • Updated CLI guidance/examples to consistently use space-separated policy <verb> syntax (add/list/remove/explain/exclude/restore); legacy hyphenated spellings remain supported.
  • Chores
    • Shipped the sandbox policy schema for runtime validation.

Add a distinct baseline-exclusion operation so an operator can remove an
exact agent baseline network policy entry and keep it removed across
rebuild, accepting reduced and unsupported functionality in exchange for
tighter egress.

The exclusion previews every endpoint, method/path rule, and binary it
removes, requires explicit acknowledgement even non-interactively, binds
the approval to a digest of the reviewed entry, and fails closed on
create and rebuild when a release changes or removes that entry. The
selection is recorded in the sandbox registry and replayed through the
create-intent policy generation, so live policy, registry intent, and
rebuild output agree. Exclusions surface in policy list and sandbox
status; managed_inference stays protected pending product direction.

Also canonicalise the policy command group to the two-token grammar
(policy add, policy remove, ...), keeping the hyphenated policy-add forms
as hidden legacy aliases so existing scripts keep working while help,
completion, display, and advisory hints advertise the canonical form.

Fixes #7178

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds digest-bound baseline network-policy exclusions with policy exclude and policy restore, durable registry journaling, replay across onboarding, rebuild, and snapshot restore, status and diagnostic reporting, schema validation, lifecycle guards, and canonical spaced policy subcommands.

Changes

Baseline exclusion lifecycle

Layer / File(s) Summary
Baseline contracts and durable persistence
src/lib/policy/*, src/lib/state/*, src/lib/domain/policy-channel.ts, package.json
Adds versioned exclusion records, digest and agent validation, crash-recovery journals, runtime status classification, registry APIs, and packaged AJV policy-schema validation.
Policy enforcement and lifecycle replay
src/lib/policy/index.ts, src/lib/actions/sandbox/policy-channel.ts, src/lib/onboard/*
Implements exclusion and restoration against live gateway policy, reserves excluded keys from presets, replays exclusions during creation and rebuild, and preserves registry state during replacement flows.
CLI, reporting, and routing
src/commands/sandbox/policy/*, src/lib/cli/*, src/lib/actions/sandbox/{status,doctor,rebuild,snapshot}*, docs/reference/*
Adds CLI commands, reports exclusion and repair state, blocks unsafe lifecycle operations, supports legacy route aliases, and updates policy command documentation.
Validation and lifecycle coverage
src/**/*.test.ts, test/**/*.test.ts
Covers fail-closed mutations, journal recovery, drift, onboarding, rebuild convergence, snapshot cloning, diagnostics, routing, packaging, and live exclusion persistence.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#7406: Both changes extend sandbox doctor check aggregation and its corresponding test coverage.

Suggested labels: area: cli

Suggested reviewers: cv, jyaunches

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.59% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes cover persistent exclude/restore operations, digest-bound approval, replay on rebuild/restore, status/diagnostic visibility, and baseline protection as requested in #7178.
Out of Scope Changes check ✅ Passed The additional command, docs, schema, and test updates all support the baseline-exclusion feature set and do not appear unrelated to the issue scope.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: persistent baseline network policy exclusions in policy handling.
✨ 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 feat/baseline-policy-exclusion

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit f490578 in the feat/baseline-policy... branch remains at 96%, unchanged from commit dbac677 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit f490578 in the feat/baseline-policy... branch remains at 80%, unchanged from commit dbac677 in the main branch.

Show a code coverage summary of the most impacted files.
File main dbac677 feat/baseline-policy... f490578 +/-
src/lib/onboard/docker-cdi.ts 80% 70% -10%
src/lib/actions.../status-text.ts 47% 41% -6%
src/lib/shields/index.ts 72% 67% -5%
src/lib/policy/index.ts 58% 61% +3%
src/lib/actions...ocker-health.ts 65% 82% +17%
src/lib/onboard...box-prebuild.ts 74% 92% +18%
src/lib/policy/...ne-exclusion.ts 0% 97% +97%
src/lib/policy/...y-validation.ts 0% 100% +100%
src/commands/sa...licy/exclude.ts 0% 100% +100%
src/commands/sa...licy/restore.ts 0% 100% +100%

Updated July 25, 2026 18:07 UTC

@laitingsheng laitingsheng added area: policy Network policy, egress rules, presets, or sandbox policy feature PR adds or expands user-visible functionality labels Jul 19, 2026
@github-actions

github-actions Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / low confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: PR review advisor failed: PR review advisor SDK execution failed: session: omitted required tool result(s): pr_review_security_trust_context; security-trust-analysis omitted required analysis; turn: security-trust-analysis: omitted required tool result(s): pr_review_security_trust_context; security-trust-analysis omitted required analysis

Model lanes

  • GPT-5.6 Terra (primary): Failed
  • Nemotron 3 Ultra (second opinion): Failed after a partial review · low confidence · 0 blockers · 3 warnings · 1 suggestion

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, credential-sanitization, security-posture, channels-add-remove, channels-stop-start, full-e2e, hermes-e2e, inference-routing, network-policy, onboard-repair, onboard-resume, snapshot-commands, state-backup-restore, upgrade-stale-sandbox

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts (1)

126-146: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Forward exclusions through this resolver fixture.

The mock discards input.baselineExclusions and always returns [], so handler tests cannot detect a dropped replay request. Model this field from the input and add a non-empty propagation case.

🤖 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/onboard/machine/handlers/sandbox-test-fixtures.ts` around lines 126 -
146, The resolveCreateIntent fixture must preserve baselineExclusions from its
input instead of always returning an empty array. Update the input type and
returned policy in resolveCreateIntent to forward input.baselineExclusions, then
add a propagation case using non-empty exclusions to verify replay requests are
not dropped.
🧹 Nitpick comments (1)
test/package-contract/cli/public-argv-translation.test.ts (1)

97-111: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Test every alias through argv translation.

The Object.keys(SANDBOX_LEGACY_ROUTE_ALIASES) assertion locks the test to private metadata, while only policy-add proves legacy behavior. Table-drive canonical and legacy argv cases for every supported alias instead.

As per path instructions, prefer observable public-boundary outcomes over private-shape assertions.

🤖 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/package-contract/cli/public-argv-translation.test.ts` around lines 97 -
111, Update the test around sandboxRouteTokens to remove the private
Object.keys(SANDBOX_LEGACY_ROUTE_ALIASES) assertion and table-drive argv
translation cases for every supported canonical and legacy alias. Assert each
case through the public argv translation boundary, covering add, explain, get,
list, and remove, including their legacy hyphenated forms and expected two-token
routes.

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.

Inline comments:
In `@src/lib/onboard.ts`:
- Around line 2298-2300: Update the onboarding rebuild flow around
getBaselineExclusions to retain complete exclusion records, including
acknowledgement metadata, rather than mapping them to only key and digest. Carry
these full entries into the later registration call after the old registry row
is removed, so each rebuild replays the approvals. Add a regression test
covering two consecutive destructive rebuilds.

In `@src/lib/policy/index.ts`:
- Around line 857-873: Update excludeBaselineEntry to check the boolean result
from registry.addBaselineExclusion after applying the policy; return false when
the registry call fails, and return true only after the exclusion is
successfully recorded.

In `@src/lib/state/registry-normalization.ts`:
- Around line 23-25: Update the normalization logic around appliedAgentVersion
in src/lib/state/registry-normalization.ts:23-25 to retain both string values
and valid null values, including during registry load and disk serialization. In
src/lib/state/registry-normalization.test.ts:122-160, add coverage confirming an
entry with appliedAgentVersion: null round-trips unchanged.

---

Outside diff comments:
In `@src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts`:
- Around line 126-146: The resolveCreateIntent fixture must preserve
baselineExclusions from its input instead of always returning an empty array.
Update the input type and returned policy in resolveCreateIntent to forward
input.baselineExclusions, then add a propagation case using non-empty exclusions
to verify replay requests are not dropped.

---

Nitpick comments:
In `@test/package-contract/cli/public-argv-translation.test.ts`:
- Around line 97-111: Update the test around sandboxRouteTokens to remove the
private Object.keys(SANDBOX_LEGACY_ROUTE_ALIASES) assertion and table-drive argv
translation cases for every supported canonical and legacy alias. Assert each
case through the public argv translation boundary, covering add, explain, get,
list, and remove, including their legacy hyphenated forms and expected two-token
routes.
🪄 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: 5fcab3f2-bb95-420c-be3f-6205ea08247e

📥 Commits

Reviewing files that changed from the base of the PR and between 78e0e4e and b465f11.

📒 Files selected for processing (53)
  • docs/reference/network-policies.mdx
  • scripts/checks/openshell-policy-mutation-read.mts
  • src/commands/sandbox/policy/exclude.ts
  • src/commands/sandbox/policy/mutate.test.ts
  • src/commands/sandbox/policy/restore.ts
  • src/lib/actions/root-help.ts
  • src/lib/actions/sandbox/channel-status.ts
  • src/lib/actions/sandbox/exec-policy-hint-rendering.test.ts
  • src/lib/actions/sandbox/exec-policy-hint-rendering.ts
  • src/lib/actions/sandbox/policy-channel-baseline.test.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/actions/sandbox/rebuild-finalization.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/actions/sandbox/rebuild-restore-phase.ts
  • src/lib/actions/sandbox/status-snapshot.ts
  • src/lib/cli/command-registry.ts
  • src/lib/cli/public-argv-translation.ts
  • src/lib/cli/public-dispatch.ts
  • src/lib/cli/public-display-defaults.ts
  • src/lib/cli/public-route-metadata.ts
  • src/lib/domain/policy-channel.ts
  • src/lib/messaging/channels/telegram/hooks/status-health-eval.ts
  • src/lib/onboard.ts
  • src/lib/onboard/dashboard.ts
  • src/lib/onboard/initial-policy-baseline-exclusion.test.ts
  • src/lib/onboard/initial-policy.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/sandbox-create-intent-boundary.test.ts
  • src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/policy-tier-suppression.ts
  • src/lib/onboard/sandbox-create-intent-resolution.ts
  • src/lib/onboard/sandbox-create-intent-types.ts
  • src/lib/onboard/sandbox-create-intent.ts
  • src/lib/onboard/sandbox-create-plan-materialization.ts
  • src/lib/onboard/sandbox-create-plan.test.ts
  • src/lib/policy/baseline-exclusion.test.ts
  • src/lib/policy/baseline-exclusion.ts
  • src/lib/policy/context.test.ts
  • src/lib/policy/context.ts
  • src/lib/policy/failure-classifier.test.ts
  • src/lib/policy/index.ts
  • src/lib/sandbox/policy-command-support.ts
  • src/lib/sandbox/whatsapp-diagnostics.ts
  • src/lib/state/registry-normalization.test.ts
  • src/lib/state/registry-normalization.ts
  • src/lib/state/registry.ts
  • test/cli/dispatch-basics.test.ts
  • test/onboard-pre-destructive-intent.test.ts
  • test/package-contract/cli/command-registry.test.ts
  • test/package-contract/cli/public-argv-translation.test.ts
  • test/policies.test.ts
  • test/policy-explain-cli.test.ts

Comment thread src/lib/onboard.ts Outdated
Comment thread src/lib/policy/index.ts
Comment thread src/lib/state/registry-normalization.ts Outdated
@apurvvkumaria apurvvkumaria self-assigned this Jul 19, 2026
Co-authored-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>

@apurvvkumaria apurvvkumaria left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed 3bc5c32 to address the mechanical/data-integrity findings (durable full exclusion records, checked persistence, drift recheck, null round-trip, status JSON coverage, canonical CLI docs, and regressions). Two correctness gaps still block approval:

  1. Destructive resume is not transaction-safe. applySandboxResumeDecision can remove the durable registry row before replacement sandbox creation/registration succeeds. If creation then fails, the only persisted baselineExclusions record is gone, so a later retry can silently recreate the removed baseline route. Preserve the exclusion receipt durably until replacement registration commits (or restore the old row on failure), and add a failed-create/resume regression.

  2. The PR says it fixes #7178, whose acceptance criteria require exclusions and their impact in policy explain, snapshot/rebuild summaries, and diagnostics. The current implementation exposes them in policy list and status --json, but those other required surfaces still do not consume baselineExclusions. Complete those surfaces with tests, or narrow the linked issue/scope so the PR does not close unmet acceptance criteria.

Please keep the protected managed_inference behavior and the exact live-entry digest recheck from the pushed commit.

Comment thread src/lib/onboard.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 1657: Split the affected Markdown/MDX prose so each sentence occupies its
own source line: in docs/reference/commands.mdx at lines 1657, 1709, and 3592;
docs/reference/enterprise-readiness.mdx at lines 68-69, placing each table-cell
sentence on its own line; docs/reference/platform-support.mdx at line 135; and
docs/reference/troubleshooting.mdx at line 1348. Preserve the existing wording
and formatting while applying the one-sentence-per-line convention.

In `@test/package-contract/cli/public-argv-translation.test.ts`:
- Around line 96-125: Update both test titles in the policy routing tests— the
parameterized test covering canonical and legacy spellings and the test covering
canonical two-token subcommands—to append the applicable issue suffix “(`#7178`)”.
🪄 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: e6e3608f-e4a9-459f-9415-df318dac9408

📥 Commits

Reviewing files that changed from the base of the PR and between b465f11 and 3bc5c32.

📒 Files selected for processing (37)
  • ci/platform-matrix.json
  • docs/get-started/quickstart-langchain-deepagents-code.mdx
  • docs/get-started/quickstart.mdx
  • docs/manage-sandboxes/backup-restore.mdx
  • docs/manage-sandboxes/runtime-controls.mdx
  • docs/manage-sandboxes/set-up-slack.mdx
  • docs/network-policy/customize-network-policy.mdx
  • docs/network-policy/integration-policy-examples.mdx
  • docs/reference/cli-selection-guide.mdx
  • docs/reference/commands.mdx
  • docs/reference/enterprise-readiness.mdx
  • docs/reference/network-policies.mdx
  • docs/reference/platform-support.mdx
  • docs/reference/troubleshooting.mdx
  • src/commands/sandbox/policy/restore.ts
  • src/lib/actions/sandbox/policy-channel-baseline.test.ts
  • src/lib/actions/sandbox/status-snapshot.ts
  • src/lib/onboard.ts
  • src/lib/onboard/initial-policy-baseline-exclusion.test.ts
  • src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
  • src/lib/onboard/machine/handlers/sandbox.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/sandbox-create-intent-resolution.ts
  • src/lib/onboard/sandbox-create-intent-types.ts
  • src/lib/onboard/sandbox-create-plan.test.ts
  • src/lib/onboard/sandbox-registration.test.ts
  • src/lib/onboard/sandbox-registration.ts
  • src/lib/policy/baseline-exclusion-persistence.test.ts
  • src/lib/policy/baseline-exclusion.test.ts
  • src/lib/policy/baseline-exclusion.ts
  • src/lib/policy/index.ts
  • src/lib/sandbox/policy-command-support.ts
  • src/lib/state/registry-normalization.test.ts
  • src/lib/state/registry-normalization.ts
  • src/lib/state/registry.ts
  • test/package-contract/cli/public-argv-translation.test.ts
  • test/sandbox-status-json-stdout.test.ts
🚧 Files skipped from review as they are similar to previous changes (15)
  • src/lib/onboard/sandbox-create-intent-resolution.ts
  • src/commands/sandbox/policy/restore.ts
  • src/lib/onboard/initial-policy-baseline-exclusion.test.ts
  • src/lib/state/registry-normalization.ts
  • src/lib/state/registry-normalization.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/sandbox-create-plan.test.ts
  • docs/reference/network-policies.mdx
  • src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
  • src/lib/state/registry.ts
  • src/lib/actions/sandbox/policy-channel-baseline.test.ts
  • src/lib/policy/index.ts
  • src/lib/policy/baseline-exclusion.test.ts
  • src/lib/policy/baseline-exclusion.ts
  • src/lib/sandbox/policy-command-support.ts

Comment thread docs/reference/commands.mdx Outdated
Comment thread test/package-contract/cli/public-argv-translation.test.ts
…eline exclusions

Restore the removed registry row when replacement sandbox creation fails
during a destructive resume, so an approved baseline exclusion is not
silently dropped on a later retry. Also disclose exclusions and their
support impact in `policy explain`, rebuild summaries, and `doctor`
diagnostics, and cover the untested resolveCreateIntent fixture gap.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/doctor.ts`:
- Around line 357-378: Update baselineExclusionDoctorChecks to distinguish all
three baseline states: matching digests should remain informational as actively
excluded, differing non-null digests should remain warnings requiring
re-approval, and a null currentDigest should report the exclusion as no longer
in the baseline and inert. Ensure the null state does not claim dependent
features remain unsupported or include the re-approval warning intended for
changed entries.
🪄 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: c56464ee-361e-4266-90f9-b3c9708277a6

📥 Commits

Reviewing files that changed from the base of the PR and between 3bc5c32 and eb221ce.

📒 Files selected for processing (16)
  • docs/manage-sandboxes/backup-restore.mdx
  • src/lib/actions/sandbox/doctor-flow.test.ts
  • src/lib/actions/sandbox/doctor.ts
  • src/lib/actions/sandbox/policy-explain.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/onboard.ts
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/onboard/machine/handlers/sandbox-destructive-resume-rollback.test.ts
  • src/lib/onboard/machine/handlers/sandbox-resume.test.ts
  • src/lib/onboard/machine/handlers/sandbox-resume.ts
  • src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/policy/context.test.ts
  • src/lib/policy/context.ts
  • src/lib/policy/failure-classifier.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • docs/manage-sandboxes/backup-restore.mdx
  • src/lib/onboard/machine/core-flow-phases.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/onboard.ts

Comment thread src/lib/actions/sandbox/doctor.ts
laitingsheng and others added 2 commits July 19, 2026 11:37
Fix the doc round-trip test still asserting the legacy hyphenated
`policy-get` heading now that the canonical CLI grammar is two-token, and
replace branching mock implementations with lookup tables to keep new
test files free of added conditionals.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Co-authored-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/lib/actions/sandbox/snapshot.test.ts (1)

220-220: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the new snapshot output path with a behavior test.

This mock keeps existing tests passing, but no test verifies that a successful snapshot prints the exclusion key and support-impact summary. Add one with getBaselineExclusions returning an entry and assert the CLI output.

🤖 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/snapshot.test.ts` at line 220, Add a behavior test in
the snapshot test suite for a successful snapshot using the mocked
getBaselineExclusions function. Return a non-empty exclusion entry from the
mock, execute the snapshot path, and assert that CLI output includes both the
exclusion key and the support-impact summary.
🤖 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/doctor.ts`:
- Around line 373-376: Update the hint logic in restoreBaselineEntry handling in
src/lib/actions/sandbox/doctor.ts#L373-L376 to branch on currentDigest === null:
provide a restore-only hint for removed baseline entries, while preserving the
restore-and-re-review instructions for changed entries. Update
docs/reference/network-policies.mdx#L309-L317 to separately document
changed-entry re-approval and removed-entry stale-record cleanup.

---

Nitpick comments:
In `@src/lib/actions/sandbox/snapshot.test.ts`:
- Line 220: Add a behavior test in the snapshot test suite for a successful
snapshot using the mocked getBaselineExclusions function. Return a non-empty
exclusion entry from the mock, execute the snapshot path, and assert that CLI
output includes both the exclusion key and the support-impact summary.
🪄 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: e4930bca-915e-4a8a-8dd7-1b0043c75e3c

📥 Commits

Reviewing files that changed from the base of the PR and between 1c24fb7 and 92bb6f0.

📒 Files selected for processing (26)
  • docs/reference/commands.mdx
  • docs/reference/network-policies.mdx
  • docs/reference/troubleshooting.mdx
  • src/lib/actions/sandbox/doctor-flow.test.ts
  • src/lib/actions/sandbox/doctor.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/actions/sandbox/policy-explain.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/actions/sandbox/snapshot-baseline-exclusion-summary.test.ts
  • src/lib/actions/sandbox/snapshot-baseline-exclusion-summary.ts
  • src/lib/actions/sandbox/snapshot.test.ts
  • src/lib/actions/sandbox/snapshot.ts
  • src/lib/actions/sandbox/status-flow.test.ts
  • src/lib/actions/sandbox/status-text.ts
  • src/lib/onboard/machine/handlers/sandbox-destructive-resume-rollback.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/policy/baseline-exclusion-persistence.test.ts
  • src/lib/policy/baseline-exclusion.ts
  • src/lib/policy/context.test.ts
  • src/lib/policy/context.ts
  • src/lib/policy/index.ts
  • src/lib/state/registry-normalization.test.ts
  • src/lib/state/registry-normalization.ts
  • test/package-contract/cli/public-argv-translation.test.ts
  • test/policy-explain-cli.test.ts
  • test/support/status-flow-test-harness.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • src/lib/actions/sandbox/policy-explain.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/actions/sandbox/doctor-flow.test.ts
  • src/lib/policy/context.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/policy/baseline-exclusion.ts
  • src/lib/policy/index.ts
  • docs/reference/troubleshooting.mdx
  • src/lib/policy/context.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • docs/reference/commands.mdx

Comment thread src/lib/actions/sandbox/doctor.ts Outdated
apurvvkumaria and others added 2 commits July 19, 2026 04:50
Co-authored-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
doctor's drift hint told operators to review and re-approve a baseline
key with `policy exclude --dry-run` even when the release removed the
key entirely, where that command fails with "Unknown baseline entry".
Branch the hint on whether the key still exists so a removed entry only
gets the restore-and-clear instruction, and split the matching docs
section into changed-entry vs removed-entry recovery paths.

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@laitingsheng laitingsheng added v0.0.87 Release target v0.0.89 and removed v0.0.87 Release target labels Jul 19, 2026
Co-authored-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria
apurvvkumaria dismissed their stale review July 19, 2026 12:34

Addressed on exact head 882b9c9: destructive-resume exclusion recovery is transaction-safe, all required policy/rebuild/diagnostic surfaces are covered, and removed baseline keys now use restore-only guidance across doctor, runtime errors, and docs.

cv added 2 commits July 19, 2026 07:01
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

v0.0.89 disposition: deferred at the product-scope gate. The branch is refreshed, the mechanical conflict preserves both provider selection and baseline-exclusion replay, focused tests/typecheck/hooks pass, and the missing successful-snapshot disclosure test plus command-reference sentence are now added. I am not approving while #7178 remains open with needs: design and needs: triage: this PR creates a new supported policy operation, persistence contract, rebuild behavior, and compatibility surface, and the issue itself says the UX and critical-entry behavior require product direction. Accept that design and ownership/lifecycle/security/validation contract first; then re-run the final gate on the resulting revision.

Co-authored-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria
apurvvkumaria requested a review from cv July 19, 2026 17:35
@senthilr-nv senthilr-nv self-assigned this Jul 24, 2026
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/security/openclaw-2026.6.10-dependency-review.md (1)

83-89: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep each sentence on one source line.

Lines 83-89 split sentences across multiple Markdown lines.

Suggested edit
-This section is a point-in-time record of the remediation shipped for the
-2026.6.10 runtime. The current 2026.7.1 path installs the reviewed core archive
-directly because its core graph already contains the fixed versions, and keeps
-only the version-scoped Slack and Microsoft Teams Axios remediation plus the
-diagnostics Jaeger remediation added for the 2026.7.1 archive. See
-[`openclaw-2026.7.1-dependency-review.md`](./openclaw-2026.7.1-dependency-review.md)
-for the active source and validation boundary.
+This section is a point-in-time record of the remediation shipped for the 2026.6.10 runtime.
+The current 2026.7.1 path installs the reviewed core archive directly because its core graph already contains the fixed versions, and keeps only the version-scoped Slack and Microsoft Teams Axios remediation plus the diagnostics Jaeger remediation added for the 2026.7.1 archive.
+See [`openclaw-2026.7.1-dependency-review.md`](./openclaw-2026.7.1-dependency-review.md) for the active source and validation boundary.

As per coding guidelines, “Keep one sentence per line in Markdown and MDX source files.”

🤖 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 `@docs/security/openclaw-2026.6.10-dependency-review.md` around lines 83 - 89,
Reformat the introductory paragraph in the 2026.6.10 dependency review so each
sentence remains on a single Markdown source line. Preserve the wording,
paragraph structure, and link references while joining the currently wrapped
sentence fragments.

Source: Coding guidelines

🤖 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 `@docs/security/openclaw-2026.6.10-dependency-review.md`:
- Around line 83-89: Reformat the introductory paragraph in the 2026.6.10
dependency review so each sentence remains on a single Markdown source line.
Preserve the wording, paragraph structure, and link references while joining the
currently wrapped sentence fragments.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d0c1b9b5-d3c2-4ad6-b6e3-67f990d73757

📥 Commits

Reviewing files that changed from the base of the PR and between d5116ce and 3360ac2.

📒 Files selected for processing (49)
  • ci/platform-matrix.json
  • docs/deployment/deploy-to-headless-server.mdx
  • docs/get-started/quickstart-langchain-deepagents-code.mdx
  • docs/get-started/quickstart.mdx
  • docs/manage-sandboxes/backup-restore.mdx
  • docs/monitoring/manage-deepagents-trace-export.mdx
  • docs/monitoring/set-up-deepagents-trace-export.mdx
  • docs/monitoring/verify-deepagents-trace-export.mdx
  • docs/network-policy/apply-policy-presets.mdx
  • docs/network-policy/change-baseline-network-policy.mdx
  • docs/network-policy/configure-raw-tls-passthrough.mdx
  • docs/network-policy/create-custom-policy-presets.mdx
  • docs/network-policy/customize-network-policy.mdx
  • docs/network-policy/explain-network-policy-to-agents.mdx
  • docs/network-policy/integration-policy-examples.mdx
  • docs/network-policy/replace-live-network-policy.mdx
  • docs/network-policy/set-up-gmail-with-an-app-password.mdx
  • docs/reference/commands.mdx
  • docs/reference/enterprise-readiness.mdx
  • docs/reference/network-policies.mdx
  • docs/reference/platform-support.mdx
  • docs/reference/troubleshooting.mdx
  • docs/security/openclaw-2026.6.10-dependency-review.md
  • package.json
  • src/lib/actions/sandbox/dcode-probe-test-fixture.ts
  • src/lib/actions/sandbox/policy-channel-add-drift.test.ts
  • src/lib/actions/sandbox/policy-channel-baseline.test.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/actions/sandbox/rebuild-destroy-phase.test.ts
  • src/lib/actions/sandbox/rebuild-destroy-phase.ts
  • src/lib/actions/sandbox/rebuild-local-provider-recreate.test.ts
  • src/lib/actions/sandbox/rebuild-pipeline.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/actions/sandbox/rebuild-preflight-guards.ts
  • src/lib/actions/sandbox/rebuild-preflight-phase.ts
  • src/lib/actions/sandbox/restore-gateway-pairing.test.ts
  • src/lib/actions/sandbox/restore-gateway-pairing.ts
  • src/lib/actions/sandbox/snapshot-auto-create-failure.test.ts
  • src/lib/actions/sandbox/snapshot-restore-lifecycle.test.ts
  • src/lib/actions/sandbox/snapshot-restore-test-fixture.ts
  • src/lib/actions/sandbox/snapshot.test.ts
  • src/lib/actions/sandbox/snapshot.ts
  • src/lib/actions/sandbox/status-flow.test.ts
  • src/lib/agent/onboard.ts
  • src/lib/onboard.ts
  • src/lib/onboard/authoritative-rebuild-target.test.ts
  • src/lib/onboard/authoritative-rebuild-target.ts
  • src/lib/onboard/dashboard.ts
🚧 Files skipped from review as they are similar to previous changes (25)
  • ci/platform-matrix.json
  • src/lib/onboard/dashboard.ts
  • src/lib/onboard/authoritative-rebuild-target.ts
  • docs/get-started/quickstart.mdx
  • src/lib/actions/sandbox/rebuild-post-restore-phase.test.ts
  • docs/reference/platform-support.mdx
  • src/lib/agent/onboard.ts
  • docs/reference/enterprise-readiness.mdx
  • src/lib/actions/sandbox/snapshot-restore-lifecycle.test.ts
  • src/lib/onboard/authoritative-rebuild-target.test.ts
  • src/lib/actions/sandbox/rebuild-local-provider-recreate.test.ts
  • src/lib/actions/sandbox/rebuild-post-restore-phase.ts
  • src/lib/actions/sandbox/status-flow.test.ts
  • package.json
  • docs/manage-sandboxes/backup-restore.mdx
  • src/lib/actions/sandbox/policy-channel-baseline.test.ts
  • docs/reference/network-policies.mdx
  • src/lib/actions/sandbox/snapshot.test.ts
  • src/lib/onboard.ts
  • docs/reference/troubleshooting.mdx
  • src/lib/actions/sandbox/snapshot-restore-test-fixture.ts
  • src/lib/actions/sandbox/snapshot.ts
  • src/lib/actions/sandbox/rebuild-destroy-phase.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • docs/reference/commands.mdx

Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
Signed-off-by: Senthil Ravichandran <senthilr@nvidia.com>
@senthilr-nv senthilr-nv added v0.0.96 Release target and removed v0.0.95 labels Jul 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/policy-preset-picker.test.ts (1)

14-19: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use an ESM import for the source module in this root-level test. test/policy-preset-picker.test.ts still loads src/lib/policy/index.ts through createRequire at lines 14-19; switch this to a direct ESM source import or an ESM-compatible test seam.

🤖 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/policy-preset-picker.test.ts` around lines 14 - 19, Replace the
createRequire-based loading of the policies module in
policy-preset-picker.test.ts with a direct ESM import of
src/lib/policy/index.ts, or use an existing ESM-compatible test seam; keep the
imported policies API unchanged for the test.
🤖 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/policy-preset-picker.test.ts`:
- Around line 14-19: Replace the createRequire-based loading of the policies
module in policy-preset-picker.test.ts with a direct ESM import of
src/lib/policy/index.ts, or use an existing ESM-compatible test seam; keep the
imported policies API unchanged for the test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f9b009fc-1a89-4385-8131-4949b011b566

📥 Commits

Reviewing files that changed from the base of the PR and between 3360ac2 and 1f6ddfc.

📒 Files selected for processing (11)
  • docs/get-started/quickstart.mdx
  • docs/reference/commands.mdx
  • src/lib/actions/sandbox/doctor-flow.test.ts
  • src/lib/actions/sandbox/doctor.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/policy/index.ts
  • test/openclaw-dependency-review.test.ts
  • test/package-contract/cli/policy-prompt-eof.test.ts
  • test/policies.test.ts
  • test/policy-preset-picker.test.ts
  • test/pr-workflow-contract.test.ts
💤 Files with no reviewable changes (1)
  • test/policies.test.ts
🚧 Files skipped from review as they are similar to previous changes (6)
  • docs/get-started/quickstart.mdx
  • src/lib/actions/sandbox/doctor.ts
  • src/lib/actions/sandbox/doctor-flow.test.ts
  • src/lib/policy/index.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • docs/reference/commands.mdx

@senthilr-nv

Copy link
Copy Markdown
Collaborator

Exact-head automated-review disposition for 1f6ddfc8dd636cf26703b49c483ebcdba34f69c5 on base f0f23ade57d7d4fb0bc8644f88b6d9525901d7c0:

  • The canonical PR Review Advisor ledger is informational/high-confidence with 0 blockers, 0 warnings, and 0 suggestions. The Nemotron second-opinion lane stopped after a partial, low-confidence review because its ledger tool failed. Its eight preserved artifact items are dispositioned below.
  • F-001: no change. Canonical spaced policy routes are registered and exercised at the public argv boundary; legacy hyphenated spellings intentionally remain compatibility aliases. Exact-head package-contract and focused command tests pass.
  • F-002: no change. Exact-head specialist-agent security review passed all nine categories. Exclusion records contain keys, digests, agent identity, and acknowledgement metadata—not credential values—and checked-in tests cover protected/missing/stale/cross-agent records, transition repair, persistence, and replay. This is agent/static evidence, not a claim of human sensitive-path review.
  • F-003: no change. Snapshot/rebuild preservation and retry paths have focused lifecycle coverage; exact-head focused tests passed 161/161 and package contracts passed 318/318. Credentialed E2E remains governed by the required exact-pair gate and is not waived by this disposition.
  • F-004: no change. This PR changes one descriptive ci/platform-matrix.json sentence at the declarative-network-policy row. PR feat(gateway): manage the default gateway service #7319 changes distinct rows, and PR feat(messaging): add Google Chat channel #7317 has no platform-matrix patch. There is no overlapping matrix hunk or lost provider entry. The branch was refreshed by signed merge, not rebased.
  • F-005: no change. The baseline-exclusion implementation is already extracted into src/lib/policy/baseline-exclusion.ts; src/lib/policy/index.ts is the integration facade. A broader refactor has no current requirement and would add unrelated merge risk.
  • F-006 and F-007: no change. Sandbox recreation reapplies exclusions during initial-policy creation, pending transitions fail closed, status/doctor report live drift, and the successful rebuild summary discloses the carried-over keys. The live rebuild agreement path is covered by the snapshot/rebuild E2E test. The successful primary advisor independently assessed the acceptance clause as met.
  • F-008: no change. The documentation says status and doctor perform live comparison; it does not say the restore phase performs that comparison. Rebuild output accurately reports exclusions as carried over, matching the implementation and behavior test.
  • CodeRabbit's exact-head incremental review posted no new actionable comment. Its docstring-coverage item is a repository-policy advisory warning, not a required check; blanket docstring churn is not required. All prior CodeRabbit review threads are resolved, and the exact-head CodeRabbit status is successful.

No actionable automated-review finding remains. Required CI and exact-pair E2E gates are tracked separately and must still pass before merge.

@senthilr-nv

Copy link
Copy Markdown
Collaborator

Exact-pair E2E blocker for head 1f6ddfc8dd636cf26703b49c483ebcdba34f69c5 / base f0f23ade57d7d4fb0bc8644f88b6d9525901d7c0:

This is not a branch conflict or a product-test failure. Repository policy makes the exact-pair gate terminal on this head, so it cannot be rerun or waived for merge. An upstream gate/environment fix must land first; then this PR needs a fresh exact head and the full exact-head evidence/gate cycle.

senthilr-nv and others added 4 commits July 25, 2026 09:26
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@cv
cv merged commit 96422d5 into main Jul 25, 2026
74 of 79 checks passed
@cv
cv deleted the feat/baseline-policy-exclusion branch July 25, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: policy Network policy, egress rules, presets, or sandbox policy feature PR adds or expands user-visible functionality v0.0.96 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support explicit persistent exclusions from the agent baseline network policy

6 participants