Skip to content

fix: cancel Doctor cron and daemon snapshot preparation - #190874

Merged
roboclaw-bot merged 79 commits into
mainfrom
roboclaw/doctor-cron-daemon-snapshots
Nov 2, 2026
Merged

roboclaw-bot merged 79 commits into
mainfrom
roboclaw/doctor-cron-daemon-snapshots

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Doctor Cron inventory blocked task cancellation during a nested SQLite snapshot copy. Daemon runtime-pin migration also prepared its local target inside the shared-source transaction.

Await the copy under the command/task signal and join child and temporary-output cleanup. Prepare the daemon target before the source transaction and retain both native owners through generation observations. Native writes remain synchronous; target copies commit before source retirement, and completion receipts follow source commit. Exact values, timestamps, conflict refusal and retry behavior remain intact.

Validation:

  • Main reaches the held Cron copy but times out on cancellation at 20 seconds. The fix passes in 3.46 seconds, proving child/snapshot cleanup and unchanged source bytes.
  • The public daemon capture regression fails on main with four synchronous reader calls and passes with zero. Interrupted retirement and SIGKILL recovery pass.
  • Sixteen named owner/consumer files pass 270 tests with one platform ACL skip, including the affected existing state-migration files. Scoped format/lint/diff checks pass on seven TypeScript files. Canonical independent P0–P2 autoreview is clean across the complete eight-file patch.

Test allocation: 126 net lines; scalar unchanged. No configuration or schema version change. Native macOS/Windows large-family and latest-stable installation qualification remain unrun. Fully green exact-head PR CI is required before landing.

Related: #178359, #187900, #185879. The preceding three split stages are landed. Not yet released.

Thanks to chrislro's reported stack.

roboclaw-bot and others added 22 commits November 2, 2026 01:53
Add Doctor snapshot cancellation and capacity regressions for CI baseline proof before completing the async owner cutover.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>

Co-authored-by: steipete <[email protected]>
Await snapshot preparation and cleanup across Doctor inspection and repair planning, preserve original-path admission, and reject snapshots that exceed measured cache capacity. Retain synchronous public and transaction authority contracts.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>

Co-authored-by: steipete <[email protected]>
Bind task-worker cancellation to snapshot custody, retain the updater identity export, and repair async consumer fixtures and wrapper source closure. Keep the lease SQL kernel at its existing lifecycle owner.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Preserve per-run cancellation semantics in worker handler fixtures after adding the task-owned abort signal.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
…ries

Keep inaccessible state roots in the diagnostic result, and update source-isolation, lease-poll, and PostgreSQL transport fixtures to observe the actual async owners. Complete task control fixture migration.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Integrate tested main 1347e90 to resolve the named numeric-parser CI contract mismatch from #189993. Preserve specific ExpectedCliError diagnostics and refused dispatch in capability fixtures. Correct the generated IPC preload newline found by review; its cooked script passes node --check.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Apply the repository formatter to the two exact files reported by main-tier CI.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Await session and legacy-auth images, private engine reads, and fresh recovery inventories through the existing cancellable snapshot owner. Preserve writer and SDK contracts and reassert effect authority after awaited reads.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Use the gateway retention role explicitly in idle coverage, await the authoritative target and presented route pane, and retain failed restart diagnostics without relaxing its assertions.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Retain the existing native custody across asynchronous generation reads before and after synchronous migration writes. Prepare Doctor device credential imports through the same async owner, while preserving the released synchronous SDK driver.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Await nested Cron snapshot children under the inspection signal and retain daemon pin custody across asynchronous migration observations. Preserve synchronous native callers and target-before-source commit ordering.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 2, 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 gateway Gateway runtime size: L labels Nov 2, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 2, 2026 04:37
@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 2, 2026
Integrate main to resolve CLI fixture and canonical locale conflicts. Retain
the Cron backup manifest owner and await the existing asynchronous schema gate.

Wait for hook notice enqueue, browser provider entry, and identity authorization
completion before checking their results; retain assertions and test budgets.
Add bounded failure diagnostics for early child termination.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>
Base automatically changed from roboclaw/doctor-native-credentials to main November 2, 2026 17:44
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: qa-lab size: XL and removed size: L labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Security-sensitive guard cleared

Current revision: cdae2700adeb92c34d19a27de118d533ccf41757

This PR no longer changes files in the maintainer security-review tier.

Separate CODEOWNERS requirements still apply to security policy and enforcement files.

Merge main and keep the split limited to Cron task cancellation, paired
daemon target preparation and direct owner proof. Preserve synchronous
native writes, target-before-source commits and retry receipts.

Co-authored-by: steipete <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added size: L and removed app: web-ui App: web-ui cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: qa-lab size: XL labels Nov 2, 2026
@roboclaw-bot
roboclaw-bot merged commit 6a15410 into main Nov 2, 2026
151 checks passed
@roboclaw-bot
roboclaw-bot deleted the roboclaw/doctor-cron-daemon-snapshots branch November 2, 2026 18:51
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
)

* fix: recover same-boot agent leases on macOS and Windows

Add Doctor snapshot cancellation and capacity regressions for CI baseline proof before completing the async owner cutover.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>

Co-authored-by: steipete <[email protected]>

* fix: keep Doctor snapshot inspection cancellable on large databases

Await snapshot preparation and cleanup across Doctor inspection and repair planning, preserve original-path admission, and reject snapshots that exceed measured cache capacity. Retain synchronous public and transaction authority contracts.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>

Co-authored-by: steipete <[email protected]>

* fix: settle Doctor worker cancellation and preserve inspection sources

