Skip to content

fix(update): interrupted updates report requester-revoked or unexpected-error - #194659

Merged
steipete merged 10 commits into
mainfrom
codex/update-interruption-labels
Nov 7, 2026
Merged

steipete merged 10 commits into
mainfrom
codex/update-interruption-labels

Conversation

@steipete

@steipete steipete commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: an interrupted update reports requester-revoked or unexpected-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

  • Forward guards refused interrupted work with UpdateRequesterRevokedError, so operators saw requester-revoked although nobody revoked anything.
  • Before activation, the refusal surfaced from a progress receipt as Could not record update step ..., the package step recorded a failure, and the run ended unexpected-error with the Gateway healthy.
  • restoreFailedUpdateDatabases labelled every thrown restore failure rollback-state-unverified, including failures before the first database moved.

Fix

  • UpdateInterruptedError subclasses the revocation error, so every existing refusal branch still holds; only the code and message change. interrupted joins the public code and redaction lists.
  • An interrupted package step rethrows instead of recording a package failure, and the failure result reads the code through wrapping errors.
  • restoreUpdateDatabaseBackup reports onLiveMutation before the first live change. A failure before it keeps the same pending-recovery flow, but labels data at risk state-migrated-no-rollback and says the current databases were not changed. Cleanup uncertainty and any failure after it keep rollback-state-unverified.

Evidence

Native, Crabbox AWS Linux, systemd, on 5c3cb3a86b7 (later commits only relabel the unstarted rollback and adjust tests):

  • SIGTERM during validating: exit 143 with reason interrupted and Failed: validating ... interrupted; Gateway untouched and ready. Base reported unexpected-error and package-update ... requester-revoked.
  • SIGTERM at Doctor: rolled back healthy in 145 s, labelled 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 reports interrupted).

Review: $autoreview scoped-clean; independent Codex review reported no findings.

Refs #164800

@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S labels Nov 7, 2026
@steipete
steipete marked this pull request as ready for review November 7, 2026 15:25
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T16:54:46.204632Z 0051e63 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 0051e634d42470c4ba0613a1d9f26ca4e75049fd
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/logging/diagnostic-support-redaction.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 7, 2026
@steipete
steipete enabled auto-merge (squash) November 7, 2026 17:21
@steipete
steipete merged commit 0542dd8 into main Nov 7, 2026
144 checks passed
@steipete
steipete deleted the codex/update-interruption-labels branch November 7, 2026 17:23
@steipete

steipete commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

steipete added a commit that referenced this pull request Nov 7, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 8, 2026
…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
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 8, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. cli CLI command changes security-sensitive-changed size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant