Skip to content

refactor(sandbox): remove Shields from core - #10722

Merged
ericksoa merged 99 commits into
mainfrom
refactor/remove-shields-core-10696
Sep 3, 2026
Merged

refactor(sandbox): remove Shields from core#10722
ericksoa merged 99 commits into
mainfrom
refactor/remove-shields-core-10696

Conversation

@ericksoa

@ericksoa ericksoa commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Outcome

Removes Shields from NemoClaw core in one atomic change: the CLI, plugin, runtime-provider contract, policies, manifests, docs, tests, and compiled command surface no longer expose a Shields capability. Existing installations with legacy Shields state receive an explicit retirement notice and are routed through fail-closed rebuild, recreation, or destruction recovery before ordinary mutation.

Reason

NemoClaw should not own post-provisioning immutability as an inherent product concept. A future ecosystem product or composable blueprint can provide that capability on top of NemoClaw without coupling every supported agent and runtime provider to a built-in Shields state machine.

Related issues

Fixes #10696

Changes

  • Delete the public shields up, shields down, and shields status commands, plugin status affordance, src/lib/shields, permissive-policy and state-lock-plan assets, runtime-provider stateMutation contract, Hermes mutation publisher/controller/gate, and Shields-specific E2E and unit infrastructure.
  • Keep ordinary sandbox state mutable under OpenShell policy authority. Preserve only agent-neutral integrity controls such as restart transactions, config hashing, cross-process lifecycle exclusion, and a narrowed operational audit for supported configuration and inference mutations.
  • Add a bounded upgrade migration that detects legacy state without interpreting it. CLI startup identifies affected sandbox records and announces retirement; any timer, transition, policy, containment, or authority-bearing provider artifact globally blocks onboarding and mutation. The error names the active state directory and exact quarantine units; recovery requires reboot, trusted backup, and moving every whole unit outside active state before retrying rebuild or recreate. Inert per-sandbox records are retired only after verified mutable rebuild or exact destruction.
  • Clean the complete CLI and plugin output trees before normal builds and publication so an in-place source upgrade cannot retain an old command or internal module. Package-contract tests seed stale Shields, deploy, and unrelated outputs and prove the real root and standalone-plugin builds contain only current artifacts.
  • Preserve Hermes' supported mutable lazy-dependency lifecycle without restoring Shields: a sandbox-identity, descriptor-rooted normalizer makes installed package directories gateway-readable while rejecting privileged execution, foreign ownership, cross-filesystem entries, hardlinks, special files, races, and unbounded traversal. The image proof requires sandbox install/write, gateway import, and gateway write denial.
  • Delete additional code made inert by the removal: legacy OpenClaw lock/unlock recovery, Shields-only policy and agent-authority helpers, unused rebuild inputs, obsolete workflow-check helpers, and mechanical test/support tails.
  • Replace active Shields documentation with retirement and trusted-data-transfer guidance. Historical changelog and security-review records remain as historical evidence only.

Verification

  • npm run validate:pr — passed on the published commit against the refreshed canonical comparison ref.
  • npm run build:cli and npm run typecheck:cli — passed.
  • npm --prefix nemoclaw run build and npm --prefix nemoclaw run typecheck — passed.
  • npm run validate:configs — 52/52 configuration files passed.
  • npm run checks:repository — architecture, imports, project membership, source-shape, and growth checks passed.
  • npm run test:e2e-phases:check — 132 semantic E2E phase tests across 87 files passed.
  • npm --prefix tools/mcp-tool-discovery-runtime run bundle:reviewed:check — passed.
  • npm run docs — passed with 0 errors and 2 unrelated existing Fern warnings.
  • Focused package/standalone-build contracts — 3/3 passed; mock/live parity passed against the exact base and candidate.
  • Focused removed-immutability and caller admission — 64/64 passed; OpenClaw guard/rebuild/policy follow-up — 189/189 passed; conflict-sensitive fail-closed rebuild suite — 75/75 passed.
  • Hermes permission, dependency, portable-context, and image-contract focus — 73 passed, 2 skipped; a cached managed-image proof passed under the real sandbox and gateway identities.
  • Manual generated-command and public-surface scan — no Shields command, flag, manifest field, or supported posture remains; legacy references are limited to upgrade diagnostics and historical records.
  • gitleaks and the pre-commit private-key check passed; the diff contains no secrets, API keys, or credentials.

Review notes

  • This is intentionally one atomic removal rather than a sequence of partially compatible PRs. The diff changes 512 files, with 8,145 insertions and 90,597 deletions (82,452 net lines removed).
  • Broad local npm test and npm run test:changed attempts were not green on this loaded macOS host. The observed failures included fixed-timeout/load behavior, a known invalid host-local gateway registry row, macOS /private/var normalization, and a snapshot-sanitizer hardlink case that reproduced intermittently on clean main. A serial replay of the initially red changed set passed 301/308; its remaining seven failures are in unchanged files and reduce to that host registry plus one macOS temp/timing fixture. The implementation-owned gates and focused suites above pass, and clean PR CI remains authoritative.
  • Legacy recovery artifacts are deliberately preserved rather than interpreted or deleted by the new version. Authority-bearing artifacts block all sandbox mutation until the operator reboots, backs up the exact printed paths, and moves the whole quarantine units outside active state. Cross-sandbox snapshot restore from an affected legacy image remains blocked; recreation transfers only trusted user data.

Signed-off-by: Aaron Erickson aerickson@nvidia.com

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa ericksoa self-assigned this Aug 31, 2026
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 604 files, which is 304 over the limit of 300.

To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d798335d-06cc-4dc4-b342-38254394d04c

📥 Commits

Reviewing files that changed from the base of the PR and between f2ee031 and fff3bca.

📒 Files selected for processing (604)
  • .agents/skills/_shared/controlled-words.md
  • .agents/skills/nemoclaw-maintainer-cross-issue-sweep/checks/fingerprint-extraction.md
  • .agents/skills/nemoclaw-maintainer-cross-issue-sweep/relationship-rules.md
  • .agents/skills/nemoclaw-maintainer-runtime-provider/references/activation-and-qualification.md
  • .agents/skills/nemoclaw-maintainer-runtime-provider/references/api-contract.md
  • .agents/skills/nemoclaw-maintainer-runtime-provider/references/implementation-and-review.md
  • .coderabbit.yaml
  • .github/actions/publish-managed-image-digest/validate.sh
  • .github/workflows/e2e.yaml
  • .github/workflows/managed-images.yaml
  • .github/workflows/podman-cpu-proof.yaml
  • .github/workflows/sandbox-images-and-e2e.yaml
  • .pre-commit-config.yaml
  • Dockerfile
  • Dockerfile.base
  • agents/hermes/Dockerfile
  • agents/hermes/Dockerfile.base
  • agents/hermes/config/generate.ts
  • agents/hermes/generate-config.ts
  • agents/hermes/hermes-wrapper.py
  • agents/hermes/image-build-probes.py
  • agents/hermes/manifest.yaml
  • agents/hermes/mcp-config-transaction.py
  • agents/hermes/patch-cron-execution-runtime.py
  • agents/hermes/patch-gateway-runtime-metadata.py
  • agents/hermes/patch-hermes-sqlite-temp-store.py
  • agents/hermes/policy-additions.yaml
  • agents/hermes/policy-permissive.yaml
  • agents/hermes/runtime-boundaries.patch
  • agents/hermes/runtime-config-guard.py
  • agents/hermes/runtime-state-mutation-publisher-v1.json
  • agents/hermes/start.sh
  • agents/hermes/state-lock-plan.json
  • agents/hermes/validate-env-secret-boundary.py
  • agents/langchain-deepagents-code/manifest.yaml
  • agents/nemocua/manifest.yaml
  • agents/openclaw/manifest.yaml
  • agents/openclaw/policy-permissive.yaml
  • agents/openclaw/state-lock-plan.json
  • agents/pi/Dockerfile
  • agents/pi/manifest.yaml
  • ci/cli-test-timing-hints.json
  • ci/env-var-doc-allowlist.json
  • ci/full-e2e-cold-path-calibration.json
  • ci/pi-agent-qualification-v1-linux-amd64.json
  • ci/pi-agent-qualification-v1-linux-arm64.json
  • ci/source-architecture-budget.json
  • ci/source-shape-test-budget.json
  • ci/test-file-size-budget.json
  • docs/.docs-skip
  • docs/configure-agents/configure-memory-search.mdx
  • docs/deployment/deploy-to-headless-server.mdx
  • docs/deployment/set-up-mcp-bridge.mdx
  • docs/inference/configure-inference-timeouts.mdx
  • docs/inference/set-up-sub-agent.mdx
  • docs/inference/switch-models.mdx
  • docs/inference/switch-providers.mdx
  • docs/manage-sandboxes/backup-restore.mdx
  • docs/manage-sandboxes/gateway-lifecycle-control.mdx
  • docs/manage-sandboxes/install-plugins-hermes.mdx
  • docs/manage-sandboxes/recover-rebuild-sandboxes.mdx
  • docs/manage-sandboxes/run-pi.mdx
  • docs/manage-sandboxes/run-sandboxes.mdx
  • docs/manage-sandboxes/runtime-controls.mdx
  • docs/manage-sandboxes/uninstall-nemoclaw.mdx
  • docs/reference/commands.mdx
  • docs/reference/host-files-and-state.mdx
  • docs/reference/pi-commands.mdx
  • docs/reference/troubleshooting.mdx
  • docs/security/best-practices.mdx
  • docs/security/credential-storage.mdx
  • docs/security/filesystem-controls.mdx
  • docs/security/tcb-boundary.mdx
  • internal/security-reviews/hermes-0.19.0-dependency-review.md
  • internal/security-reviews/openclaw-2026.6.10-dependency-review.md
  • internal/security-reviews/openshell-0.0.101-migration-review.md
  • internal/security-reviews/openshell-0.0.72-compatibility-review.mdx
  • internal/security-reviews/openshell-0.0.99-migration-review.md
  • nemoclaw-blueprint/policies/openclaw-sandbox-permissive.yaml
  • nemoclaw-blueprint/policies/openclaw-sandbox.yaml
  • nemoclaw/package.json
  • nemoclaw/src/commands/config-show.test.ts
  • nemoclaw/src/commands/config-show.ts
  • nemoclaw/src/commands/shields-status.test.ts
  • nemoclaw/src/commands/shields-status.ts
  • nemoclaw/src/commands/slash.test.ts
  • nemoclaw/src/commands/slash.ts
  • package.json
  • scripts/bench/README.md
  • scripts/bench/lib.mts
  • scripts/bench/run.mts
  • scripts/bench/trace-ingest.mts
  • scripts/checks/layer-import-boundaries.mts
  • scripts/checks/pi-qualification-receipt-refresh.mts
  • scripts/checks/pull-public-exact-digest.sh
  • scripts/checks/test-create-require-budget.mts
  • scripts/lib/generate-agent-state-lock-plans.mts
  • scripts/lib/normalize_mutable_config_perms.py
  • scripts/lib/sandbox-init.sh
  • scripts/nemoclaw-start.sh
  • scripts/openclaw-config-guard.py
  • scripts/patch-openclaw-shared-state-permissions.mts
  • scripts/runtime-state-mutation-control.py
  • scripts/runtime-state-mutation-startup-gate.py
  • scripts/runtime-state-mutation-transport-broker.py
  • scripts/runtime_state_mutation_hermes_publisher.py
  • scripts/state-dir-guard.py
  • scripts/validate-configs.mts
  • src/commands/sandbox/connect.ts
  • src/commands/sandbox/destroy.test.ts
  • src/commands/sandbox/oclif-command-adapters.test.ts
  • src/commands/sandbox/shields/down.ts
  • src/commands/sandbox/shields/status.ts
  • src/commands/sandbox/shields/up.ts
  • src/commands/sandbox/snapshot.test.ts
  • src/commands/sandbox/snapshot/restore.ts
  • src/lib/README.md
  • src/lib/actions/inference-set-gateway-restart.ts
  • src/lib/actions/inference-set-gateway-route-containment.test.ts
  • src/lib/actions/inference-set-hermes-run.test.ts
  • src/lib/actions/inference-set-openclaw-gateway-restart.test.ts
  • src/lib/actions/inference-set-openclaw-pairing.test.ts
  • src/lib/actions/inference-set-openclaw-run.test.ts
  • src/lib/actions/inference-set-provider-alias.test.ts
  • src/lib/actions/inference-set-reasoning-effort.test.ts
  • src/lib/actions/inference-set-shields.test.ts
  • src/lib/actions/inference-set.test-support.ts
  • src/lib/actions/inference-set.ts
  • src/lib/actions/maintenance.test.ts
  • src/lib/actions/maintenance.ts
  • src/lib/actions/root-help.ts
  • src/lib/actions/sandbox/agent/connect-shields-relock-notice.test.ts
  • src/lib/actions/sandbox/agent/connect-shields-relock-notice.ts
  • src/lib/actions/sandbox/agent/passthrough-help.test.ts
  • src/lib/actions/sandbox/agent/passthrough-help.ts
  • src/lib/actions/sandbox/agent/passthrough-ollama-recovery.test.ts
  • src/lib/actions/sandbox/agent/passthrough-shields-warning.test.ts
  • src/lib/actions/sandbox/agent/passthrough-shields-warning.ts
  • src/lib/actions/sandbox/agent/passthrough.test.ts
  • src/lib/actions/sandbox/agent/passthrough.ts
  • src/lib/actions/sandbox/backup-shields-window.ts
  • src/lib/actions/sandbox/channel-status.test-helpers.ts
  • src/lib/actions/sandbox/connect-flow.test.ts
  • src/lib/actions/sandbox/connect-shields-relock-wiring.test.ts
  • src/lib/actions/sandbox/connect.ts
  • src/lib/actions/sandbox/destroy-execution.ts
  • src/lib/actions/sandbox/destroy-flow.test.ts
  • src/lib/actions/sandbox/destroy-host-local-inference.test.ts
  • src/lib/actions/sandbox/destroy-openclaw-mcp-force.test.ts
  • src/lib/actions/sandbox/destroy-preflight.ts
  • src/lib/actions/sandbox/destroy-timeout-recovery.test.ts
  • src/lib/actions/sandbox/destroy.ts
  • src/lib/actions/sandbox/doctor-config-perms.test.ts
  • src/lib/actions/sandbox/doctor-config-perms.ts
  • src/lib/actions/sandbox/doctor-flow.test.ts
  • src/lib/actions/sandbox/doctor.ts
  • src/lib/actions/sandbox/exec-openclaw-permission-cleanup.test.ts
  • src/lib/actions/sandbox/exec.test.ts
  • src/lib/actions/sandbox/exec.ts
  • src/lib/actions/sandbox/launch-readiness.ts
  • src/lib/actions/sandbox/mcp-bridge-adapter-hermes-branding.test.ts
  • src/lib/actions/sandbox/mcp-bridge-adapter-hermes.ts
  • src/lib/actions/sandbox/mcp-bridge-adapter-openclaw.ts
  • src/lib/actions/sandbox/mcp-bridge-adapters.ts
  • src/lib/actions/sandbox/mcp-bridge-add-restart.ts
  • src/lib/actions/sandbox/mcp-bridge-destroy-forced-scrub.test.ts
  • src/lib/actions/sandbox/mcp-bridge-destroy.ts
  • src/lib/actions/sandbox/mcp-bridge-openclaw-shields-config.test.ts
  • src/lib/actions/sandbox/mcp-bridge-rebuild.ts
  • src/lib/actions/sandbox/mcp-bridge-remove.ts
  • src/lib/actions/sandbox/mcp-bridge-restart.ts
  • src/lib/actions/sandbox/mcp-bridge-runtime-capabilities.ts
  • src/lib/actions/sandbox/policy-channel-conflict.test.ts
  • src/lib/actions/sandbox/process-recovery-lock.test.ts
  • src/lib/actions/sandbox/process-recovery.ts
  • src/lib/actions/sandbox/rebuild-backup-phase.test.ts
  • src/lib/actions/sandbox/rebuild-backup-phase.ts
  • src/lib/actions/sandbox/rebuild-dcode-artifact-drift.test.ts
  • src/lib/actions/sandbox/rebuild-dcode-mutation-edge.test.ts
  • src/lib/actions/sandbox/rebuild-dcode-pre-delete-drift.test.ts
  • src/lib/actions/sandbox/rebuild-destroy-phase.test.ts
  • src/lib/actions/sandbox/rebuild-destroy-phase.ts
  • src/lib/actions/sandbox/rebuild-flow-helpers.test.ts
  • src/lib/actions/sandbox/rebuild-flow-helpers.ts
  • src/lib/actions/sandbox/rebuild-flow-lifecycle.test.ts
  • src/lib/actions/sandbox/rebuild-flow-recovery.test.ts
  • src/lib/actions/sandbox/rebuild-flow-shields-window.test.ts
  • src/lib/actions/sandbox/rebuild-flow-target-image.test.ts
  • src/lib/actions/sandbox/rebuild-gpu-opt-out.ts
  • src/lib/actions/sandbox/rebuild-hermes-accepted-target.test.ts
  • src/lib/actions/sandbox/rebuild-mcp-phase.test.ts
  • src/lib/actions/sandbox/rebuild-mcp-phase.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-phase.ts
  • src/lib/actions/sandbox/rebuild-recreate-observability.test.ts
  • src/lib/actions/sandbox/rebuild-recreate-phase.ts
  • src/lib/actions/sandbox/rebuild-recreate-reasoning.test.ts
  • src/lib/actions/sandbox/rebuild-restore-phase.test.ts
  • src/lib/actions/sandbox/rebuild-resume-snapshot.test.ts
  • src/lib/actions/sandbox/rebuild-shields-finally.test.ts
  • src/lib/actions/sandbox/rebuild-shields-phase.test.ts
  • src/lib/actions/sandbox/rebuild-shields-phase.ts
  • src/lib/actions/sandbox/rebuild-shields.ts
  • src/lib/actions/sandbox/runtime-env.test.ts
  • src/lib/actions/sandbox/skill-install.test.ts
  • src/lib/actions/sandbox/skill-install.ts
  • src/lib/actions/sandbox/snapshot-auto-create-failure.test.ts
  • src/lib/actions/sandbox/snapshot-command-host-local-authority.test.ts
  • src/lib/actions/sandbox/snapshot-failed-create-cleanup.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/snapshot/backup-authority.test.ts
  • src/lib/actions/sandbox/start.test.ts
  • src/lib/actions/sandbox/start.ts
  • src/lib/actions/sandbox/status-flow.test.ts
  • src/lib/actions/sandbox/status-text.ts
  • src/lib/actions/sandbox/wipe-state.ts
  • src/lib/actions/uninstall/all-gateway-ports.test.ts
  • src/lib/actions/uninstall/run-plan-portable-runtime.test.ts
  • src/lib/actions/uninstall/run-plan.ts
  • src/lib/actions/upgrade-sandboxes.ts
  • src/lib/adapters/container-engine.test.ts
  • src/lib/adapters/container-engine.ts
  • src/lib/adapters/podman/index.test.ts
  • src/lib/adapters/podman/index.ts
  • src/lib/adapters/sandbox/command-transport.test.ts
  • src/lib/adapters/sandbox/command-transport.ts
  • src/lib/advisories/types.ts
  • src/lib/agent/candidate-authority.ts
  • src/lib/agent/definition-types.ts
  • src/lib/agent/defs.test.ts
  • src/lib/agent/defs.ts
  • src/lib/agent/hermes-recovery-boundary-fixtures.ts
  • src/lib/agent/manifest-readers.ts
  • src/lib/agent/onboard.test.ts
  • src/lib/agent/runtime.test.ts
  • src/lib/agent/state-directory-contract.test.ts
  • src/lib/agent/state-directory-contract.ts
  • src/lib/cli/duration-flags.test.ts
  • src/lib/cli/duration-flags.ts
  • src/lib/cli/nemoclaw-oclif-command.test.ts
  • src/lib/cli/nemoclaw-oclif-command.ts
  • src/lib/cli/public-display-defaults.ts
  • src/lib/coverage-hotspots.test.ts
  • src/lib/domain/duration.test.ts
  • src/lib/domain/duration.ts
  • src/lib/inference/local-docker-isolation.test.ts
  • src/lib/onboard.ts
  • src/lib/onboard/build-context-stage.test.ts
  • src/lib/onboard/build-context-stage.ts
  • src/lib/onboard/docker-gpu-patch-clone.ts
  • src/lib/onboard/dockerfile-remote-dashboard-bind-contract.ts
  • src/lib/onboard/entry-options.ts
  • src/lib/onboard/experimental/hermes-portable-build-context-files.ts
  • src/lib/onboard/experimental/hermes-portable-build-context.ts
  • src/lib/onboard/experimental/hermes-portable-contract.ts
  • src/lib/onboard/experimental/hermes-portable-lifecycle.ts
  • src/lib/onboard/experimental/hermes-portable-onboarding.ts
  • src/lib/onboard/experimental/hermes-portable-podman-authority.ts
  • src/lib/onboard/experimental/hermes-portable-receipt.ts
  • src/lib/onboard/experimental/portable-agent-lifecycle.ts
  • src/lib/onboard/initial-policy-real-policy.test.ts
  • src/lib/onboard/lifecycle-contracts.md
  • src/lib/onboard/managed-startup-agent-environment.test.ts
  • src/lib/onboard/managed-startup-image-runtime-handoff.test.ts
  • src/lib/onboard/managed-startup-shared-state-transaction.test.ts
  • src/lib/onboard/managed-startup/agent-environment.ts
  • src/lib/onboard/managed-startup/image-runtime.ts
  • src/lib/onboard/managed-workload-rebuild-transaction.test.ts
  • src/lib/onboard/runtime-provider/access.ts
  • src/lib/onboard/runtime-provider/activation.test.ts
  • src/lib/onboard/runtime-provider/activation.ts
  • src/lib/onboard/runtime-provider/container-state-mutation.ts
  • src/lib/onboard/runtime-provider/contract.ts
  • src/lib/onboard/runtime-provider/docker-state-mutation.test.ts
  • src/lib/onboard/runtime-provider/docker-state-mutation.ts
  • src/lib/onboard/runtime-provider/docker.ts
  • src/lib/onboard/runtime-provider/mxc.test.ts
  • src/lib/onboard/runtime-provider/mxc.ts
  • src/lib/onboard/runtime-provider/persisted-engine-authority.ts
  • src/lib/onboard/runtime-provider/persisted-engine-lifecycle.test.ts
  • src/lib/onboard/runtime-provider/persisted-engine-lifecycle.ts
  • src/lib/onboard/runtime-provider/podman-preflight.test.ts
  • src/lib/onboard/runtime-provider/podman-preflight.ts
  • src/lib/onboard/runtime-provider/podman-runtime-surfaces.test.ts
  • src/lib/onboard/runtime-provider/podman-state-mutation.test.ts
  • src/lib/onboard/runtime-provider/podman-state-mutation.ts
  • src/lib/onboard/runtime-provider/podman.test.ts
  • src/lib/onboard/runtime-provider/podman.ts
  • src/lib/onboard/runtime-provider/registry.ts
  • src/lib/onboard/runtime-provider/runtime-provider-contract.test.ts
  • src/lib/onboard/runtime-provider/state-mutation.test.ts
  • src/lib/onboard/runtime-provider/state-mutation.ts
  • src/lib/onboard/sandbox-create/orchestration.ts
  • src/lib/onboard/sandbox-create/rebuild-policy-handoff.test.ts
  • src/lib/onboard/sandbox-workload-preparation.test.ts
  • src/lib/onboard/sandbox-workload-rebuild.test.ts
  • src/lib/onboard/types.ts
  • src/lib/onboard/verify-channel-runtime.test.ts
  • src/lib/onboard/workload/preparation.ts
  • src/lib/onboard/workload/rebuild.ts
  • src/lib/policy/README.md
  • src/lib/policy/context-builder.ts
  • src/lib/policy/index.ts
  • src/lib/sandbox/agent-config.test.ts
  • src/lib/sandbox/agent-config.ts
  • src/lib/sandbox/build-context.ts
  • src/lib/sandbox/config-get.test.ts
  • src/lib/sandbox/config-read-not-ready.test.ts
  • src/lib/sandbox/config-rotate-token.ts
  • src/lib/sandbox/config.ts
  • src/lib/sandbox/hermes-dashboard-reseed.test.ts
  • src/lib/sandbox/mutable-config-perms.test.ts
  • src/lib/sandbox/mutable-config-perms.ts
  • src/lib/sandbox/openclaw-config-guard.test.ts
  • src/lib/sandbox/openclaw-config-guard.ts
  • src/lib/sandbox/privileged-exec-exclusion.test.ts
  • src/lib/sandbox/privileged-exec.test.ts
  • src/lib/sandbox/privileged-exec.ts
  • src/lib/shields/audit-format.test.ts
  • src/lib/shields/audit-reader.test.ts
  • src/lib/shields/audit.ts
  • src/lib/shields/auto-restore-target.test.ts
  • src/lib/shields/deferred-exit.ts
  • src/lib/shields/flow.test.ts
  • src/lib/shields/hermes-runtime-state-mutation.test.ts
  • src/lib/shields/hermes-runtime-state-mutation.ts
  • src/lib/shields/index.test.ts
  • src/lib/shields/index.ts
  • src/lib/shields/inference-convergence.test.ts
  • src/lib/shields/inference-convergence.ts
  • src/lib/shields/legacy-hermes-compat.test.ts
  • src/lib/shields/legacy-hermes-transition.test.ts
  • src/lib/shields/mcp-policy-transition.test.ts
  • src/lib/shields/mcp-policy-transition.ts
  • src/lib/shields/mutable-config-perms.test.ts
  • src/lib/shields/mutable-config-perms.ts
  • src/lib/shields/mutable-config-repair.test.ts
  • src/lib/shields/mutable-config-repair.ts
  • src/lib/shields/openclaw-config-lock.test.ts
  • src/lib/shields/openclaw-config-lock.ts
  • src/lib/shields/openclaw-transition.test.ts
  • src/lib/shields/permissive-runtime.ts
  • src/lib/shields/policy-delta.test.ts
  • src/lib/shields/policy-transition.test.ts
  • src/lib/shields/relock-reconfirm.test.ts
  • src/lib/shields/relock-reconfirm.ts
  • src/lib/shields/seal.test.ts
  • src/lib/shields/seal.ts
  • src/lib/shields/state-dir-lock.test.ts
  • src/lib/shields/state-dir-lock.ts
  • src/lib/shields/status-state-lock-plan.test.ts
  • src/lib/shields/timer-bound-lock.test.ts
  • src/lib/shields/timer-bound-lock.ts
  • src/lib/shields/timer-control.test.ts
  • src/lib/shields/timer-control.ts
  • src/lib/shields/timer-process.test.ts
  • src/lib/shields/timer-recovery-budget.test.ts
  • src/lib/shields/timer.test.ts
  • src/lib/shields/timer.ts
  • src/lib/shields/transition-lock.test.ts
  • src/lib/shields/transition-lock.ts
  • src/lib/shields/verify-lock.test.ts
  • src/lib/shields/verify-lock.ts
  • src/lib/state/audit/operational.test.ts
  • src/lib/state/audit/operational.ts
  • src/lib/state/mcp-lifecycle-lock-acquisition.test.ts
  • src/lib/state/mcp-lifecycle-lock-acquisition.ts
  • src/lib/state/mcp-lifecycle-lock-identity.test.ts
  • src/lib/state/mcp-lifecycle-lock-identity.ts
  • src/lib/state/mcp-lifecycle-lock.ts
  • src/lib/state/mcp-lifecycle-lock/decisions.test.ts
  • src/lib/state/mcp-lifecycle-lock/decisions.ts
  • src/lib/state/mcp-lifecycle-lock/inspection.ts
  • src/lib/state/mcp-lifecycle-lock/shields-timer-authority.test.ts
  • src/lib/state/mcp-lifecycle-lock/shields-timer-authority.ts
  • src/lib/state/migrations/removed-immutability.test.ts
  • src/lib/state/migrations/removed-immutability.ts
  • src/lib/state/user-managed-files-probe.test.ts
  • src/lib/tunnel/allowed-origins.test.ts
  • test/agents/hermes/hermes-config-transaction-wiring.test.ts
  • test/agents/hermes/hermes-dependency-review.test.ts
  • test/agents/hermes/hermes-discord-recovery-permissions.test.ts
  • test/agents/hermes/hermes-doctor-config-hash.test.ts
  • test/agents/hermes/hermes-env-secret-boundary-hardening.test.ts
  • test/agents/hermes/hermes-gateway-supervisor-recovery.test.ts
  • test/agents/hermes/hermes-gateway-wrapper.test.ts
  • test/agents/hermes/hermes-image-build-probes.test.ts
  • test/agents/hermes/hermes-lazy-dependency-lifecycle.test.ts
  • test/agents/hermes/hermes-mcp-config-transaction.test.ts
  • test/agents/hermes/hermes-mcp-shields-order.test.ts
  • test/agents/hermes/hermes-mcp-startup-probe.test.ts
  • test/agents/hermes/hermes-nonroot-strict-hash-reconciliation.test.ts
  • test/agents/hermes/hermes-openshell-runtime-env-boundary.test.ts
  • test/agents/hermes/hermes-restart-config-seal-hostile-input.test.ts
  • test/agents/hermes/hermes-restart-config-seal-recovery.test.ts
  • test/agents/hermes/hermes-restart-config-seal-transition.test.ts
  • test/agents/hermes/hermes-restart-config-seal-write-lock.test.ts
  • test/agents/hermes/hermes-runtime-api-key.test.ts
  • test/agents/hermes/hermes-runtime-config-guard-topology.test.ts
  • test/agents/hermes/hermes-runtime-config-guard.test.ts
  • test/agents/hermes/hermes-share-mount-deps.test.ts
  • test/agents/hermes/hermes-sqlite-temp-store-patch.test.ts
  • test/agents/hermes/hermes-start-config-integrity.test.ts
  • test/agents/hermes/hermes-start.test.ts
  • test/agents/hermes/hermes-tirith-retry-finalization.test.ts
  • test/agents/openclaw/openclaw-2026-7-startup-compat.test.ts
  • test/agents/openclaw/openclaw-config-guard-absent-hash.test.ts
  • test/agents/openclaw/openclaw-config-guard-lock-reseal.test.ts
  • test/agents/openclaw/openclaw-config-guard-mutable-unlock.test.ts
  • test/agents/openclaw/openclaw-config-guard-startup-failure-gate.test.ts
  • test/agents/openclaw/openclaw-config-guard.test.ts
  • test/agents/openclaw/openclaw-config-transaction-wiring.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-config-io.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-locked-migration.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-locked-parent.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-perms.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-reasoning-effort.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-reconcile.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start-sealed-restart.test.ts
  • test/agents/openclaw/runtime/nemoclaw-start.test.ts
  • test/automation/pull-requests/pr-risk-plan.test.ts
  • test/bench/bench.test.ts
  • test/cli/doctor-gateway-token.test.ts
  • test/cli/root-help.test.ts
  • test/cli/shields-transition-lock.test.ts
  • test/cli/snapshot-shields.test.ts
  • test/e2e-gateway-isolation.sh
  • test/e2e-runtime/entrypoint-env-wrapper.test.ts
  • test/e2e-runtime/pull-public-exact-digest.test.ts
  • test/e2e-runtime/repro-4538-raw-doctor-perms.test.ts
  • test/e2e/README.md
  • test/e2e/fixtures/phases/onboarding.ts
  • test/e2e/fixtures/redaction.ts
  • test/e2e/fixtures/shell-probe.ts
  • test/e2e/fixtures/shields-failed-startup.ts
  • test/e2e/live/agent-turn-latency-helpers.ts
  • test/e2e/live/agent-turn-latency.test.ts
  • test/e2e/live/bedrock-runtime-compatible-anthropic.test.ts
  • test/e2e/live/brave-search-helpers.ts
  • test/e2e/live/brave-search.test.ts
  • test/e2e/live/channels-add-remove.test.ts
  • test/e2e/live/channels-stop-start-googlechat-proof.ts
  • test/e2e/live/channels-stop-start.test.ts
  • test/e2e/live/cloud-inference.test.ts
  • test/e2e/live/cloud-onboard.test.ts
  • test/e2e/live/common-egress-agent.test.ts
  • test/e2e/live/concurrent-gateway-ports.test.ts
  • test/e2e/live/cron-preflight-inference-local.test.ts
  • test/e2e/live/dcode-base-image-runtime-evidence.ts
  • test/e2e/live/device-auth-health-helpers.ts
  • test/e2e/live/device-auth-health.test.ts
  • test/e2e/live/double-onboard.test.ts
  • test/e2e/live/full-e2e.test.ts
  • test/e2e/live/gateway-guard-recovery.test.ts
  • test/e2e/live/gpu-double-onboard.test.ts
  • test/e2e/live/gpu-e2e.test.ts
  • test/e2e/live/hermes-discord.test.ts
  • test/e2e/live/hermes-e2e-phases.ts
  • test/e2e/live/hermes-e2e.test.ts
  • test/e2e/live/hermes-gpu-startup.test.ts
  • test/e2e/live/hermes-inference-switch-helpers.ts
  • test/e2e/live/hermes-inference-switch.test.ts
  • test/e2e/live/hermes-sandbox-secret-boundary.test.ts
  • test/e2e/live/hermes-shields-config.test.ts
  • test/e2e/live/hermes-slack-e2e-helpers.ts
  • test/e2e/live/issue-2478-crash-loop-recovery.test.ts
  • test/e2e/live/issue-4462-scope-upgrade-approval.test.ts
  • test/e2e/live/launchable-smoke.test.ts
  • test/e2e/live/managed-image-activation-e2e-helpers.ts
  • test/e2e/live/mcp-bridge-hermes-lifecycle.ts
  • test/e2e/live/mcp-bridge-phases.ts
  • test/e2e/live/mcp-bridge.test.ts
  • test/e2e/live/messaging-compatible-endpoint.test.ts
  • test/e2e/live/messaging-providers-helpers.ts
  • test/e2e/live/model-router-provider-routed-inference.test.ts
  • test/e2e/live/network-policy.test.ts
  • test/e2e/live/onboard-repair.test.ts
  • test/e2e/live/onboard-resume.test.ts
  • test/e2e/live/openclaw-discord-pairing.test.ts
  • test/e2e/live/openclaw-inference-switch.test.ts
  • test/e2e/live/openclaw-plugin-runtime-exdev.test.ts
  • test/e2e/live/openclaw-slack-pairing.test.ts
  • test/e2e/live/openshell-gateway-upgrade-helpers.ts
  • test/e2e/live/openshell-gateway-upgrade.test.ts
  • test/e2e/live/phase6-messaging-helpers.ts
  • test/e2e/live/podman-cpu-lifecycle-helpers.ts
  • test/e2e/live/podman-cpu-lifecycle.test.ts
  • test/e2e/live/rebuild-openclaw.test.ts
  • test/e2e/live/sandbox-operations.test.ts
  • test/e2e/live/sandbox-survival.test.ts
  • test/e2e/live/sessions-agents-cli.test.ts
  • test/e2e/live/shields-config.test.ts
  • test/e2e/live/shields-retirement-upgrade.test.ts
  • test/e2e/live/skill-agent.test.ts
  • test/e2e/live/snapshot-commands.test.ts
  • test/e2e/live/spark-install.test.ts
  • test/e2e/live/state-backup-restore.test.ts
  • test/e2e/live/state-dir-guard-metadata-helpers.ts
  • test/e2e/live/state-dir-guard-metadata.test.ts
  • test/e2e/live/telegram-injection.test.ts
  • test/e2e/live/token-rotation.test.ts
  • test/e2e/live/tunnel-lifecycle-helpers.ts
  • test/e2e/live/whatsapp-qr-compact.test.ts
  • test/e2e/mock-parity.json
  • test/e2e/support/bedrock-runtime-compatible-anthropic-progress.test.ts
  • test/e2e/support/dashboard-connect-handoff.test.ts
  • test/e2e/support/dcode-base-image-runtime-evidence.test.ts
  • test/e2e/support/e2e-cleanup-resources.test.ts
  • test/e2e/support/e2e-fixture-context.test.ts
  • test/e2e/support/e2e-phase-onboarding.test.ts
  • test/e2e/support/e2e-progress-fixture.test.ts
  • test/e2e/support/e2e-redaction-entry.test.ts
  • test/e2e/support/hermes-discord-proxy-request.test.ts
  • test/e2e/support/hermes-workflow-boundary.test.ts
  • test/e2e/support/larger-runner-routing-workflow-boundary.test.ts
  • test/e2e/support/launch-agent-turn.test.ts
  • test/e2e/support/managed-image-activation-diagnostics.test.ts
  • test/e2e/support/mcp-bridge-hermes-lifecycle.test.ts
  • test/e2e/support/openshell-gateway-upgrade-workflow-boundary.test.ts
  • test/e2e/support/sandbox-images-workflow-boundary.test.ts
  • test/e2e/support/shields-failed-startup.test.ts
  • test/e2e/support/shields-retirement-workflow-plan.test.ts
  • test/e2e/support/workflow-plan.test.ts
  • test/helpers/base-image-test-harness.ts
  • test/helpers/destroy-flow-test-assertions.ts
  • test/helpers/destroy-flow-test-harness.ts
  • test/helpers/docker-state-mutation-harness.ts
  • test/helpers/hermes-restart-config-seal-fixture.ts
  • test/helpers/hermes-runtime-state-mutation-test-helpers.ts
  • test/helpers/hermes-shields-provider-consumer-harness.ts
  • test/helpers/hermes-unsafe-config-shields-harness.ts
  • test/helpers/hermes-wrapper-harness.ts
  • test/helpers/privileged-exec-test-helpers.ts
  • test/helpers/rebuild-dcode-flow-helpers.ts
  • test/helpers/rebuild-flow-generic-harness.ts
  • test/helpers/rebuild-flow-harness.ts
  • test/helpers/rebuild-flow-test-support.ts
  • test/helpers/runtime-provider-bundle.ts
  • test/helpers/runtime-provider-state-mutation-test-helpers.ts
  • test/helpers/runtime-state-mutation-control-harness.ts
  • test/helpers/shields-flow-harness.ts
  • test/helpers/vitest-coverage-thresholds.ts
  • test/inference/inference-provider-id-rename.test.ts
  • test/inference/managed/managed-gateway-control.test.ts
  • test/inference/managed/managed-image-publication-workflow.test.ts
  • test/mcp/completed-auto-restore-command.test.ts
  • test/mcp/mcp-destroy-lifecycle.test.ts
  • test/mcp/mcp-lifecycle-lock.test.ts
  • test/mcp/mcp-provider-ownership.test.ts
  • test/mcp/mcp-tool-discovery-image-contract.test.ts
  • test/onboarding/config-set-prompt-error.test.ts
  • test/onboarding/onboard-readiness.test.ts
  • test/onboarding/validate-blueprint.test.ts
  • test/onboarding/validate-config-schemas.test.ts
  • test/package-contract/cli/build-upgrade.test.ts
  • test/package-contract/cli/command-registry.test.ts
  • test/package-contract/cli/config-set-prompt-eof.test.ts
  • test/package-contract/openshell-policy-boundary.test.ts
  • test/platform/images/image-cleanup.test.ts
  • test/platform/images/publish-managed-image-digest-negative.test.ts
  • test/platform/images/publish-managed-image-digest.test.ts
  • test/repository/pi-qualification-receipt-refresh.test.ts
  • test/runtime/policy/permissive-runtime.test.ts
  • test/runtime/policy/policies-permissive-policy.test.ts
  • test/runtime/policy/policies.test.ts
  • test/runtime/policy/rebuild-shields-window.test.ts
  • test/runtime/policy/shields-deferred-exit-lock.test.ts
  • test/runtime/policy/shields-up-runtime-perms.test.ts
  • test/runtime/sandbox/destroy-wipe-sandbox-state.test.ts
  • test/runtime/sandbox/repro-2681-group-writable.test.ts
  • test/runtime/sandbox/sandbox-build-context.test.ts
  • test/runtime/sandbox/sandbox-init.test.ts
  • test/runtime/sandbox/sandbox-provisioning-helper-permissions.test.ts
  • test/runtime/sandbox/sandbox-rlimit-hooks.test.ts
  • test/security/config-rotate-token-provider-profile.test.ts
  • test/security/config-set-nested-ssrf.test.ts
  • test/state/hermes-shields-up-confirmation.test.ts
  • test/state/runtime-state-mutation-control.test.ts
  • test/state/runtime-state-mutation-hermes-publisher.test.ts
  • test/state/runtime-state-mutation-release-ack.test.ts
  • test/state/runtime-state-mutation-startup-gate.test.ts
  • test/state/snapshot-shields-guard.test.ts
  • test/state/state-dir-guard-dashboard-profile.test.ts
  • test/state/state-dir-guard-mutable-posture.test.ts
  • test/state/state-dir-guard-verification.test.ts
  • test/state/state-dir-guard.test.ts
  • test/support/completed-auto-restore-fixture.ts
  • test/support/connect-flow-test-harness.ts
  • test/support/hermes-shell-harness.ts
  • test/support/status-flow-test-harness.ts
  • tools/advisors/risk-plan.mts
  • tools/e2e/hermes-timeout-contract.mts
  • tools/e2e/mcp-dev-workflow-boundary-digests.mts
  • tools/e2e/operations-workflow-boundary.mts
  • tools/e2e/pr-managed-image-publication.mts
  • tools/e2e/sandbox-images-workflow-boundary.mts
  • tools/e2e/target-catalogue.mts
  • tools/e2e/workflow-boundary.mts
  • tools/mcp-tool-discovery-runtime/reviewed-runtime-bundle/managed-startup-image-runtime.bundle

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-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit fff3bca in the refactor/remove-shie... branch remains at 96%, unchanged from commit 3509b5a in the main branch.

