Skip to content

fix(update): correct backup guidance and cover incident regressions - #147023

Merged
steipete merged 1 commit into
mainfrom
steipete/upd-backup-recovery-guidance
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/upd-backup-recovery-guidance

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Recovery guidance names openclaw backup as the archive-creation command, but the bare command prints usage and exits 1. The reported update failures also need regressions for the exact MCP timeout and Feishu security-posture paths already repaired on main.

Related: #146887
Related: #147005

Reported by @zzs12345-web (#146887).

User Impact

Recovery messages now name openclaw backup create; the recovery guide names openclaw backup create --verify. The regression coverage verifies that timed-out MCP initialization does not leak the SDK's cleanup rejection and that configured Feishu/Discord open-group posture remains advisory in both Doctor and update lint.

Why This Change Was Made

The lifecycle error was constructed by the service-child owner, but the unhandled promise was the SDK's discarded Client.close() result. Main already contains #144941's observation at the MCP lifecycle boundary. The new ordered deadline case leaves initialization unanswered, waits for cleanup to start, rejects extinction, and checks typed timeout plus retained uncertain cleanup and its diagnostic. It does not certify lost identity as successful extinction.

Main also contains #145379's producer-level warning severity. The existing public-plugin security test now covers configured Feishu as well as Discord, plain Doctor's warning and follow-up hint, and the candidate lint error threshold. No severity bypass was added.

The reporter corrected the original backup exit-code claim: a pipe supplied the apparent zero. Actual CLI probes confirm help plus exit 1, while backup create writes an archive. Only the misleading command examples needed production changes. Schema refusal, service ordering, and backup creation behavior are preserved.

PR #147005 owns MCP probe deferral. This branch has no changes to src/flows/doctor-core-checks* and does not duplicate that implementation. No contributor code was adopted. Production delta: +2 / -2 lines (zero net growth).

Evidence

  • MCP before: temporarily removing only fix(doctor): contain MCP child cleanup failures #144941's SDK close-promise observer reproduced Unhandled Rejection: service child cleanup identity lost: anchor channel closed without a matching closing receipt and exit 1. Restoring the existing code passed the real-deadline case and both complete lifecycle suites.
  • Feishu before: temporarily restoring its pre-fix(doctor): keep open groupPolicy as a warning so updates can finish #145379 critical producer severity made the candidate error-threshold assertion fail, expected 0 and received 1. Restoring warn passed the plain-Doctor and candidate-lint assertions. Both production files were restored byte-for-byte.
  • Guidance before: the schema-error assertion and all six existing Gateway newer-schema refusal variants failed because the command omitted create; the corrected messages pass.
  • Final focused owner/sibling suite: 454 tests passed across five Vitest shards. Separate actual CLI probes verified bare backup usage/exit 1, help/exit 0, and four archive-creation/error cases.
  • Final changed-file checks passed, including production/test typechecking, lint, formatting, and all guards. Independent review is scoped-clean through P2. An abandoned artifact lock from the interrupted scope-change check was recovered only after verifying the associated compiler/check processes and cache handles had stopped.

Fresh exact-head CI: run 34758880359 completed successfully after refreshing the merge ref to include the repaired main baseline. The CI watcher reported GREEN; no CI rerun or source change was needed.

Stage 3 remains diagnosis only. The supplied handoff log strongly matches the failed-systemd-state defect already fixed by #145094, and its updater SIGKILL comes from the helper's cancellation path. Finalize success is ledger bookkeeping, not proof of service recovery. A published 9.3 driver with an old 30-second unit and active work still needs Linux upgrade/recovery qualification; candidate fixes do not replace that already-running helper. The stale unit Description and dual Node executables are not established causes.

ClawSweeper review

Reviewed head: c4404195839306968bb4b9e7fd2a533a8ebf965b. No correctness or security findings were reported. The data-model compatibility checklist is not applicable: the only change in src/infra/sqlite-user-version.ts is the backup command in an error message; schema versions, migrations, storage, and recovery semantics are unchanged. Existing schema-refusal coverage remains intact. ClawSweeper revision 3 also confirms the earlier migration-proof blocker was a classification error; the generated checklist remains stale. No code fixup or re-review request is needed.

The stage-3 managed-service-handoff-restore-failed report in #146887 remains open pending the reporter's handoff.log; this PR does not close that issue.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 12:38
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 9:11 AM ET / 13:11 UTC (Revision 3).

ClawSweeper review

What this changes

Corrects backup commands in recovery guidance and extends regression coverage for MCP initialization timeouts and Feishu/Discord security warnings.

Merge readiness

⛔ Blocked before merge - 1 item remains

The PR remains useful and has no actionable correctness findings. The earlier migration-proof blocker was a classification error: the production diff changes diagnostic wording, not storage or recovery semantics.

Priority: P2
Reviewed head: c4404195839306968bb4b9e7fd2a533a8ebf965b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful correction with meaningful regression coverage and no supported merge blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored exemption applies. The body reports real backup CLI probes and focused before/after regressions for the changed guidance and tests; it makes no claim to prove the separate systemd recovery failure.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored exemption applies. The body reports real backup CLI probes and focused before/after regressions for the changed guidance and tests; it makes no claim to prove the separate systemd recovery failure.
Evidence reviewed 8 items Production scope and prior-review disposition: The pinned introduced diff changes only command text in the two production files. Schema versions, persistence, refusal conditions, service parking, and exit behavior remain unchanged. This independently supports removing the previous migration/upgrade-proof blocker.
Still necessary on fetched main: Fetched main still recommends bare openclaw backup in the newer-schema error; the same omission remains in Gateway startup guidance.
Existing shipped command contract: The supplied latest release, v2026.9.4, already registers backup create and its --verify option. Its schema-error guidance still omits create, so the patch corrects instructions for an existing command.
Findings None None.
Security None None.

How this fits together

Gateway startup checks reject unsupported database schemas and explain recovery to operators. Doctor separately checks configured integrations; these tests protect its cleanup handling and advisory severity.

flowchart TD
  A[Existing installation] --> B[Gateway schema check]
  B --> C[Unsupported schema]
  C --> D[Correct backup recovery guidance]
  A --> E[Doctor integration checks]
  E --> F[MCP cleanup uncertainty]
  E --> G[Channel posture warnings]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source 0, Tests +40, Docs 0. Total +40 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 2 2 0
Tests 4 112 72 +40
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 115 75 +40

Review metrics

None.

Stored data model

Persistent data-model change detected: database schema: src/infra/sqlite-user-version.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: partial_overlap
Canonical: #146887
Summary: This PR addresses recovery guidance and incident regression coverage, without resolving every stage of the reported update failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep recovery instructions aligned with the existing backup CLI and retain the focused regressions around the established cleanup and advisory owners.

Do we have a high-confidence way to reproduce the issue?

Yes, source inspection establishes the guidance mismatch: current main recommends the parent backup command while archive creation belongs to backup create. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes. Correcting the examples and extending existing regression cases is a narrow repair; a migration, new backup behavior, or duplicate MCP implementation is unnecessary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 060e856e5f9d.

Labels

Label justifications:

  • P2: Misleading recovery instructions warrant a focused correction; this patch does not implement the broader update-outage repair.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. The body reports real backup CLI probes and focused before/after regressions for the changed guidance and tests; it makes no claim to prove the separate systemd recovery failure.

Evidence

What I checked:

  • Production scope and prior-review disposition: The pinned introduced diff changes only command text in the two production files. Schema versions, persistence, refusal conditions, service parking, and exit behavior remain unchanged. This independently supports removing the previous migration/upgrade-proof blocker. (src/infra/sqlite-user-version.ts:53, c44041958393)
  • Still necessary on fetched main: Fetched main still recommends bare openclaw backup in the newer-schema error; the same omission remains in Gateway startup guidance. (src/infra/sqlite-user-version.ts:53, 060e856e5f9d)
  • Existing shipped command contract: The supplied latest release, v2026.9.4, already registers backup create and its --verify option. Its schema-error guidance still omits create, so the patch corrects instructions for an existing command. (src/cli/program/register.backup.ts:40, 3a9d69db306c)
  • Meaningful regression coverage: The MCP case uses the real SDK client and OpenClaw transport with a mocked process owner, waits for initialization and cleanup, then checks typed timeout, retained uncertainty, and the cleanup diagnostic. This directly establishes the MCP SDK dependency signal; no Codex harness contract is involved. (src/agents/mcp-stdio-transport.test.ts:310, c44041958393)
  • Pinned dependency contract inspected: npm metadata identifies SDK 1.30.0 with this repository and gitHead. Both that revision's source and the published package call close without awaiting its promise after initialization fails, matching the regression's intended failure mechanism. (src/client/index.ts:510, 2d889f2b329e)
  • Channel advisory coverage: The extended test loads public plugin surfaces and checks both plain Doctor warnings and candidate lint thresholds. Existing Feishu and Discord producers already emit warn; the patch introduces no severity bypass or plugin API change. (src/commands/doctor-security.test.ts:817, c44041958393)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-13T12:44:45.248Z sha c440419 :: blocked before merge. :: none
  • reviewed 2026-09-13T13:01:08.281Z sha c440419 :: blocked before merge. :: none

@steipete steipete closed this Sep 13, 2026
@steipete steipete reopened this Sep 13, 2026
@steipete
steipete merged commit ef9b6d3 into main Sep 13, 2026
452 of 455 checks passed
@steipete
steipete deleted the steipete/upd-backup-recovery-guidance branch September 13, 2026 13:26
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* temp/pr-137049: (110 commits)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  improve(gateway): use metadata projection for presence (#146817)
  test(agents): reuse complete Responses model fixtures (#147015)
  fix(sessions): align the reclamation-memory test with the archive session owner (#147028)
  refactor(terminal): simplify copy-sensitive token checks (#146934)
  refactor(media): remove duplicate spaced path fallback (#146933)
  refactor(cli): reuse command-group names (#146893)
  improve(plugins): reduce JavaScript generation capture work (#146993)
  test: align plugin fixtures with current runtime contracts (#147000)
  refactor(browser): separate session tab tracking from cleanup (#146973)
  fix(tests): make systemd clock fixtures private (#146990)
  fix(linux): retire sleep guards when logind disconnects (#146046)
  refactor(matrix): share draft fallback delivery (#144840)
  fix(sessions): preserve cross-agent replies after reload (#146799)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit '0ac8a700e43efceef73d92fe8e50b185819e38ad': (27 commits)
  test(acpx): prove targeted turn cancellation (#137049)
  fix(ci): honor realtime meeting live-test opt-in (#147044)
  improve: reduce heartbeat enrollment work for large fleets (#147055)
  fix(gateway): install despite stale Linux session bus addresses (#146569)
  chore(i18n): refresh native locales (#147025)
  fix: avoid Gateway reinstalls when macOS service inspection is inconclusive (#146880)
  fix(pairing): QR setup rejects trusted-proxy gateways without a shared secret (#147036)
  fix(update): bound activation and accept slow Windows identity reads (#147019)
  perf(accounts): avoid materializing avatars for owner checks (#147032)
  improve(status): report external and ArrayBuffer memory (#141902)
  fix(update): preserve linked plugins during post-core sync (#147009)
  fix(channels): keep replies working after hot config reloads (#147001)
  refactor(gateway): defer worker transcript runtime loading (#143495)
  improve: reduce GitHub OAuth maintenance work for large agent rosters (#147021)
  fix(test): avoid settings lock writer startup timeouts (#147029)
  fix(update): correct backup guidance and cover incident regressions (#147023)
  refactor(gateway): share connection lifecycle across transports (#145950)
  refactor(telegram): share HTML text escaping (#146936)
  perf(build): reduce disk use in UI performance checks (#146687)
  refactor(memory-wiki): share freshness result construction (#146935)
  ...

# Conflicts:
#	src/config/sessions/session-accessor.sqlite-reclamation-memory.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant