Skip to content

fix(backup): preserve Shields during backup-all - #7557

Merged
cv merged 18 commits into
mainfrom
codex/6455-backup-all-shields-window
Jul 27, 2026
Merged

fix(backup): preserve Shields during backup-all#7557
cv merged 18 commits into
mainfrom
codex/6455-backup-all-shields-window

Conversation

@apurvvkumaria

@apurvvkumaria apurvvkumaria commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

backup-all now backs up intentionally protected state by opening one bounded Shields window per eligible sandbox and restoring the original locked posture before it processes the next sandbox.
The change follows @Hokonoken's live root-cause analysis in #6455, keeps incomplete backups as hard failures, and now has protected live coverage for root-owned credential state.
Corrupt persisted Shields state fails closed before policy, config, timer, transition, state, or audit mutation; recovery requires restoring trusted host state.

Related Issue

Fixes #6455

Changes

  • Extract the existing rebuild Shields window into a shared helper while keeping the legacy Hermes compatibility path and owner-liveness lease restricted to rebuild.
  • Open a 30-minute auto-restore window around each backup-all attempt only when the sandbox starts with Shields UP.
  • Restore Shields lockdown in finally after success, a reported backup failure, or an exception.
  • Abort the remaining backup batch when lockdown cannot be restored, and print the sandbox-specific shields up recovery command before the retry command.
  • Preserve the current mutable posture for a sandbox that starts with Shields down.
  • Reject corrupt persisted Shields state before shields up can skip restrictive-policy restoration or destroy timer and transition recovery authority.
  • Keep corrupt-state recovery guidance fail closed: restore trusted host state; neither shields up nor ordinary rebuild replaces corrupt state.
  • Add protected snapshot-commands coverage for root-owned 0700/0600 credentials, sanitized backup contents, Shields relock, restored permissions, and timer removal.
  • Document the bounded backup window, recovery behavior, and corrupt-state refusal on the canonical backup and troubleshooting pages.

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: Independent exact-head review at 10954f50ec56bff21e6b829e977b70983995bb90 passed product scope and all nine security categories. The ten PR files are byte-identical to the prior passing security review. Corrupt state is rejected before config resolution, policy commands, state writes, timer kill, transition clear, or audit append. The 30-minute no-owner-deferral window and batch abort on relock failure remain intentional documented contracts. Trusted exact-head snapshot-commands E2E is still required before merge.
  • 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: docs-updated
  • Evidence: At exact head 10954f50ec56bff21e6b829e977b70983995bb90 against base 0b185498155a0a51a3f682a3e2b57f80c95eeaaa, reviewed the complete ten-file diff and generated OpenClaw, Hermes, and Deep Agents variants. The ten PR files are byte-unchanged from passing reviewed head b2c642425. docs/manage-sandboxes/backup-restore.mdx accurately documents the bounded per-sandbox backup-all Shields window and failure behavior. docs/reference/troubleshooting.mdx documents fail-closed corrupt-state preservation and trusted-state recovery for all three documented Shields variants; each generated troubleshooting page contains the section exactly once. Exact-tree npm run docs passed with 0 errors and two existing warnings; targeted tests passed 73/73; CLI and plugin typechecks and the merge pre-push CLI typecheck passed. GitHub reports the exact-head commit Verified.
  • Agent: Codex Desktop

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

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 — justification: Shields, maintenance, and rebuild suites passed 73/73; E2E-support passed 1,715 with 17 intentional skips; CLI type-checking and exact-branch CLI/plugin builds passed.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result: Exact-head GitHub CI and protected snapshot-commands E2E are in progress; no result is waived.
  • 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) — 0 errors; two pre-existing hidden Fern warnings remain.
  • 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: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features
    • backup-all now performs a timed Shields-down window per eligible sandbox, then restores lockdown, while tracking whether the window opened successfully.
    • Backup lifecycle more consistently handles orphan-manifest cases and preserves backup/restore error context.
  • Bug Fixes
    • Fail-closed behavior for corrupt Shields state: NemoClaw preserves the recorded state and refuses to unlock/relock, with recovery guidance.
    • When Shields restoration fails after backup, the run aborts remaining sandboxes and reports actionable commands.
  • Documentation
    • Updated backup/restore and troubleshooting docs for Shields windows, timers, and corrupt-state recovery.
  • Tests
    • Expanded unit and protected live coverage for shields window behavior, error aggregation, and protected credentials redaction/permissions.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria apurvvkumaria added NV QA Bugs found by the NVIDIA QA Team UAT Issues flagged for User Acceptance Testing. area: cli Command line interface, flags, terminal UX, or output area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery v0.0.96 labels Jul 26, 2026
@apurvvkumaria apurvvkumaria self-assigned this Jul 26, 2026
@coderabbitai

coderabbitai Bot commented Jul 26, 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

backup-all now manages Shields windows around each sandbox backup, restores lockdown before continuing, and aborts when restoration fails. Shared window logic is reused by rebuild operations, with corrupt-state protection, tests, and documentation covering unlock, relock, failure, and sequencing behavior.

Changes

Backup shields lifecycle

Layer / File(s) Summary
Shared shields-window helpers
src/lib/actions/sandbox/backup-shields-window.ts, src/lib/actions/sandbox/rebuild-shields.ts, test/rebuild-shields-window.test.ts
Shared types and helpers handle Shields unlock/relock behavior, while rebuild operations delegate to them with rebuild-specific options.
Backup-all shields orchestration
src/lib/actions/maintenance.ts, src/lib/actions/maintenance.test.ts, docs/manage-sandboxes/backup-restore.mdx
Each backup runs within a Shields window, restores lockdown in cleanup, handles unlock and relock failures, preserves combined errors, and documents the resulting control flow.
Corrupt Shields state protection
src/lib/shields/index.ts, src/lib/shields/index.test.ts, docs/reference/troubleshooting.mdx
Corrupt persisted state blocks Shields mutations, preserves state files, emits recovery guidance, and documents trusted-state restoration.
Backup behavior and protected data validation
test/e2e/live/snapshot-commands.test.ts
The live snapshot flow validates sanitized protected-credential backups, permissions, Shields restoration, and timer cleanup.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#7290 — Both changes modify backupAll() per-sandbox control flow around orphan and early-continue handling.
  • NVIDIA/NemoClaw#7421 — Both changes affect Shields failure handling through failShieldsCommand.
  • NVIDIA/NemoClaw#7568 — Both changes modify Shields transition logic used by backup window handling.

Suggested labels: bug-fix, area: security

Suggested reviewers: cv, prekshivyas

Sequence Diagram(s)

sequenceDiagram
  participant backupAll
  participant BackupShieldsWindow
  participant SandboxBackup
  participant Shields
  backupAll->>BackupShieldsWindow: open window
  BackupShieldsWindow->>Shields: shieldsDown
  backupAll->>SandboxBackup: create snapshot
  backupAll->>BackupShieldsWindow: relock window
  BackupShieldsWindow->>Shields: shieldsUp
Loading
🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR does not implement the linked issue's cloned-sandbox skip behavior; cloned audit failures still count as backup failures. Add the cloned-sandbox handling from #6455 so incomplete identity metadata is skipped with a warning instead of failing backup-all.
Out of Scope Changes check ⚠️ Warning Most changes focus on Shields windows, corrupt-state handling, rebuild logic, and docs, which are unrelated to the linked backup-all clone failure. Trim the PR to the clone-audit backup-all fix and move Shields/rebuild/corrupt-state work into separate changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: preserving Shields state during backup-all.
✨ 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 codex/6455-backup-all-shields-window

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

@github-code-quality

github-code-quality Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit 10954f5 in the codex/6455-backup-al... branch remains at 96%, unchanged from commit 0b18549 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit 10954f5 in the codex/6455-backup-al... branch is 80%. The coverage in commit a02a3b9 in the main branch is 81%.

Show a code coverage summary of the most impacted files.
File main a02a3b9 codex/6455-backup-al... 10954f5 +/-
src/lib/onboard/docker-cdi.ts 80% 70% -10%
src/lib/shields/audit.ts 98% 89% -9%
src/lib/shields/index.ts 71% 68% -3%
src/lib/sandbox/config.ts 75% 72% -3%
src/lib/shields...nsition-lock.ts 87% 86% -1%
src/lib/actions...ocker-health.ts 65% 82% +17%
src/lib/onboard...box-prebuild.ts 73% 92% +19%
src/lib/actions...ields-window.ts 0% 78% +78%
src/lib/actions...ol-discovery.ts 0% 82% +82%
src/lib/actions...time-command.ts 0% 100% +100%

Updated July 27, 2026 04:54 UTC

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 1 warning · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 1 more warning, the same number of suggestions.

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, onboard-repair, onboard-resume, snapshot-commands, state-backup-restore, upgrade-stale-sandbox

2 optional E2E recommendations
  • shields-config
  • docs-validation

Workflow run details

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

Comment thread src/lib/actions/sandbox/rebuild-shields.ts Fixed
Comment thread src/lib/actions/sandbox/rebuild-shields.ts Fixed

@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/manage-sandboxes/backup-restore.mdx`:
- Around line 187-192: Update the backup-all behavior description in
backup-restore.mdx to state that an initial Shields-unlock failure marks the
sandbox as failed and processing continues with the next sandbox. Also document
that the 30-minute Shields-down window remains fixed without owner-aware
deferral, so a long-running backup may trigger automatic lockdown before
completion.

In `@src/lib/actions/maintenance.ts`:
- Around line 91-119: Update the backup flow around the try/catch/finally block
so relock failure does not throw from finally or replace an existing backup
failure. Capture the relock failure, preserve and propagate the original
backupError or orphanManifestMessage when present, and only report the relock
error directly when backup succeeded; ensure both failure contexts remain
available when both operations fail.
🪄 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: 3e2f4d55-d076-43df-bfc2-41a3f5d2ab42

📥 Commits

Reviewing files that changed from the base of the PR and between 4fdbb79 and 669147d.

📒 Files selected for processing (6)
  • docs/manage-sandboxes/backup-restore.mdx
  • src/lib/actions/maintenance.test.ts
  • src/lib/actions/maintenance.ts
  • src/lib/actions/sandbox/backup-shields-window.ts
  • src/lib/actions/sandbox/rebuild-shields.ts
  • test/rebuild-shields-window.test.ts

Comment thread docs/manage-sandboxes/backup-restore.mdx
Comment thread src/lib/actions/maintenance.ts
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator Author

Addressed the valid exact-head review findings in 68319c3c6:

  • Removed the unused import reported by code scanning.
  • Stopped throwing from finally. A combined backup and relock failure now raises an AggregateError whose errors preserve both the original backup or orphan-manifest failure and the relock failure.
  • Added regressions for both combined-failure variants. The focused suite now passes 4 files and 45 tests.
  • Documented unlock-failure continuation and the fixed 30-minute deadline without owner-aware deferral.

On PRA-1, the proposed clone-only skip is intentionally not implemented. The later investigation in #6455 changed the supported direction:

This PR implements that remediation through the bounded Shields window, which makes the protected credentials state readable during backup and restores lockdown afterward. The hard-failure regression applies only if the backup still fails after the window opens. Incomplete backups therefore remain nonzero by design.

@apurvvkumaria

Copy link
Copy Markdown
Collaborator Author

The exact-head static failure is a clean-checkout CI prerequisite regression on current main, not a backup-flow failure: semantic E2E collection imports nemoclaw/dist/shared/openshell-policy-boundary.cjs before that generated artifact exists. The narrow signed fix is #7561. Keep this PR blocked until #7561 lands and this head receives a fresh normal CI/E2E run; no failed-job rerun or gate waiver is proposed.

cv added a commit that referenced this pull request Jul 26, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Make the semantic E2E phase check build its generated shared policy
dependency
before Vitest collection. A clean static-check checkout fails before
collecting
tests when `nemoclaw/dist/shared/` does not exist. The canonical command
now
builds only that prerequisite and then runs the unchanged coverage
check. This
corrects the confirmed CI blocker for #7557. No other PR is claimed
blocked by
this prerequisite.

## Changes

- Add one `build:policy-boundary` script for the shared TypeScript
artifact.
- Reuse that script from the existing CLI build.
- Run it before semantic E2E phase collection.
- Add a contract test for the required command order.
- Add the reviewed contract to the source-shape compatibility budget.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior — justification:
`test/e2e/support/e2e-semantic-phase-check.test.ts` locks the
policy-boundary
  build before semantic collection and CLI compilation.
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: this changes only the
automatic
build order for an existing validation command. Its documented command,
  purpose, and output contract are unchanged.
- [ ] 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:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: Reviewed `package.json`, `ci/source-shape-test-budget.json`,
and
  `test/e2e/support/e2e-semantic-phase-check.test.ts` at `2852a517b`.
  The change adds an internal automatic prerequisite for the existing
`npm run test:e2e-phases:check` and `npm run build:cli` commands; their
  documented invocation, purpose, and behavior remain unchanged.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 2852a51 -->
<!-- docs-review-agents-blob-sha:
be20a09 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: the
focused semantic-phase contract passed 15 tests. Clean-artifact `npm run
test:e2e-phases:check` passed 125 tests across 82 files.
- [x] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: not applicable because
this scope changes one build prerequisite, its contract test, and its
reviewed budget entry. `npm run build:cli` and `npm run check:diff`
passed.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

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


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

* **Chores**
  * Added a dedicated policy-boundary build step.
  * Updated the CLI build flow to run the policy-boundary step first.
* Updated end-to-end phase checks to compile the policy-boundary
components before validation.
* **Tests**
* Added an end-to-end semantic phase checker that verifies the expected
command ordering for the new build step.
* **CI**
* Extended the source-shape test budget exceptions to account for the
new semantic check coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv enabled auto-merge (squash) July 26, 2026 08:53
@cv
cv disabled auto-merge July 26, 2026 09:13

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

Security blocker: backup-all derives authorization to unlock from !isShieldsDown(), but isShieldsDown() returns false for corrupt persisted Shields state. That lets a corrupt or tampered posture enter shieldsDown(), overwrite corruption markers, and later reseal an untrusted baseline. Fail closed before mutation when Shields state is corrupt (or establish authoritative physical posture), and add corrupt+locked regression coverage. I disabled auto-merge pending an exact-head repair and fresh gates.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
jyaunches pushed a commit that referenced this pull request Jul 26, 2026
<!-- markdownlint-disable MD041 -->
## Summary

The maintainer merge-gate checker now accepts immutable E2E retry
history under the same fail-closed rule already enforced by the
controller and required observer. This unblocks a later successful check
only when every older exact-identity check is a completed failure with a
valid supported retry marker.

## Related Issue

Unblocks #7582 and the dependent #7557 release sequence.

## Changes

- Select the highest-ID exact coordination check after validating the
full retry history.
- Reject malformed markers, unsupported reasons, never-retry titles,
active history, identity drift, and foreign GitHub Apps.
- Add a focused regression suite for all supported retry reasons and
fail-closed histories.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: the canonical maintainer
guide and E2E runbook already document this exact retry-history
contract; this change aligns the checker implementation.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: independent exact-diff
review by Codex Desktop passed; the parser and selector mirror the
existing controller and observer allowlist and fail-closed rules.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: Existing
`.agents/skills/nemoclaw-maintainer-day/MERGE-GATE.md` and
`test/e2e/README.md` already define the supported reasons, immutable
history, highest-ID selection, and fail-closed conditions.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 7cd0ff7 -->
<!-- docs-review-agents-blob-sha: be20a09 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable
- Station profile/scenario: Not applicable
- Result: Not applicable
- Supporting evidence: Not applicable

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run --project integration
test/skills/check-gates-evidence.test.ts
test/skills/check-gates-retry-history.test.ts
test/skills/check-gates-fork-evidence.test.ts
test/skills/check-gates-compliance.test.ts` passed 4 files and 160
tests; `npm run test-size:check` passed.
- [x] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not applicable to the two-file internal
maintainer-checker change; the complete checker suite and normal hooks
passed.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved E2E merge-gate validation for retryable failures and retry
history.
* Correctly recognizes supported retry markers and excludes
non-retryable runs.
* More reliably identifies the current E2E coordination check when
multiple checks exist.
* Fails closed when retry evidence is incomplete, malformed, unrelated,
or includes active or unsupported checks.

* **Tests**
  * Added coverage for successful retries following supported failures.
* Added validation for incomplete, invalid, and non-retryable retry
histories.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
prekshivyas and others added 6 commits July 26, 2026 19:28
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@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 `@docs/reference/troubleshooting.mdx`:
- Around line 1687-1694: Move the “A Shields command reports corrupt persisted
state” troubleshooting section out of the OpenClaw-only content block so it is
shared by both OpenClaw and Hermes pages. Preserve the existing recovery
guidance and placement within the general troubleshooting content.
🪄 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: d47cd31c-0bf6-421f-b94a-535a799d3c8a

📥 Commits

Reviewing files that changed from the base of the PR and between 7aa0fd9 and 91867c1.

📒 Files selected for processing (4)
  • docs/reference/troubleshooting.mdx
  • src/lib/shields/index.test.ts
  • src/lib/shields/index.ts
  • test/e2e/live/snapshot-commands.test.ts

Comment thread docs/reference/troubleshooting.mdx
cv and others added 5 commits July 26, 2026 21:32
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>

@prekshivyas prekshivyas 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 maintainer review at 10954f50ec56bff21e6b829e977b70983995bb90: the implementation, focused tests, documentation review, ordinary CI, self-hosted image checks, security review, and automated review are clean. Protected E2E cannot validate this change yet: snapshot-commands failed in the existing cross-sandbox clone-restore phase before reaching the new protected-backup phase. State restore completed, but authenticated gateway pairing verification failed (test/e2e/live/snapshot-commands.test.ts:432; child run 30238525114, job 89890933833). This is the gateway self-dialback defect tracked by #7215 and addressed by excluded PR #7230. Per the protected merge gate, this assertion failure is not retry-eligible on the same SHA, so I cannot approve this head. Once #7230 lands, refresh this branch and rerun exact-head CI/E2E; approval can follow if the protected backup phase and full selected suite pass.

@cv
cv merged commit e845fd1 into main Jul 27, 2026
79 of 83 checks passed
@cv
cv deleted the codex/6455-backup-all-shields-window branch July 27, 2026 16:08
@cv cv mentioned this pull request Jul 27, 2026
23 tasks
cv added a commit that referenced this pull request Jul 27, 2026
<!-- markdownlint-disable MD041 -->
## Summary

`docs/changelog/2026-07-25.mdx` now includes the user-facing fixes that
merged after #7607 and before the v0.0.96 tag.
The follow-up covers safer bulk backup and clone restore behavior,
policy and inference repairs, cleaner onboarding diagnostics, and
OpenClaw base-image validation while leaving test-only and
maintainer-internal merges out of the release entry.

## Changes

- Document the Shields-safe `backup-all` flow from #7557 and the
clone-specific restore pairing publication from #7608.
- Record the Claude Code resolved-launcher policy repair from #7581,
Hermes namespaced-model handling from #7604, and persisted Ollama
proxy-token reuse from #7620.
- Record OpenClaw immutable base-inventory validation from #7606, hidden
route-only reservations from #7621, and clean invalid gateway-management
errors from #7630.
- Link the gateway lifecycle and snapshot authorities, retain #7622's
already-merged Docker Engine wording, and exclude internal or test-only
merges from the release entry.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] 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:
- [x] Tests not applicable — justification: This PR changes
release-entry prose only. The changelog contract test and Fern
validation cover the dated entry, published routes, and rendering
requirements.
- [x] 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:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: At exact PR head `29316da26`, a Codex Desktop documentation
writer reviewed `docs/changelog/2026-07-25.mdx` against `AGENTS.md`,
`WRITING.md`, and `docs/CONTRIBUTING.md`. The review confirmed that the
full entry accurately reflects the merged user-visible behavior, retains
#7622's existing wording, appropriately excludes internal and test-only
PRs, and uses conforming terminology, structure, links, and release
classification. It also confirmed that the review follow-ups use active
third-person release-entry voice, name the actor and recovery
requirement directly, and accurately preserve the trusted-backup,
cached-release refresh, and local-build fallback constraints. The
changelog test passed 6/6, and the docs build completed with 0 errors
and 2 pre-existing hidden warnings.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 29316da -->
<!-- docs-review-agents-blob-sha: be20a09 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: `npx
vitest run test/changelog-docs.test.ts` passed 6/6 tests after the final
review fix.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result: Not applicable to this
prose-only changelog change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — exited
0 with 0 errors and 2 pre-existing hidden warnings after the final
review fix.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Documentation**
* Expanded the changelog to clarify persistent `policy exclude`/`policy
restore` behavior across rebuilds and snapshot restores, including
reporting on removed endpoints and exclusion consistency.
* Updated `claude-code` preset guidance to allow the npm-installed
OpenShell launcher path while maintaining endpoint/HTTP method scope.
* Documented hardened handling for invalid gateway-management
declarations, improved gateway/agent-version diagnostics scope, and
clarified onboarding/restore credential and reasoning precedence.
* Tightened bulk backup/restore guidance (safety windows, approval
limits, and failure recovery) and refined OpenClaw base selection to
avoid incompatible cached releases and `:latest` fallback.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery NV QA Bugs found by the NVIDIA QA Team UAT Issues flagged for User Acceptance Testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ubuntu 24.04][CLI&UX] nemoclaw backup-all exits 1 when a cloned sandbox fails the pre-backup identity audit

4 participants