TypeScript / code-coverage/cli

The overall line coverage in commit fff3bca in the refactor/remove-shie... branch remains at 83%, unchanged from commit c811ef9 in the main branch.

Show a line coverage summary of the most impacted files.
File main c811ef9 refactor/remove-shie... fff3bca +/-
src/lib/actions...sor-relaunch.ts 96% 79% -17%
src/lib/inferen...-materialize.ts 90% 77% -13%
src/lib/inferen...er-lifecycle.ts 77% 70% -7%
src/lib/onboard...able-receipt.ts 75% 70% -5%
src/lib/state/p...l-retirement.ts 79% 85% +6%
src/lib/onboard/docker-cdi.ts 70% 82% +12%
src/lib/onboard...an-lifecycle.ts 76% 92% +16%
src/lib/sandbox...config-perms.ts 0% 54% +54%
src/lib/state/m...immutability.ts 0% 81% +81%
src/lib/sandbox...config-guard.ts 0% 85% +85%

Updated September 03, 2026 02:30 UTC

@ericksoa
ericksoa marked this pull request as draft August 31, 2026 23:14
@copy-pr-bot

copy-pr-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown

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.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
ericksoa and others added 3 commits August 31, 2026 20:00
Restore the Hermes mutable cross-identity root before gateway import.

Repair the stale image fixture and CodeQL annotations.

Enable trusted BuildKit E2E prebuilds and pin the exact Pi candidate receipts.

Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Preserve current advisor and Hermes E2E fixes while keeping the removal atomic.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Keep the newly landed Shields implementation and tests removed while retaining current E2E fixes.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Comment thread test/agents/openclaw/openclaw-config-guard.test.ts Fixed
Retire legacy Shields state only after an exact sandbox-identity proof.

Verify rebuilt Hermes config through pinned descriptors before deleting upgrade state.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Exercise valid, read-only, and linked config fixtures.

Clarify when legacy recovery artifacts block existing sandboxes.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Avoid a redundant agent-definition lookup after the recreated Hermes identity is already verified.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Bind DCode and Pi retirement to exact replacement identity and successful restore.

Require complete generic post-restore verification before deleting legacy state.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Keep the atomic removal branch aligned with current main before final qualification.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Read replacement and staged fixtures through no-follow regular-file descriptors.

Keep intentional stale-handle tests without filesystem race alerts.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Keep retired Shields commands and tests removed.

Retain current external gateway and E2E pruning changes.

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Comment thread src/lib/onboard/sandbox-create/orchestration.test.ts Fixed
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>

@cjagwani cjagwani 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.

Exact head reviewed: fff3bcae772657bb5e9438868a7453633bf0223f.

P0

  • None.

P1

  • The recovery allow flag is appended after a variable-width rest tuple, so the ordinary path places it in preparedBuildContext and leaves allowRemovedImmutabilityStateRecord false.
  • Mutable-config posture checks require the legacy Docker argv builder and fail on the supported Podman provider.
  • The documented sub-agent flow persists a real upstream key in agent-readable/agent-writable OpenClaw state.
  • The Pi receipt guard compares against HEAD^2, excluding current-base inputs from the candidate it attests and allowing stale image receipts to pass.

The 7580a670..fff3bcae delta only hardens three loaded-runner test deadlines; those focused tests pass and it changes none of these findings. All 99 commits are Verified. CodeRabbit is terminal (skipped because the PR exceeds its file cap); all nine exact-head Advisor specialists terminated without artifacts because of infrastructure failures. Exact-head CI evidence was collected separately and does not change these four reproducible findings.

Comment thread src/lib/onboard.ts
@@ -3231,6 +3228,7 @@ async function runOnboard(opts: OnboardOptions = {}): Promise<void> {
dashboardPortReservationScope,
hermesApiPortReservationScope,
...createArgs,
opts.allowRemovedImmutabilityStateRecord === true,

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.

[P1] Keep the migration allow flag in a fixed argument slot

createArgs is variable-width: on the ordinary non-deferred path the wrapper supplies 16 arguments and appends the prepared build context as argument 17. Appending this boolean after ...createArgs therefore places it in preparedBuildContext, while allowRemovedImmutabilityStateRecord retains its false default. The accepted legacy-state recovery is rejected, and true is also consumed as a build context. Thread this through an explicit fixed slot (or preserve the missing placeholders) and cover the real no-callback recovery path through runOnboard.

}

function privilegedExecCapture(sandboxName: string, command: string[]): string {
return dockerExecFileSync(privilegedSandboxExecArgv(sandboxName, command, false, true), {

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.

[P1] Route mutable-posture commands through provider-native execution

privilegedSandboxExecArgv requires the optional Docker-compatibility buildLegacyDockerArgv, but the supported Podman provider exposes native resolveTarget/execute without that legacy builder. Every call through this helper, plus the direct repair and Hermes-probe calls below, therefore throws before inspecting or repairing the sandbox. Use capturePrivilegedSandboxCommand / executePrivilegedSandboxCommand so the selected provider owns execution, and add coverage with a provider that lacks the Docker compatibility builder.

docker exec --user root "$SANDBOX_CTR" chown sandbox:sandbox /sandbox/.openclaw/openclaw.json /sandbox/.openclaw/.config-hash
docker exec --user root "$SANDBOX_CTR" chmod 444 /sandbox/.openclaw/openclaw.json
docker exec --user root "$SANDBOX_CTR" chmod 444 /sandbox/.openclaw/.config-hash
docker exec --user root "$SANDBOX_CTR" chmod 660 /sandbox/.openclaw/openclaw.json

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.

[P1] Keep the upstream provider key out of agent-controlled state

This procedure acknowledges that /tmp/openclaw.updated.json contains the real API key, uploads it into openclaw.json, and then makes that file readable and writable by the sandbox identity. Sandbox code can therefore read and exfiltrate the upstream credential, contrary to the OpenShell provider/placeholder boundary. Replace the recipe with a supported host-side provider and policy flow; if direct auxiliary-provider credentials are unsupported, state that limitation instead of publishing a runnable raw-key upload path.

if (process.env.GITHUB_ACTIONS !== "true" || process.env.GITHUB_EVENT_NAME !== "pull_request") {
return "HEAD";
}
const result = git(["rev-parse", "--verify", "HEAD^2"]);

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.

[P1] Validate receipts against the exact merge candidate

On pull_request, HEAD is the synthetic merge while HEAD^2 is only the PR branch head. Comparing to HEAD^2 drops base-only Pi inputs: current main changed nemoclaw-blueprint/blueprint.yaml, agents/pi/Dockerfile copies that whole directory, and these receipts still attest the older source tree. The exact synthetic merge differs in that copied input, yet this head's static-checks passes. Compare against the exact merge candidate and add a divergent-base regression so current-base changes also force both architecture receipts to be refreshed together.

@ericksoa
ericksoa dismissed cjagwani’s stale review September 3, 2026 02:32

Maintainer override under the existing approval.

@ericksoa
ericksoa merged commit b08eaa0 into main Sep 3, 2026
55 of 71 checks passed
@ericksoa
ericksoa deleted the refactor/remove-shields-core-10696 branch September 3, 2026 02:33
ericksoa added a commit that referenced this pull request Sep 3, 2026
## Outcome

NemoClaw now inventories direct and transitive live E2E assertions
without executing live test modules. A checked-in baseline and PR growth
guard prevent assertion growth while Epic #10920 reduces the suite.

## Reason

The live E2E suite had no deterministic assertion inventory. Assertions
could move into companion modules or change syntax without making the
increased failure surface visible.

### Related issues

Closes #10934

Part of #10920

## Changes

- Add a TypeScript-parser census for Vitest matchers, Node assertions,
named assertion helpers, failure guards, object-field assertions, and
detectable generated probes.
- Resolve live companion imports statically and report direct,
transitive, per-file, and unique-suite totals without loading live
modules.
- Add a compact current-main baseline that preserves the fixed Epic
#10920 reference and records the lower post-#10722 main state.
- Run the ratchet from `npm run checks:repository` and reject baseline
increases through the existing PR growth guard.
- Document the assertion-disposition and baseline-update workflow in
`test/README.md`.

The new mechanism is required by Epic #10920. Repository checks and
E2E-remediation PRs consume it. A direct assertion count is insufficient
because it can be reduced by moving assertions into helpers or other
assertion forms. `test/repository/e2e-assertion-census.test.ts` protects
the parser, import graph, path controls, census, and ratchet.

## Verification

- `npx vitest run --project integration
test/repository/e2e-assertion-census.test.ts
test/repository/checks-runner.test.ts
test/automation/pull-requests/growth-guardrails.test.ts` — 3 files and
66 tests passed.
- `npm run typecheck:cli` — passed.
- `npm run checks:repository` — passed, including the new
1,977-direct-expect baseline across 86 live test files.
- Commit hooks — pre-commit, commit-msg, and pre-push passed. The
published commit is GitHub Verified.
- No live E2E run applies because this change analyzes source and does
not change live behavior.
- The diff contains no secrets, API keys, or credentials.

## Review notes

`npm run check` completed every pre-commit and repository-wide
governance check, then one existing CLI coverage worker did not exit
after the active workers finished. The run was stopped and is not
claimed as passing.

`npm run test:changed` passed its targeted growth-guard test, then
selected 1,682 unrelated CLI, plugin, and E2E-support files. It reported
62 failures from existing host state, unavailable macOS commands such as
`ip`, and parallel timeout paths. None involved the changed census,
ratchet, runner-registration, or growth-guard tests. Required GitHub CI
remains the authoritative broad gate for this PR.

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
  - Added tooling to scan end-to-end tests and track assertion counts.
- Added configurable assertion budgets with reporting, JSON export,
validation, and update commands.
- Added safeguards for assertion growth, missing files, renamed tests,
and budget violations.

- **CI & Quality**
- Integrated assertion-budget checks into repository validation and
growth guardrails.
- Added baseline metadata covering current end-to-end test assertion
limits.
- Added comprehensive coverage for budget enforcement and diagnostic
reporting.

- **Documentation**
- Documented the live end-to-end assertion ratchet process and approved
budget updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
shanemcd pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 3, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
@wscurran wscurran added the refactor PR restructures code without intended behavior change label Sep 4, 2026
shanemcd-rebase-bot Bot pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
shanemcd-rebase-bot Bot pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
shanemcd-rebase-bot Bot pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
shanemcd-rebase-bot Bot pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
shanemcd-rebase-bot Bot pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
shanemcd pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
shanemcd-rebase-bot Bot pushed a commit to shanemcd/NemoClaw that referenced this pull request Sep 4, 2026
…pts removed upstream

Upstream removed the Shields/state-mutation subsystem (NVIDIA#10722), deleting
scripts/state-dir-guard.py, runtime-state-mutation-{control,startup-gate}.py,
runtime_state_mutation_hermes_publisher.py, and their state-lock-plan /
runtime-state-mutation-publisher-v1.json manifests. The fork's hermes
Dockerfile and start/vm entrypoints still COPY and invoke them at runtime,
so a bare rebase dropped them and broke build-nemoclaw-hermes.

Restore the six files from the pre-rebase fork HEAD so the hermes image
keeps its state-guard posture.
prekshivyas added a commit that referenced this pull request Sep 4, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

Legacy OpenClaw upgrades now preserve the prepared rebuild context in
its intended create-call position instead of treating it as a DCode
context. The supported Shields-era migration selects the exact candidate
managed image while retaining the released workload receipt as previous
authority.

## Reason

Four legacy upgrade targets failed after destructive preparation because
an omitted optional callback shifted the prepared context into the wrong
positional argument. The v0.0.115 Shields migration also rejected the
intentional transition from its released receipt revision to the exact
candidate revision.

### Related issues

Fixes #10964

Fixes #10970

Refs #10722

## Changes

- Preserve the optional verified-create callback slot at the onboarding
machine boundary and update its direct call-shape tests.
- Use the exact GitHub Actions qualification revision for the
replacement workload while keeping the old receipt in the rebuild
handoff.
- Remove the unrelated Hermes, messaging, cron, WeChat, redaction,
recovery, npm-remediation, and Pi changes from this PR.

## Verification

- `npx vitest run --project cli <nine affected handler and rebuild test
files>` — 174/174 tests passed.
- `npx vitest run --project cli
src/lib/onboard/prepared-dcode-rebuild.test.ts` — 17/17 tests passed.
- `npx vitest run --project cli
src/lib/onboard/sandbox-workload-rebuild.test.ts` — 25/25 tests passed
after the final test correction.
- `npx vitest run --project cli
src/lib/onboard/machine/handlers/sandbox-dcode-selection.test.ts
src/lib/onboard/sandbox-workload-rebuild.test.ts` — 39/39 tests passed
after the final review wording corrections.
- `npm run typecheck:cli` — passed.
- `npm run docs` — passed with 0 errors and 5 existing Fern warnings;
documentation review found no public documentation change required.
- Normal `pre-commit` and `commit-msg` hooks — passed, including
repository checks, ShellCheck, Hadolint, gitleaks, E2E phase plans, and
commitlint.
- [Exact-head managed-image
build](https://github.com/NVIDIA/NemoClaw/actions/runs/33924466936) —
passed for `9f697dc9c1b9caefc01bd5ac47e6aed5e246b9a0`, including direct
OpenClaw, Hermes, and Deep Agents Code startup and exact all-agent
activation.
- [Exact-head live
E2E](https://github.com/NVIDIA/NemoClaw/actions/runs/33926108097) — the
v0.0.55 ARM64, v0.0.74 x86-64, v0.0.89 x86-64, and v0.0.115 Shields
migrations passed. The v0.0.55 x86-64 target completed the repaired
image rebuild and sandbox replacement, then hit a downstream OpenClaw
gateway health timeout after the sandbox inference route passed; see the
related intermittent recreation-health tracker #10977.
- The diff contains no secrets, API keys, or credentials.

## Review notes

This reduces the PR from 48 files and 941 changed lines to 12 files and
129 changed lines. The previous Hermes, WeChat, redaction,
selected-runtime recovery, npm-remediation, and Pi findings no longer
apply because those changes are absent from the final diff.

One local prepared-context integration fixture stopped before the
changed code because this host reported a `packaged-service` gateway
while the fixture recorded `standalone`; the direct prepared-context
unit boundary passed. Exact-head live E2E remains the authoritative
lifecycle evidence.

The v0.0.55 x86-64 E2E no longer reports `A prepared DCode build context
cannot be used for this sandbox target.` It reaches `Sandbox
'e2e-gw-survivor' created`, verifies the compatible endpoint through
`inference.local`, and then times out waiting for the resumed OpenClaw
gateway. The matching ARM64 target and the other required x86-64
upgrades pass. The failed job cleaned up every registered resource.

The migration remains fail-closed outside GitHub Actions. During
qualification, the old receipt remains immutable previous authority and
only the exact candidate revision selects the replacement image.

---
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

---------

Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
cjagwani added a commit that referenced this pull request Sep 5, 2026
<!-- markdownlint-disable MD041 -->
## Outcome

Adds the canonical dated documentation entry for v0.0.120 and records
the release's material user-facing changes before tag planning. The
Hermes rebuild guide now also documents the fail-closed immutable-base
requirement for legacy sandboxes without an image hint.

## Reason

Release planning requires a merged `docs/changelog/2026-09-04.mdx`
containing exactly one `## v0.0.120` heading. The existing automation
draft does not contain that required changelog and does not cover the
full release scope, so this PR provides a fresh, independently reviewed
release-docs update.

### Related issues

Relates to #10919

## Changes

- Add three release-note lead paragraphs and detailed, user-facing
v0.0.120 changes with canonical documentation routes.
- Cover configuration export and doctor (#11015, #11012); Hermes
runtime, recovery, and Discord policy (#10595, #11071, #11024, #10927,
#10983, #10988, #10999, #11019, #10682); Shields retirement (#10722,
#10996); OpenShell forwarding and runtime authority (#10695, #10814,
#10815, #10810); onboarding and recovery (#10690, #10900, #11046,
#10882, #10864); inference behavior (#10956, #10910, #11070); Deep
Agents MCP projection safety (#10911, #10909); and provider-profile
validation (#10884, #10895).
- Scope the legacy Hermes immutable-base rebuild guidance to the
Hermes-rendered recovery page.

## Verification

- `npx vitest run --project integration
test/generation/check-docs-links.test.ts
test/generation/check-docs-published-routes.test.ts
test/generation/post-merge-docs.test.ts` — 3 files and 125 tests passed.
- `npm run docs` — passed with 0 errors and 5 existing Fern warnings.
- Independent documentation audit — reconciled all 71 commits in
`v0.0.119..origin/main`, validated all 29 PR links and published routes,
and found no unsupported product claims or remaining corrections.
- Normal `pre-commit`, `commit-msg`, and `pre-push` hooks — passed.
- `git diff --check` — passed.
- GitHub commit verification —
`a22fe0989fd72c7daaa9b2e7a4734a3edc069aba` is Verified with reason
`valid`.
- Secret review — the diff contains no secrets, API keys, or
credentials.

## Review notes

The existing automation draft #10919 is intentionally left untouched.
This PR supersedes its release-docs content with the complete canonical
changelog and a variant-correct Hermes recovery update.

---
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Added release notes covering verified configuration export, host and
gateway diagnostics, service forwarding, sandbox recovery, onboarding
safeguards, inference retries, MCP projection safety, provider setup,
and Discord runtime policy.
- Clarified sandbox rebuild behavior, including use of the
release-pinned immutable base image when required.
- Documented that rebuilds stop before modifying sandbox data when the
required image cannot be resolved or validated.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor PR restructures code without intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Shields from NemoClaw core and defer immutability to composable blueprints

5 participants