fix(snapshot): preserve external policy authority - #10117
Conversation
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
…to codex/9833-snapshot-authority
…authority Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
…authority Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
cv
left a comment
There was a problem hiding this comment.
I found two unresolved defects in commit 354bf07. These defects violate the accepted policy-authority lifecycle decision in #9833.
-
src/lib/actions/sandbox/policy-authority/snapshot.ts:192-200persists the observed authority beforeinspection.verifyRequirements(). If the effective policy lacks a required entry, qualification fails after the source registry changes. Issue #9833 requires this case to stop before registry mutation. Verify requirements beforeregistry.updateSandbox()and before changingsourceEntry. -
src/lib/state/sandbox.ts:2481-2497validates authority beforerestoreStateFile(). Theopenclaw.jsonpath can then spend up to 120 seconds reading remote merge input beforesrc/lib/state/state-file-restore.ts:157-191performs the mutating SSH command. Authority can change during that read. Pass the validator into the state-file restore path and run it immediately before the mutating command.
The Product Scope Gate passes because issue #9833 contains an accepted maintainer decision for snapshot and restore policy authority. DCO passes, and GitHub marks every PR commit as verified. CodeRabbit skipped review because this PR targets a non-default branch. The PR Advisor produced no published synthesis because several specialists encountered provider rate limits. I did not use those unavailable gates or the failed CI gates as review reasons.
cv
left a comment
There was a problem hiding this comment.
One additional unresolved lifecycle defect applies to commit 354bf07.
src/lib/actions/sandbox/snapshot.ts:733-739 can finalize clone registration and clear pendingRouteReservation before the final authority revalidation fails. The error at lines 545-547 tells the user to retry. However, lines 1606-1608 recognize recovery only when pendingRouteReservation remains true. A retry therefore reaches the existing-destination refusal at lines 1846-1854. This leaves a Ready, registered clone without restored snapshot state, and the advised nondestructive retry cannot recover it.
The changed test at src/lib/actions/sandbox/snapshot-auto-create-failure.test.ts:473-492 only asserts that the registry row remains after this failure. Add a second invocation that proves the same restore can recover without --force, and preserve enough recovery state for that invocation to reconcile the clone.
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Closing this PR because the accepted policy decision in #10514 supersedes #9833. This PR preserves external policy authority across snapshot, restore, and clone operations, but #10514 removes that durable authority model and makes current OpenShell policy authoritative. Replacement work is in #10515, which delivers the accepted cutover and states that no intermediate authority-stack PR is intended to merge. This closure records supersession. It does not assess the contributor or the implementation quality. |
Summary
Snapshot, restore, and clone operations now preserve the recorded OpenShell policy authority. NemoClaw refuses policy-sensitive lifecycle work when recorded and live authority differ.
Related Issue
Part of #9833
Changes
Type of Change
Quality Gates
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Apurv Kumaria akumaria@nvidia.com