Bind task-worker cancellation to snapshot custody, retain the updater identity export, and repair async consumer fixtures and wrapper source closure. Keep the lease SQL kernel at its existing lifecycle owner.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test: migrate task control fixtures to cancellation signals

Preserve per-run cancellation semantics in worker handler fixtures after adding the task-owned abort signal.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix: preserve unknown inspection results and async Doctor test boundaries

Keep inaccessible state roots in the diagnostic result, and update source-isolation, lease-poll, and PostgreSQL transport fixtures to observe the actual async owners. Complete task control fixture migration.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* chore(ui): refresh control ui locales (openclaw#190816)

* test: format Doctor snapshot admission fixtures

Apply the repository formatter to the two exact files reported by main-tier CI.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix: await remaining Doctor inspection sources

Await session and legacy-auth images, private engine reads, and fresh recovery inventories through the existing cancellable snapshot owner. Preserve writer and SDK contracts and reassert effect authority after awaited reads.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test: avoid shadowing the Doctor admission result

* fix: await fresh Doctor migration and adoption guards

* fix: scope PostgreSQL eligibility to agent inspection

* fix: await Doctor process and restart lease inspection

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test: bind Doctor CI fixtures to active runtime owners

Use the gateway retention role explicitly in idle coverage, await the authoritative target and presented route pane, and retain failed restart diagnostics without relaxing its assertions.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix: await native credential migration observations

Retain the existing native custody across asynchronous generation reads before and after synchronous migration writes. Prepare Doctor device credential imports through the same async owner, while preserving the released synchronous SDK driver.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix: cancel Doctor cron and daemon snapshot preparation

Await nested Cron snapshot children under the inspection signal and retain daemon pin custody across asynchronous migration observations. Preserve synchronous native callers and target-before-source commit ordering.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix: keep the Doctor daemon transaction helper internal

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(doctor): await auxiliary quarantine inspection and retain cleanup errors

Prepare quarantine in the existing inspection scope before native admission. Retain failed preparation outcomes to preserve optional-index tolerance without synchronous retries, and keep disposal failures visible on cancellation. Retire the unused synchronous shared-auth inspection export and calibrate the actual async copy owner.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>

Co-authored-by: steipete <[email protected]>

* test(doctor): retain real snapshot custody in inspection fixtures

Observe actual allocated images, retain the native admission behind the known-quarantine fixture, and forward async copy-probe failures through the native worker error channel. Preserve all source, cancellation, refusal and no-sync assertions.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>

Co-authored-by: steipete <[email protected]>

* test(doctor): run snapshot contracts with database admission owner

* test(process): prune retired partial mock allowances

* test(doctor): align process proof with asynchronous read ownership

* fix(state): revalidate migration operation authority for companion stores

* test(update): expose the pending Doctor phase on resume failure

* test(doctor): exclude harness diagnostics from test allocation

* fix(types): keep mailbox summary entry private

* test(state): forward native migration owner authority in fixtures

* fix(ci): restore Node validation prerequisites

Declare the pinned Bun child required by Node-hosted codegen checks, keep Baseten admission proof under its plugin owner, align the Zalo TTL fixture with its monotonic clock, and keep the unused mailbox type private.

Co-authored-by: steipete <[email protected]>

* fix(doctor): retire synchronous identity repair adapter

Route the corrupted identity regression through the awaited Doctor credential owner and remove the superseded internal adapter and inventory entry. Preserve identity bytes and the synchronous writer kernel.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(test): retain Baseten admission at its core integration owner

Restore the original public-plugin-entry integration and route its real credential fixture through the existing native core worker owner. Remove the forbidden private preload and its allocation; retain all five cases and their deadline. Preserve the actual ClawRouter unavailable outcome in failure diagnostics.

Co-authored-by: steipete <[email protected]>

* test(doctor): retain read-only lease inspection before refusal

Move the reviewed process-stage refusal fixture to the reader stage that introduces awaited lease inspection. Allow only cleaned private STATE images; preserve source family bytes, no repair backup, and zero images for Gateway/schema owner refusal.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(update): follow asynchronous foreground owner inspection

Bind the existing real-process ownership fixture to the async lease reader used by foreground recovery. Preserve PID identity, liveness, system ownership, revoked-authority and native-restart assertions.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(update): persist the foreign supervisor fixture owner

Use the existing serving-owner fixture so descriptive and transactional
restart admission observe the same live foreign supervisor lease.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(update): locate stalled serialized restart phases

Report only the scenario and last reached fixture phase on failure; the
real lifecycle precedes the printing child and retains its original gates.

Co-authored-by: steipete <[email protected]>

* fix(doctor): preserve Windows registry and fixture path identity

Retain the configured external locator when SQLite reopens its canonical
Windows namespace spelling, and normalize the synthetic QA workspace root
using its existing identity owner. Keep full inventory/state assertions.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(doctor): check capacity before forking private snapshots

Reserve the complete source family on the actual destination volume before
copying a retained lint image, using existing policy and cleanup owners.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(doctor): await the new shared-state preparation anchor

Read the physical engine before checking its store identity, and reassert
the existing schema lease after that asynchronous observation.

Co-authored-by: Christian Rodrigues de Oliveira <[email protected]>
Co-authored-by: steipete <[email protected]>

* test(doctor): run shared-state preparation in native PostgreSQL CI

Select the existing CLI boundary suite in default conformance and its
existing forked database worker owner, retaining all three actual cases.

Co-authored-by: steipete <[email protected]>

---------

Co-authored-by: steipete <[email protected]>
Co-authored-by: Christian Rodrigues de Oliveira <[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. gateway Gateway runtime size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant