Skip to content

fix(mcp): preserve external policy authority - #10119

Open
apurvvkumaria wants to merge 5 commits into
codex/9833-channel-authorityfrom
codex/9833-mcp-authority
Open

fix(mcp): preserve external policy authority#10119
apurvvkumaria wants to merge 5 commits into
codex/9833-channel-authorityfrom
codex/9833-mcp-authority

Conversation

@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Summary

MCP bridge add, remove, restart, rebuild, and destroy operations now retain exact policy-authority receipts. Authority drift stops further policy-sensitive mutation and suppresses success publication.

Related Issue

Part of #9833

Changes

  • Qualify exact MCP policy requirements for managed and externally managed policy.
  • Revalidate authority and bridge state before provider, adapter, policy, registry, and sandbox mutations.
  • Preserve durable recovery markers and complete exact compensation after a refusal.
  • Cover add, remove, restart, rebuild, destroy, retry, drift, and post-delete finalization.

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:
  • 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

  • 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 validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — 545 focused CLI tests and 136 changed integration tests passed
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • 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)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Apurv Kumaria akumaria@nvidia.com

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 580e7894-e03e-4aa3-bc4a-794526a423da

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@github-code-quality

github-code-quality Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 230dfb2 in the codex/9833-mcp-autho... branch remains at 96%, unchanged from commit 009ab57 in the codex/9833-channel-a... branch.

Show a line coverage summary of the most impacted files.
File codex/9833-channel-a... 009ab57 codex/9833-mcp-autho... 230dfb2 +/-
nemoclaw/src/sh...cy-boundary.cts 100% 98% -2%
nemoclaw/src/bl...print/runner.ts 97% 96% -1%
nemoclaw/src/bl...est-fixtures.ts 100% 100% 0%

Updated August 24, 2026 19:47 UTC

@wscurran wscurran added area: policy Network policy, egress rules, presets, or sandbox policy bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior area: security Security controls, permissions, secrets, or hardening labels Aug 24, 2026
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator Author

The MCP discovery failures came from remove using an empty network-policy map as an authority probe. The policy parser correctly rejects that map before inspection.

Verified commit 7d8081e uses a valid capability-free per-server entry for managed removal. Recorded external authority requires the exact rendered MCP policy immediately; legacy external authority retries only after preflight persists external authority, and still verifies the exact policy before mutation.

Verification:

  • focused policy and remove tests: 31 passed
  • MCP lifecycle integration tests: 112 passed
  • CLI typecheck passed
  • growth guardrails passed
  • repository, targeted format, and diff checks passed
  • normal commit and push hooks passed
  • GitHub reports the signed commit as Verified

CI is rerunning with the corrected authority qualification.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
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 area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants