Repository navigation
fix(update): interrupted updates report requester-revoked or unexpected-error - #194659
Conversation
…vocation and data risk
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Merged via squash auto-merge.
|
Align admitted snapshot progress with the interruption contract introduced in #194659. Require UpdateInterruptedError rather than its revocation superclass and retain all persistence and settlement assertions. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: steipete <[email protected]>
…ed-error (openclaw#194659) * fix(update): stop labelling interruption and untouched rollback as revocation and data risk * fix(update): report an unstarted rollback without data-risk wording * test(update): cover rollback start labels and the interrupted reason * style: format * fix(update): report an interruption before activation as interrupted * style: format * chore: match the test-line allocation to added lines * fix(update): keep unstarted rollback recovery pending with an accurate label * test(update): expect pending recovery and the interrupted label
Align admitted snapshot progress with the interruption contract introduced in openclaw#194659. Require UpdateInterruptedError rather than its revocation superclass and retain all persistence and settlement assertions. Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes: an interrupted update reports
requester-revokedorunexpected-error, and a database rollback that never touched anything reports data at risk.User Impact
An update stopped by a signal says
interrupted, including before activation when the Gateway is healthy and untouched. A rollback that failed before moving any database (lock contention, a changed snapshot) no longer claims rollback state is unverified; it says the current databases were not changed, and still keeps the Gateway stopped and names Doctor as the next step.Why This Change Was Made
Problem
UpdateRequesterRevokedError, so operators sawrequester-revokedalthough nobody revoked anything.Could not record update step ..., the package step recorded a failure, and the run endedunexpected-errorwith the Gateway healthy.restoreFailedUpdateDatabaseslabelled every thrown restore failurerollback-state-unverified, including failures before the first database moved.Fix
UpdateInterruptedErrorsubclasses the revocation error, so every existing refusal branch still holds; only the code and message change.interruptedjoins the public code and redaction lists.restoreUpdateDatabaseBackupreportsonLiveMutationbefore the first live change. A failure before it keeps the same pending-recovery flow, but labels data at riskstate-migrated-no-rollbackand says the current databases were not changed. Cleanup uncertainty and any failure after it keeprollback-state-unverified.Evidence
Native, Crabbox AWS Linux, systemd, on
5c3cb3a86b7(later commits only relabel the unstarted rollback and adjust tests):validating: exit 143 with reasoninterruptedandFailed: validating ... interrupted; Gateway untouched and ready. Base reportedunexpected-errorandpackage-update ... requester-revoked.interrupted.The unstarted-rollback label is proven by unit test only; lock contention during restore was not induced natively.
Regression tests:
update-command-database-backup.rollback-start.test.ts(both labels),package-update-steps.test.ts(interruption rethrows, stage cleaned),update-command-service-collection.test-support.ts(revoked-at-stop now reportsinterrupted).Review:
$autoreviewscoped-clean; independent Codex review reported no findings.Refs #164800