Skip to content

fix(doctor): stop chat updates rolling back during cleanup (2026.10.3) - #170218

Merged
RomneyDa merged 1 commit into
release/2026.10.3from
fix/2026.10.3-doctor-maintenance-custody
Oct 12, 2026
Merged

RomneyDa merged 1 commit into
release/2026.10.3from
fix/2026.10.3-doctor-maintenance-custody

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Related: #168750
Backport of #170070 for 2026.10.3.

What Problem This Solves

Fixes chat-requested updates rolling back, or leaving plugin upgrades unfinished, when activation Doctor fails with Database maintenance authority check cannot admit a nested effect.

User Impact

Doctor can complete post-repair cleanup without this false authority failure. Actual requester revocation still refuses writes. No schema, stored-data, permission, config-option, or rollback-policy changes.

Why This Change Was Made

Doctor must retain its existing database resource scope while rereading requester policy after its checks callback, then use its still-held native owner after drainage. This adapts the merged main fix to 10.2's synchronous maintenance layout and three existing post-repair callers, without importing main's broader Doctor/config refactors or changing the nested-effect guard.

The 2026.10.3 base is shipped 2026.10.2 plus canonical generated version alignment and release notes. This PR itself changes two files. Neither shipped 2026.10.2 nor 2026.10.5-beta.2 contains the main fix.

Original repair: #170070 (fd4b09c0aca8a6a98b6ab12788b648edfaa44307). Thanks @hannesrudolph.

Evidence

  • Reproduced the exact nested-effect failure on unchanged shipped 10.2 product code for both configured-owner and linked-profile requesters. The stack reaches Object.assertAdmission through observeOpenClawDatabaseMaintenanceResource; both cases pass after this repair, including replacement and later requester-revocation refusal.
  • Full affected maintenance gate: 261 passed, 1 skipped, 26 files, 545.37 seconds wall time. The skipped real btrfs NOCOW integration is Linux-only; its mocked safety/refusal siblings passed on macOS. Resource-scope guard, native worker settlement, interrupted reclamation, Gateway restoration, schema/corruption refusal, and warm-admission checks are retained.
  • Frozen-head standalone pnpm test src/commands/doctor-maintenance.requester-authority.test.ts --maxWorkers=1 passed 2/2 in 64.13 seconds wall time (including setup, transformation, and native worker preparation; the two reported test cases total 27.39 seconds). The earlier product-identical run took 37.91 seconds. This extends the existing real Doctor/storage/requester fixture; its native custody, file replacement, config promotion, and revocation behavior cannot be proved by a cheaper mock supplying the asserted outcome. CI seconds are pending.
  • Production and core-source test typechecks, targeted lint/format, dependency pins, plugin-boundary report, and git diff --check passed. Canonical 10.3 version-preparation/preflight and changelog layout checks passed.
  • Independent AutoReview: scoped-clean at P0/P1.
  • Published 2026.10.1 / 2026.10.2 → unpublished 2026.10.3 updater/candidate smoke and exact-head PR CI are pending. The Docker cell uses the candidate's frozen 10.2-derived harness, manual restart, and no live-provider credentials.

This proves the production ownership boundary on isolated macOS state. It does not reproduce the reporter's large database or a real launchd/systemd chat handoff, and it does not reconcile historical anonymous child-command reservations. No live Gateway or operator state was changed. PR readiness is separate from final stable release qualification/publication.

Backport #170070 to the 2026.10.3 hotfix line, retaining the existing repair
scope during post-check authority reads and the native owner after drainage.
Adapt only the shared helper and its three post-repair callers to the stable
layout; preserve nested-effect refusal and requester-revocation checks.

Co-authored-by: hannesrudolph <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 12, 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 commands Command implementations size: S labels Oct 12, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review October 12, 2026 20:34
@RomneyDa
RomneyDa merged commit 6d2d62c into release/2026.10.3 Oct 12, 2026
199 of 200 checks passed
@RomneyDa
RomneyDa deleted the fix/2026.10.3-doctor-maintenance-custody branch October 12, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant