Skip to content

fix(rebuild): preserve external policy authority - #10116

Open
apurvvkumaria wants to merge 11 commits into
codex/9833-onboarding-authorityfrom
codex/9833-rebuild-authority
Open

fix(rebuild): preserve external policy authority#10116
apurvvkumaria wants to merge 11 commits into
codex/9833-onboarding-authorityfrom
codex/9833-rebuild-authority

Conversation

@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Summary

Sandbox rebuild now binds one recorded OpenShell policy authority through preflight, delete, recreate, restore, and recovery. A changed or externally managed policy stops NemoClaw policy mutation and success publication.

Related Issue

Part of #9833

Changes

  • Qualify rebuild policy requirements before destructive work.
  • Revalidate policy authority before sandbox, policy, credential, messaging, MCP, and registry mutations.
  • Preserve authority receipts through interrupted rebuild recovery and compensation.
  • Cover managed, external, drift, restart, and post-delete failure paths.

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 — focused rebuild authority and recovery 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: 9a60a4b9-7dd0-47b7-b3ea-03f9c4fc4001

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 6d7a3b1 in the codex/9833-rebuild-a... branch remains at 96%, unchanged from commit 7e7c814 in the codex/9833-onboardin... branch.

Show a line coverage summary of the most impacted files.
File codex/9833-onboardin... 7e7c814 codex/9833-rebuild-a... 6d7a3b1 +/-
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 23:12 UTC

@wscurran wscurran added area: policy Network policy, egress rules, presets, or sandbox policy area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression labels Aug 24, 2026
… into codex/9833-rebuild-authority

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

Copy link
Copy Markdown
Collaborator Author

The rebuild CI failures were fixture gaps. Production authority checks are unchanged. Verified commit adcb438 records managed authority and returns valid sandbox policy metadata in the affected rebuild fixtures.

Verification:

  • required two-file reproduction: 7 tests passed
  • affected rebuild process tests: 9 tests passed
  • focused rebuild authority tests: 24 tests passed
  • CLI typecheck passed
  • growth guardrails passed
  • repository, format, and diff checks passed
  • normal commit and push hooks passed
  • GitHub reports the signed commit as Verified

CI is rerunning against the repaired fixtures.

apurvvkumaria and others added 8 commits August 24, 2026 11:48
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
…d-authority

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: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants