Skip to content

perf(config): keep deferred plugin migrations out of normal runs - #170230

Merged
steipete merged 6 commits into
mainfrom
perf/deferred-migrations-doctor
Oct 13, 2026
Merged

steipete merged 6 commits into
mainfrom
perf/deferred-migrations-doctor

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Related: #147711, #158783, #160682

What Problem This Solves

Normal CLI commands and Gateway config reads synchronously opened the state database to inspect deferred plugin migrations, adding a child process to every config read.

User Impact

Config reads and writes consume canonical config without querying pending plugin migrations. Doctor remains the owner of legacy plugin repairs. openclaw update runs candidate Doctor and carries explicit pending facts through update admission and config writes; unavailable plugins retain their inputs and produce actionable warnings. After a git/source or package-manager upgrade, run openclaw doctor --fix before restarting; openclaw update status exposes unfinished plugin migrations even without an update run.

A known plugin config that still contains retired fields must be repaired by Doctor before ordinary commands can use it. Ordinary Gateway/CLI paths no longer silently exclude those fields based on migration records. Missing plugins retain their existing warning-only behavior without a migration DB query. If Doctor cannot produce valid canonical config, the updater’s normal candidate validation refuses activation before package swap or stopping the previous Gateway; the operator gets the repair next step.

Why This Change Was Made

The runtime query originated in #147711 to preserve unavailable-plugin inputs, report pending work, and fence repair publication against newer obligations. Those contracts remain at their owners: Doctor/update supplies migration facts explicitly, including a meaningful empty generation; repair publication still checks the current obligation generation. Status and triage inspect pending work asynchronously. Runtime policy reads and plugin source cleanup use canonical config.

The legacy pending-reader dispatch in src/plugins/state.worker.ts remains for the published 2026.10.1 Windows updater. No new marker, cache, schema, or compatibility reader is introduced.

The approved ClawRouter build alignment updates @solidjs/compiler, @solidjs/web, and solid-js to 2.0.0-rc.14, matching Canvas, Workboard, and X. pnpm regenerated the lockfile, and the plugin's browser build regenerated its content-addressed asset manifest. No other dependency change is part of the PR diff.

Update behavior

The installed published updater runs first and cannot be patched by this candidate. Candidate Doctor owns deferred plugin migrations and supplies pending facts to repair writes; ordinary config reads and writes consume canonical config without opening the migration ledger. After git/source or package-manager upgrades, run openclaw doctor --fix; openclaw update status keeps pending work visible. Unavailable owners retain their settings and data until Doctor can finish. Known retired fields still require Doctor before ordinary use, and normal candidate validation protects the previous Gateway when config remains invalid. This PR changes no schema or driver marker and leaves rollback contracts unchanged.

Evidence

Current head: 84096f7e55ef00df06e56cec2041ab71e3ba2504. Merged main 7f2e2b4d7185d8053ff26f56a41684abae1b174a without conflicts. This brings in 3c63da22f046b, which corrects the inherited idle-input stale expectation described below. No product changes or conflict resolutions were added during this refresh. The separate approved Solid alignment remains ba8fb9be58b2d.

Current-head CI

Run 38335235541, attempt 1, is bound to 84096f7e55ef00df06e56cec2041ab71e3ba2504. 91 jobs passed, 23 skipped, and 6 failed (five shards plus aggregate 115096543607); every job is terminal and none was canceled. Native landing uses the authorized pre-existing-failure admin exception; failed CI is not claimed green. The original idle-input assertion is fixed by incorporated main.

Current failed shard Attribution
large-8 Both persisted-abandonment cases fail with operator source identity changed / Profile authority store changed. Scheduled-main job 115091148636 fails the same two cases and signature.
small-2-1 Both Arcee account-link cases fail before session creation with FORBIDDEN current authorized connection; main job 115091148711 matches. Managed-worktree session creation fails with skill-library AUTHORITY_EXPIRED; main job 115091148743 matches.
small-9-1 Workspace alias canonicalization for operator.admin fails with the same skill-library AUTHORITY_EXPIRED as main job 115091148782.
large-22-1 Trusted-proxy session mutation expects HTTP 403 but gets 500 with Profile authority store changed; main job 115091148615 matches the test and signature.
small-17-1 Transient failure in unchanged archive fixture: orphaned provisioning cleanup (failure=false) returns ok:false. Its reached archive/placement/storage owners and fixture are byte-identical to baseline. Source tracing verifies the fixture installs its runtime snapshot directly, overrides config reads/writes, and sends an archive-only request with client:null; the PR-changed config IO/mutation paths are bypassed.

The four profile-authority shards match scheduled main d6b01a200752e8f121bc21263c6563bee058b1b4; their relevant tests and owners are byte-identical to that main, CI baseline 7f2e2b4d7185d8053ff26f56a41684abae1b174a, and this PR. Main #170470 introduced the involved transferable profile-authority lifecycle. No single internal root cause is asserted for all four.

The archive case passes in both inspected scheduled-main runs and local baseline/head replays: all 10 tests passed on main in 80.90 seconds and on the exact PR head in 89.25 seconds. Those passing replays do not fix or reproduce the CI failure. Its inherited classification rests on the unchanged fixture execution path bypassing the changed code; the returned error and precise intermittent cause remain unobserved. No assertion, timeout, production code, or fixture was altered to make CI green.

The main refresh was conflict-free and retained the identical product patch ID 270cad86f09db59072709b5e8a6d26846726900e. Existing focused/package proof below remains prior-head evidence. Native admission separately verifies complete current-attempt job accounting, aggregate causality, unchanged source hashes, live security clearance, and writer authority.

Prior-head CI (ba8fb9be58b2d)

CI run 38329322681, attempt 1, completed on this exact head in 714 seconds: 94 passed, 23 skipped, 2 failed jobs. The only independent failure is inherited from merged main. The full PR checks report 125 passed, 51 skipped, 3 failed checks; the third red is the Security Review workflow's dependent CI-gate status, while its dependency and security reviews passed. No rerun or timeout/assertion change was used.

Check Result and attribution
checks-node-changed-compact-small-14-1 Inherited stale test expectation. server.sessions.create.durability.test.ts:551 expects one interrupted pending input after a refused idle transcript commit, but gets zero. Merged main #170376, commit 768fc78a2bcd2691cec90d7772eacc53d93e3fd2, deliberately makes fresh idle sends commit directly rather than stage separately (server-methods/chat-send-handler.ts:315–330). Both test and handler are byte-identical between pinned main and this head. 215 tests passed, 1 failed; 239.30 seconds command wall, 235.68 seconds Vitest.
CI aggregate Propagates that one failed shard.
External CI-gate status Propagates the failed CI gate. The Security Review workflow itself succeeded; its log says the current CI gate did not pass.

The prior Board fixture repair from #169622 is included through main. No PR-caused red was found. The exact pinned-main run was canceled and supplies no baseline execution proof; this attribution rests on the identical source, the changed main ownership path, and the matching assertion result.

Package and update proof

Proof platform: local Docker (OrbStack, Linux ARM64), isolated state throughout. AWS broker readiness failed before allocation, so no remote lease or AWS proof is claimed.

Cell Baseline → candidate Result
pnpm release:check Source head ba8fb9be… Blocked by inherited locale drift, exit 1 after 2146 seconds. Full package build, all 96 plugin builds, generated npm locks, SDK/config checks, and native locale checks passed. Control UI locale verification failed before the final package validator.
Prepared-package release validator Candidate tarball from the Docker run Passed. node --import ./scripts/tsx.mjs scripts/release-check.ts --tarball <prepared-candidate> verified final tarball contents/integrity, installed runtime, released/current SDK consumer compilation, and bundled channel/setup entry smoke. This independently covers the final package stage blocked by inherited locale preflight; it does not make the full pnpm release:check invocation green.
published-upgrade-survivor Published openclaw@latest → candidate Failed after the successful update hop (477 seconds lane / 678 seconds total invocation). openclaw@latest resolved to 2026.10.2; installed candidate build info matches ba8fb9be…. Update outcome and automatic-migration assertions passed, including byte-preservation of the unavailable plugin path. A later standalone Doctor failed during Codex registration with Runtime config is not prepared. Await captureRuntimeConfigAsyncReader()() first.
dreaming-cron-doctor Published [email protected] → candidate Migration proof passed; full lane failed (620 seconds). Published 2026.9.6 updater and candidate delegated Doctor both exited 0. dreaming-cron-proof.json reports updater-child-repaired: original legacy rows reached the child, active/inactive partitions were repaired, and original-row backup integrity/FK checks passed. The subsequent standalone repeat Doctor hit the inherited Codex registration error; later idempotence/Gateway assertions were not reached.
missing-configured-plugin-migration Published [email protected] → candidate Passed end to end (435 seconds lane / 1024 seconds whole invocation, including a shared build-lock wait). The installed 2026.9.2 updater completed successfully. Candidate Doctor discharged seeded public-setup debt, retained ambiguous debt, and preserved unavailable Codex settings and both legacy session bindings. Gateway health/status and pending warnings passed. After exposing the candidate Codex package, openclaw doctor --fix installed it, imported both main/ops bindings, completed the Codex migration, removed its owner warning, and left valid config; ambiguous setup debt and protected-source warnings remained visible. No legacy-driver-refusal recovery was needed.

Commands: required two-lane run used OPENCLAW_DOCKER_ALL_LANES="published-upgrade-survivor dreaming-cron-doctor" node scripts/test-docker-all.mjs. Its fail-fast behavior prevented dreaming from starting, so the dreaming lane was run separately with the same SHA- and checksum-verified candidate package and registry. The PR-specific cell used:

OPENCLAW_DOCKER_ALL_LANES=published-upgrade-survivor \
[email protected] \
OPENCLAW_UPGRADE_SURVIVOR_SCENARIO=missing-configured-plugin-migration \
OPENCLAW_UPGRADE_SURVIVOR_UPDATE_RESTART_MODE=manual \
OPENCLAW_UPGRADE_SURVIVOR_ROOT_MANAGED_VPS=0 \
OPENCLAW_UPGRADE_SURVIVOR_LIVE_MODELS= \
OPENCLAW_UPGRADE_SURVIVOR_LIVE_OPENAI=0 \
node scripts/test-docker-all.mjs

The standard survivor and dreaming cells used candidate tarball SHA-256 610d0487fefbe8b2ae3d1691c8de1feeefde213c1145b117772fc4adfb8c3bbc; embedded build info and installed identity both matched ba8fb9be…. The pending-migration cell rebuilt the same source head, producing tarball SHA-256 ad7dd66f99448f30d4cd5791be2a3cc19525d403a893a9972c7862e19c23b3ed; its embedded build info also matched the head. All containers finished and were removed; AWS failed before allocation, so there were no leases to stop.

The locale failure is inherited from merged main: #170390 added sessionsView.communication.title after locale refresh #170414, leaving that single key untranslated in all 20 foreign locales; #170352 also removed an English key and changed the catalog hash. All relevant locale, checker, and schema-hint inputs are byte-identical between merged main 56715acf… and this candidate. Read-only materialization reports one fallback key / 20 locale pairs. No hash-only baseline change, English fallback waiver, or unrelated translation work was folded into this PR.

The standalone Doctor registration failure is inherited from main #169714, commit 7e48efba10479f90496438e3edf3e0d0121e34c7: core getRuntimeConfig() became a strict prepared-snapshot read, while Codex registration still calls api.runtime.config.current() eagerly (extensions/codex/index.ts:93–122). Doctor's ordinary flow does not publish that snapshot before registration; the lint flow already does. The relevant Codex/runtime/Doctor loader owners are unchanged from pinned main, and this PR's removed migration reads had no runtime-config publication side effect. This is source-based attribution, not a passing pinned-main replay. No fallback or suppressed Doctor error was added. The required two-lane invocation stopped on this failure before starting dreaming; dreaming was therefore run independently as recorded above.

Changed-gate checks: Failed only at dead-export scan. All preceding checks passed, including complete core/UI/extension/script/test typechecks (2807.40 seconds, including build-lock waits), formatting, import boundaries, ratchets, npm locks, Doctor closure contracts, and deprecated API checks. Knip found src/tts/tts.ts:getResolvedSpeechProviderConfig and extensions/qa-lab/src/mantis/run.test-support.ts:timedOutCommandResult, both outside this PR and byte-identical to pinned main. The dead-export stage took 103.30 seconds. No skip, baseline waiver, or unrelated code change was used.

Focused local validation

ClawRouter browser build passed. Six ClawRouter files passed all 45 tests in 124.62 seconds through node scripts/run-vitest.mjs ... --maxWorkers=1. The canonical-config migration regression, update config-fence, and Doctor deferred-persistence files passed all 27 tests in 100.98 seconds. Independent Codex review of the complete merged candidate plus alignment was clean through P2.

The first local release build stopped before upgrade proof because the filtered install left a workspace TypeBox link at 1.3.34 while merged main required 1.3.35. A complete frozen pnpm install reconciled the links without changing tracked source; the corrected run is reported above. AWS proof could not allocate: broker readiness timed out before any lease existed. Package/update proof therefore used local Docker with isolated state.

Earlier-head evidence, preserved as historical context before the main merge and Solid alignment

Exact-head failure attribution (2026-10-12)

Head 2a4f937500ab396b4b147ffcf259df9c3a7d0e98, merge base 07fb44a5e487c2e94deaf2d8ccfc4b54cb830185. CI run 38319548429 remains failed: three substantive shards and the aggregate gate. The automatic UNKNOWN labels mean the packed job names had no matching main job; exact test signatures below establish inheritance. No CI rerun, branch update, timeout/assertion change, or speculative production repair was used to change the gate.

Failed job Exact errors Verdict and evidence
large-19-2, Bun methods5 All 17 board-progress.write-admission.test.ts cases; first board.update (allow, cold=false) reports User profile catalog is not ready; leaked probes then recurse in createSqliteWorkerOperationAdmission, with native-retirement and stack-overflow errors. Group 69.54s. Inherited fixture defect. Scheduled-main job 115037168398, SHA 395ea60dea893feb48782c0ac5fd4fc5a148a42a, fails the same 17 cases and signatures (140.11s group). Earlier main job, SHA 11a12460482f7790aca049243de04cb9193e87c2, repeats them (172.55s).
large-19-1, Bun methods8 23 progress-card.authorization.test.ts cases plus five board.mcp-admission.test.ts cases report User profile catalog is not ready. Group 30.31s. Inherited fixture defect. Scheduled-main job 115037168389 fails the exact same 28 cases (376.13s larger group); earlier main job repeats them (374.04s).
small-23-1, Node config-patch Large-shrink authority revoked: false times out on config.patch (10s request; 195.461s including cleanup), teardown hits 180s, worker host callback prune times out, then authority revoked: true reports metadata shutting down (111.366s). Group 455.98s. Inherited unresolved failure. Scheduled-main job 115037168717 has the same cases, errors, owners, and sequence: 196.426s / 111.566s; group 468.13s. Tracked by #170349.
openclaw/ci-gate Aggregate of those three failed jobs. Inherited aggregate. No separate defect; still red.

The Board role-catalog requirement was introduced by e9204c6dc6c42 (#169799), already in this PR's merge base. The three failing fixtures, role-policy owner, and worker probes are byte-identical between base and head. The failure occurs during request pre-dispatch authorization, before the changed deferred-config read path. Scheduled main uses Node, while these PR groups use Bun; the cross-runtime attribution rests on the identical initial catalog error, exact case sets, unchanged owner/fixtures, and the existing owning repair, rather than Node logs alone.

Merged #169622, commit cbc53ac75eca314efebdcc57cfcbb68ce5d4e99e (2026-10-12 22:58:21 UTC), explicitly prepares and retains the profile catalog in all three fixtures and unconditionally restores Board probes after rejected requests. It repairs the exact two-stage failure. This inherited fix has not been copied into the performance branch.

The Gateway test, config RPC fixture, config/agent handlers, metadata lifecycle, usage worker/runtime/scope, and database admission are unchanged by this PR. The prune warning belongs to usage-cache refresh and background agent-database writer admission; the logs do not prove the particular blocked admission or lock holder, so no specific deadlock repair is claimed.

Runtime correction: both original PR and scheduled-main logs identify the Node 24.19.0 linux-x64 toolchain. Prior local ARM64 comparisons used 24.21.0 and remain useful non-reproductions, not exact-CI-version evidence. The ClawRouter Solid dependency mismatch and published-driver package-proof gap described above remain pending separately.

Focused config, CLI guard, Gateway option, update admission/channel write, status, and triage tests pass. The canonical-config regression deliberately corrupts a pending migration report: normal reads/writes still succeed, while the explicit pending reader fails. It failed before the fix at the intended config-read boundary. Repair tests retain new/stronger-obligation and include-owned publication conflicts.

Targeted changed-file checks pass, including core and core-test types, lint/format, dependency/import boundaries, SQLite rules, and docs checks. The final snapshot-helper extraction passes format, lint, core types, both line-count ratchets, and the full import-cycle scan (zero runtime cycles, 486.223s). All 28 affected test type graphs passed before the mechanical extraction (714.909s). Fresh independent Codex review of the complete follow-up patch through P2 reported no actionable findings. The subsequent type-only extraction and wrapper-inventory repair also passed independent review through P2; format (0.783s), scoped lint (77.232s), core types (71.736s), and Madge (zero cycles, 192.136s) pass. On follow-up CI, all four Doctor deferred-config cases passed (4.172s summed test-body time; startup excluded).

The candidate package build passed in 26m39.9s. pnpm release:check passed release preflight, then failed bundled dependency validation after 2034.451s: ClawRouter still declares Solid rc.13, while Canvas/Workboard/X declare rc.14. The same manifests are present in the base and current main; this PR changes no dependencies. Package/update artifact proof is blocked by that mismatch. Required published-driver × candidate package proof has not run; the package gate must be resolved first.

Three-run median wall seconds, built openclaw.mjs, isolated HOME/config/state; no operator Gateway or state is used. Node 26.11.1, Bun 1.4.3; same shared host. Baseline starting load was 40.42/35.61/36.84; after starting load was 101.86/90.14/73.22 (one-minute load peaked at 122.49 during Node samples). These unpaired wall measurements do not establish an overall speedup. Measurements and profiles use built candidate 6087010; later corrections affect Doctor/plugin-update ownership and test fixtures, not the measured ordinary config path.

Command/state Node before Node after Bun before Bun after
config set / fresh 36.170 43.649 14.136 9.529
config set / reused 20.340 23.280 12.761 8.989
config get / fresh 5.809 12.908 5.186 6.010
config get / reused 4.797 8.100 3.570 5.034
config validate / fresh 2.205 4.781 2.903 7.153
config validate / reused 15.172 20.676 13.400 13.908

Baseline child profiles attribute 4,885.886ms (Node) / 3,343.217ms (Bun) of inclusive sampled time to readDeferredPluginMigrations, including 4,724.033ms / 3,223.501ms beneath runSqliteReadOnlyWorkerSync. These are inclusive profile durations, not pure CPU time. Both after child profiles contain zero nodes/samples for either symbol. Targeted synchronous migration bookkeeping is absent in Node and Bun.

Process CPU medians (user / system seconds)
Command/state Node before → after Bun before → after
config set / fresh 4.413 / 5.081 → 3.936 / 7.556 2.992 / 13.408 → 2.560 / 8.289
config set / reused 4.117 / 2.919 → 3.416 / 5.294 3.003 / 9.982 → 2.737 / 9.945
config get / fresh 1.701 / 1.029 → 2.162 / 3.188 1.508 / 7.388 → 1.566 / 4.274
config get / reused 2.109 / 1.105 → 2.169 / 1.714 1.397 / 3.638 → 1.381 / 2.797
config validate / fresh 1.166 / 0.617 → 1.669 / 1.107 1.113 / 5.420 → 1.371 / 9.931
config validate / reused 5.390 / 3.605 → 5.800 / 4.984 4.598 / 23.027 → 3.896 / 20.314

Focused test cost

Commands use pnpm test <file> --maxWorkers=1 on the same shared, loaded macOS host. Whole-command wall time includes worker preparation.

File Wall seconds Tests
src/config/io.deferred-plugin-migrations.test.ts 391.102 8
src/config/io.load-async.test.ts 272.478 15
src/cli/update-cli/status.recovery.test.ts 213.392 15
src/infra/update-triage-resolution.test.ts 308.910* 19
src/cli/program/config-guard.test.ts 167.876 20
src/cli/gateway-cli/run.option-collisions.test.ts 417.870* 59
src/cli/update-cli/update-command-admit.test.ts 294.383 75
src/cli/update-cli/update-command-config-fence.test.ts 323.546 15

*Supervisor wall includes an intentional pause after completion; independent runner durations were 268.49s for triage and 227.49s for Gateway. The new admission case took 393ms; the new update preparation/channel-write case took 17.102s. The primary config file's final replay also passed (421.13s runner duration). Exact-head CI wall time and the available Doctor test-body timing are recorded in this report. These state/publication tests use real storage and config boundaries; most local wall cost is existing module/worker preparation.

Source cleanup passed all 5 tests (358.757s whole command). Doctor persistence additionally passed all 5 tests (465.609s whole command); the earlier status/read-only sibling shard passed 32 tests (475.94s runner) and fresh-Doctor sibling passed 76 tests (105.24s runner).

Follow-up cutover validation

The first CI run exposed management callers and old fixtures that still relied on the implicit config reader. Doctor now carries explicit pending facts through staged/include writes and final validation; plugin update/replacement install carries refreshed migration facts through the normal config writer, including its canonical reread, runtime notification, and rollback. Config-selection and outer write-lock guards remain active through runtime refresh and rollback. The initial raw-factory writer attempt failed five rollback cases; it was replaced with the native writer, and the unchanged 37-case migration matrix now passes, including all five failures.

Follow-up focused test wall times
File Wall seconds Tests
src/flows/doctor-health-contribution-runners.config.deferred.test.ts 500.129 4
src/flows/doctor-health-contribution-runners.config.auth-cleanup.test.ts 358.503 9
src/flows/doctor-health-contributions.test.ts 294.036 89
src/cli/update-cli/update-command-include-channel.test.ts 143.109 8
src/cli/config-cli.integration.test.ts 227.393 27
src/config/io.snapshot.recovery.test.ts 334.866 23
src/commands/doctor-session-sqlite.retained-source-verification.test.ts 216.623 8
src/config/io.plugin-metadata.snapshot-reuse.test.ts 543.717 1
src/config/mutate.test.ts 231.215; final extraction replay 295.688 43 + 43 replayed
src/commands/doctor-config-preflight.pending-read.test.ts 273.128 2
src/commands/doctor-config-preflight.unavailable-owner.test.ts 314.289 8
src/commands/config-preflight-snapshot.test.ts 211.885 + 102.981 18 unchanged cases + corrected identity case separately
src/cli/update-cli.admission-ledger.test.ts 478.903 10
src/cli/update-cli.plugin-convergence.test.ts 537.263 15
src/cli/update-cli.deferred-completion.test.ts 165.029 7
src/cli/plugins-update-command.migrations.integration.test.ts 424.380 37
Plugin authority, generation, and install-persistence group (3 files) 243.000 21
Final native Doctor writer + update include-channel group (2 files) 183.700 12
src/plugins/install-runtime-batch.test.ts 243.510 16
Doctor final-validation selected replay 164.540 1 passed, 88 skipped

Investigated local failure

The unchanged Doctor plugin-deferral suite hit its existing 120-second timeout in the nested-Doctor newer-obligation test during a sibling batch; following cases then timed out or saw unexpected pending rows. The bounded first-four-case replay in original order passed, including the race in 62.894s, with unchanged timeout/assertions. Diagnostic-only edits were removed. Source inspection found no new wait/lock cycle; substantial worker preparation and host pressure were observed. The first four remaining cases also passed: ambient allowlists (56.066s/30.177s), detector-only debt (70.038s), and a retained disabled-channel obligation (114.599s). The next unchanged inspection-only test, which runs four Doctors and closes/reopens the DB, timed out at 120.121s; the run was stopped before follow-on fixture contamination. Doctor still supplies explicit facts on this path and its generation fence is unchanged. Neither timeout is claimed fixed or proven inherited; host pressure is a plausible cause, not established attribution. The later four cases were not reached in that run.

The final-head three-case Gateway replay (pnpm test src/gateway/server.config-patch.test.ts --maxWorkers=1 --testNamePattern 'uses fresh revisions|agents.delete preserves newer writes') finished with 2 failures, 1 pass, and 64 skipped in 1329.442s whole-command wall (540.990s Vitest; runtime prerequisite build 7m24.8s). Fresh-revision setup exceeded the existing 180s Gateway-start hook limit, the retained-authority case timed out during preparatory agents.create, and the revoked-authority case passed in 40.539s. No prune or metadata-shutdown signature appeared. This neither reproduces CI's later config.patch stall nor proves it inherited; no timeout/assertion changes were made.

Remaining synchronous worker paths

Follow-ups outside deferred-obligation bookkeeping: sqlite-snapshot-source.ts:223 prepares general read-only snapshots for installed-plugin metadata/index and lifecycle/session/auth reads; :280 reads content-version for maintenance admission; sqlite-file-generation-worker.ts:7 handles conditional physical-generation/quarantine recovery; cron/store/read-only.worker.ts:105 prepares cron snapshots. Conditional startup reads of completed session-import receipts through deferred-plugin-session-sources.ts remain: assertSessionStoreMigrationComplete consults them only when a legacy session index still exists, to distinguish already imported history from history requiring Doctor and avoid serving an empty store or replaying deleted sessions. This is canonical-history readiness evidence, separate from pending plugin obligations; converting that retained readiness path to asynchronous reads is a follow-up.

Release-note context: normal CLI and Gateway config reads no longer open the state database to inspect deferred plugin migrations; Doctor/update owns repairs, and update status keeps pending work visible after manual upgrades.

Follow-up Linux AMD64 replay

The unchanged PR head completed three runs of each complete failing group on blacksmith-testbox, using the decoded original CI plans with unchanged tests, timeouts, and assertions. Node 24.19.0 and the pinned Bun 1.4.3-canary.1+65d94e715 were verified before execution. Testbox run 38324514405, lease tbx_01m4s8jzqqp5s7aehnbbbevgc4. The test command exited 0; its lease workflow was cancelled during intentional cleanup after testing completed.

Group Cases per run Whole-command seconds, runs 1 / 2 / 3 Result
agentic-gateway-methods-hosted-5 168 72.709 / 70.507 / 73.005 3/3 passed
agentic-gateway-methods-hosted-8 108 77.546 / 83.429 / 86.448 3/3 passed
agentic-control-plane-runtime-config 67 172.904 / 127.202 / 171.451 3/3 passed

Command owner: node --import tsx scripts/ci-run-node-test-shard.mts, with OPENCLAW_CI_TEST_RUNTIME_POLICY=bun-compatible and the original group JSON. The actual Testbox reported four logical CPUs and 16 GiB, so the native memory rule selected two Vitest workers for the Bun groups; group plans ran serially. Original CI reported eight logical CPUs / 32 GiB and the Bun groups used four workers. These are Linux AMD64 non-reproductions, not an exact-capacity reproduction or proof that the CI defects were fixed.

The initial generated driver had a syntax error and exited before tests; it was corrected and syntax-checked before these nine completed groups. The source SHA and tree remained fixed.

The new three-run merge-base comparison could not be completed: Testbox tbx_01m4s8xgcjd154jxpz9rg0kzg3 stayed queued for roughly 15 minutes and was stopped; the explicitly authorized AWS and Hetzner fallbacks both refused allocation because their configured owner budgets were exhausted. Neither fallback created a lease. Prior ARM64 comparisons remain separate evidence. The inherited verdicts above rest on matching historical-main failures, unchanged source, and the owning Board repair; passing replays do not establish attribution.

Both task-owned Testboxes are stopped. The stopped baseline Testbox has no GitHub run association, so the cleanup owner retained its local claim/key instead of claiming GitHub settlement. No CI rerun, source fix, commit, push, or merge was performed. The ClawRouter dependency decision and published-driver package proof remain pending.

Earlier CI investigation (before signature attribution)

Head ae3a3f4cf1981 completed CI run 38316293440 in 17m42s: 80 successful jobs, 24 skipped, 7 failed (including the aggregate). All applicable security checks passed. Three code/tooling failures are repaired in 2a4f937500ab3: the type import cycle, missing wrapper inventory entry, and copied-helper lookup. Exact-head run 38319548429 completed in 16m12s: 88 successful jobs, 25 skipped, 4 failed (three substantive shards plus the gate). All three repaired checks pass: architecture, wrapper eager-import closure, and provisioning. All applicable security checks pass. The two Bun Board shards and the Gateway config-patch shard remain red and are officially classified UNKNOWN.

The remaining Gateway config-patch failure is not proven inherited: the earlier run had three request/teardown failures following a prune host callback timeout; two scheduled-main runs passed the corresponding cases. On the new head the fresh-revision case passes, while the large-shrink case stalls later at config.patch and its cleanup cascades, again with a prune callback timeout. All 19 Doctor and 110 storage tests in the same CI job pass. Bun board/progress-card failures likewise remain unattributed: related Node baseline failures exist, but the pinned-Bun selected-case baseline (4 passed, 630.760s) and candidate (3 passed, 323.010s) both pass locally on macOS. Scheduled-main CI deliberately runs Node while the changed PR groups run Bun, so those baseline logs cannot establish Bun inheritance. A paired Linux run now passes both complete failing file groups on both revisions, using the same pinned Bun and the native two-worker memory fallback. The container is ARM64; CI is AMD64 with four workers. No catalog/retirement signature reproduced, so the CI failures remain unexplained and are not classified as inherited. No timeout increases or speculative runtime workarounds were added.

The wrapper eager-import suite passed all 17 cases (268.120s runner time). The combined pnpm test test/scripts/eager-import-closure.test.ts test/scripts/pr-worktree-provision.test.ts --maxWorkers=1 run was interrupted after 1363.488s to prioritize Gateway failure attribution. Provisioning had one existing 120s timeout (214.541s observed body), two passing cases (70.656s and 95.600s), and one platform skip; later cases were not completed. This is failed/partial evidence, not a green run or proof the timeout is fixed.

Linux Bun attribution comparison

Independent Linux ARM64 container, Node 24.21.0 orchestration, pinned Bun 1.4.3-canary.1+65d94e715, unchanged native CI plans and timeouts, two-worker fallback for the available 16 GiB VM, one group at a time. Original base 07fb44a5 and candidate 2a4f9375 each passed all 276 cases in the two complete groups. These are validation timings, not performance benchmarks.

Revision Group Tests Whole-command wall seconds Vitest seconds
Original base methods5, 8 files 168 passed 226.166 213.16
Original base methods8, 10 files 108 passed 189.437 175.05
Candidate methods5, 8 files 168 passed 192.163 182.10
Candidate methods8, 10 files 108 passed 165.276 154.60

No catalog-not-ready or recursive-retirement signature appeared on either revision. The AMD64/four-worker CI difference remains unproven; passing replays are not claimed as a fix or an inherited-failure exception.

Remote proof availability

Two pre-approved blacksmith-testbox requests used crabbox warmup --keep --timing-json. Both queued and were stopped immediately under the repository's no-queue policy; no remote tests ran.

  • tbx_01m4s4mzjr4e1fyyay1jwfzdws: run 38318423627, completed. Its previously retained claim/key were reconciled through the supported stop owner.
  • tbx_01m4s85s34hq5dxn60jcbgg2th: run 38323902458, completed/cancelled. This fresh request targeted the now-isolated AMD64/four-worker gap. The initial stop's GitHub settlement timed out; after fresh native and exact-run completion evidence, supported reconciliation removed its claim/key.

No lease remains active. Linux attribution used isolated local Docker containers; all owned containers and their volume were removed after evidence export.

Earlier Linux ARM64 Node config-patch comparison

The complete 67-case config-patch file passed on both revisions using Node 24.21.0 (CI toolchain paths identify 24.19.0; this was not an exact-version comparison), the same two-worker group, canonical VITEST=1 OPENCLAW_BUILD_PRIVATE_QA=0 pnpm build qaRuntime, and unchanged timeouts. Architecture remains ARM64 locally versus AMD64 in CI. Neither run reproduced the prune callback timeout, request timeout, or metadata-shutdown error; the CI failure remains unclassified.

Revision Tests Build wall seconds Full test wall seconds Vitest seconds
Original base 07fb44a5 67 passed 99.502 345.318 331.73
Candidate 2a4f9375 67 passed 87.463 232.392 218.66

The first fresh container lacked its Corepack pnpm shim and exited 127 before building or testing. That tooling attempt is retained separately; enabling the existing Corepack shim resolved it without source/dependency changes. All final runs and source-tree checks passed; passing replays do not waive the failed CI gate.

Keep ordinary config and policy reads on canonical state. Doctor and update supply pending migration facts explicitly, retaining input preservation and publication fencing. Status and triage keep pending repairs visible through asynchronous inspection.
@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.

@steipete
steipete marked this pull request as ready for review October 12, 2026 20:47
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes size: L labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR moves deferred-plugin migration inspection into Doctor and update flows and aligns ClawRouter’s Solid dependencies.

Example: Run openclaw config get gateway.port with gateway.port set to 18789.

  • Before: The config reader also queries pending plugin migrations through SQLite.
  • After: It returns 18789 from canonical config without that migration query.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The changed behavior has shipped-entry-point and upgrade evidence, with no open finding; red CI is separately attributed rather than claimed green.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Supplied built-CLI profiles exercise ordinary config commands, and installed-package Docker proof exercises published updater admission, unavailable-plugin preservation, Doctor recovery, Gateway health, and pending warnings; the changed production owners are unchanged between the proved package head and reviewed head, while unrelated standalone Doctor failures remain explicitly recorded.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Common CLI and Gateway config reads pay for migration-ledger inspection even when they only need canonical settings.
Reason: The maintainer owns the direction, the ordinary read path becomes smaller, and the repair owners retain preservation and publication checks.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-approved performance change remains necessary, and the previous CI attribution blocker is resolved without an actionable patch finding.

Priority: P2
Reviewed head: 84096f7e55ef00df06e56cec2041ab71e3ba2504

Before merge

None.

Findings

None.

Agent review details

How this fits together

Config IO supplies validated settings to CLI and Gateway consumers; Doctor and update supply explicit migration facts when preserving and repairing legacy inputs.

flowchart TD
  A[CLI and Gateway] --> B[Config IO]
  C[Canonical config] --> B
  D[Doctor and update] --> E[Migration ledger]
  E --> D
  D --> B
  B --> F[Validated settings and guarded writes]
Loading

Technical review

Best possible solution:

Keep canonical runtime reads lean while Doctor and update own migration inspection, retained-input preservation, and repair publication.

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

Current-main config loading explicitly calls the migration ledger reader, and the supplied built-CLI profiles show those worker calls before the change and their absence afterward; no target code was executed during this review.

Is this the best way to solve the issue?

The change follows the existing canonical-config and Doctor ownership contract, preserves explicit repair facts through native writers, and removes the superseded startup handoff.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 216798c adds src/infra/deferred-plugin-migrations.ts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 216798c496a1; files: src/infra/deferred-plugin-migrations.ts)
  • Vincent Koc: Raw commit 1232d3f adds src/cli/update-cli/update-command-config.ts:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1232d3f13ec0; files: src/cli/update-cli/update-command-config.ts)

PR surface

Source +41, Tests +75, Docs +18, Config 0, Other -88. Total +46 across 60 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 31 303 262 +41
Tests 21 428 353 +75
Docs 4 32 14 +18
Config 1 3 3 0
Generated 0 0 0 0
Other 3 7 95 -88
Total 60 773 727 +46

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This removes repeated migration bookkeeping from common config paths without an established urgent user outage.
  • merge-risk: 🚨 compatibility: Ordinary commands lose ledger-based validation exemptions for retained retired fields; the maintainer explicitly accepts Doctor repair after manual upgrades, with supplied installed-upgrade preservation evidence.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (7 earlier review cycles)
  • reviewed 2026-10-12T21:00:53.278Z sha 6087010 :: blocked before merge. :: [P1] Carry explicit migration facts through Doctor health writes | [P1] Preserve inputs when plugin repair leaves obligations pending | [P1] Admit deferred config at the plugin-update repair boundary | [P2] Retain the config-selection guard during channel writes | [P2] Update sibling tests for the intended canonical-config contract
  • reviewed 2026-10-12T22:31:18.704Z sha ae3a3f4 :: blocked before merge. :: [P2] Include the extracted snapshot helper in the PR wrapper inventory
  • reviewed 2026-10-12T23:30:11.585Z sha 2a4f937 :: blocked before merge. :: none
  • reviewed 2026-10-12T23:56:35.890Z sha 2a4f937 :: blocked before merge. :: none
  • reviewed 2026-10-13T00:24:29.653Z sha 2a4f937 :: blocked before merge. :: none
  • reviewed 2026-10-13T01:08:19.564Z sha ba8fb9b :: blocked before merge. :: none
  • reviewed 2026-10-13T02:13:05.909Z sha 84096f7 :: needs changes before merge. :: none

Reviewed October 12, 2026, 10:34 PM ET / October 13, 2026, 02:34 UTC (Revision 8).

Carry explicit deferred plugin facts through Doctor and update reads, native writer finalization, plugin installation, and rollback. Keep config selection guards active and align sibling tests with canonical runtime reads.
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XL and removed size: L labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 12, 2026
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 12, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 12, 2026
Regenerate the lockfile and ClawRouter browser asset manifest with the same Solid versions as Canvas, Workboard, and X.
@openclaw-barnacle openclaw-barnacle Bot added the extensions: clawrouter Extension: clawrouter label Oct 13, 2026
@steipete steipete self-assigned this Oct 13, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 13, 2026
@steipete
steipete merged commit 20bd4bd into main Oct 13, 2026
205 of 214 checks passed
@steipete
steipete deleted the perf/deferred-migrations-doctor branch October 13, 2026 02:35
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

steipete added a commit that referenced this pull request Oct 13, 2026
## What Problem This Solves

The Doctor maintenance requester-authority test still expected configured-owner authority to be rejected while the shared-state database was reserved for offline maintenance. The configured-owner case fails at that expectation after `20bd4bdcfac46628ee72abc1fcefa3f9406aaccd` (#170230) deliberately removed deferred-plugin migration reads from normal config loading. Configured owners now validate against current disk config without opening SQLite; profile owners still read database-backed authority and must stay within the maintenance owner’s retained closure.

Limit the existing offline-maintenance rejection assertion to the profile case. Both complete cases remain, including configured-owner config publication and backup checks, profile identity replacement checks, cleanup, and revoked-write rejection with unchanged config bytes. This changes one test assertion’s scope and no production authorization or update behavior.

## Evidence

The cached full-file baseline on main `76edfee2d2202e1da8ea4274a05cb98ae1e723bf` failed only the configured-owner assertion at line 138: one failed, one passed, 359.03s Vitest duration, teardown completed. The same assertion failed in run 38339691726, job 115108412972. The culprit’s parent-relative diff removes `readDeferredPluginMigrations({ env: params.env })` from `readCurrentConfigForPolicyCheck`; the requester owner already selects config-only authorization for `configured-owner`.

Validation completed: targeted donor formatting and lint, `git diff --check`, and the normal commit hook. Canonical Codex review completed in one round with `scoped-clean`, no findings, exit 0, and a validated report. Exact candidate `cb2a4051a2b49d43c3e7b94670a8131dc1a2020e` passed the complete file with `pnpm test src/commands/doctor-maintenance.requester-authority.test.ts --maxWorkers=1`: both cases passed, zero skips, 56.37s Vitest duration in [focused CI 38343570880](https://github.com/openclaw/openclaw/actions/runs/38343570880). [Ordinary CI 38343428360](https://github.com/openclaw/openclaw/actions/runs/38343428360) finished successfully with 18 passed and 29 skipped jobs. Its synthetic merge `3e5e41e9` on base `799b7a347c502` passed selected type-aware lint, test types, source contracts, and boundaries. Madge reports zero cycles; T1 live remains 455, compatibility 9, and dialect ratchets zero. Production types, Knip, build, and published-driver update were not selected for this test-only plan; no fresh passes are claimed for those checks. No local runtime tests, builds, or installs were run. No filters, skips, test timeout changes, or Knip job were added.

Scope: one test file, +4/-2 lines; zero production LOC, new tests, or new processes. No production checks were removed. T1 calls and SQL statements/requests are unchanged by this test-only correction; no new SQL measurement is claimed. Published-driver cell not rerun for this test-only assertion correction; production update/Doctor code is unchanged by this patch.

Direct-main writes are refused by the repository ruleset; this repair uses the authorized PR squash fallback.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…nclaw#170230)

Move deferred plugin migration reads out of ordinary CLI and Gateway config loading. Doctor owns legacy plugin repairs, while update admission and config writes carry explicit migration facts, preserve unavailable-plugin inputs, and retain generation checks at repair publication.

Normal config reads and writes now consume canonical config without a migration-ledger database query. `openclaw update status` exposes pending work; after a source or package-manager upgrade, run `openclaw doctor --fix` before restarting. Candidate validation keeps the previous Gateway running when canonical config remains invalid. Preserve the published 2026.10.1 Windows updater's state-worker contract.

Align ClawRouter's Solid dependencies to 2.0.0-rc.14 with Canvas, Workboard, and X, as explicitly approved, and regenerate its browser asset manifest and lockfile.

The reviewed product changes, focused tests, and package/update evidence are documented in the PR. Merge current main to incorporate its correction of the inherited idle-input durability test expectation; do not treat the historical failed run as current-head passing evidence.

Related: openclaw#147711, openclaw#158783, openclaw#160682.

Current-head CI run 38335235541: 91 passed, 23 skipped, 6 failed including aggregate. Native inherited-failure admin evidence binds five unchanged-owner shards, matching scheduled-main profile-authority failures, isolated archive-fixture noninteraction, exact tested merge, zero cancellations, and independent security clearance. Failed CI remains failed; details and limits are in the PR body.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…#170601)

## What Problem This Solves

The Doctor maintenance requester-authority test still expected configured-owner authority to be rejected while the shared-state database was reserved for offline maintenance. The configured-owner case fails at that expectation after `c179f7016652c2475cf270bc2e75c79069bd01a5` (openclaw#170230) deliberately removed deferred-plugin migration reads from normal config loading. Configured owners now validate against current disk config without opening SQLite; profile owners still read database-backed authority and must stay within the maintenance owner’s retained closure.

Limit the existing offline-maintenance rejection assertion to the profile case. Both complete cases remain, including configured-owner config publication and backup checks, profile identity replacement checks, cleanup, and revoked-write rejection with unchanged config bytes. This changes one test assertion’s scope and no production authorization or update behavior.

## Evidence

The cached full-file baseline on main `829c79f933355d4fd66b68cecec6388f3cb7bcc6` failed only the configured-owner assertion at line 138: one failed, one passed, 359.03s Vitest duration, teardown completed. The same assertion failed in run 38339691726, job 115108412972. The culprit’s parent-relative diff removes `readDeferredPluginMigrations({ env: params.env })` from `readCurrentConfigForPolicyCheck`; the requester owner already selects config-only authorization for `configured-owner`.

Validation completed: targeted donor formatting and lint, `git diff --check`, and the normal commit hook. Canonical Codex review completed in one round with `scoped-clean`, no findings, exit 0, and a validated report. Exact candidate `cb2a4051a2b49d43c3e7b94670a8131dc1a2020e` passed the complete file with `pnpm test src/commands/doctor-maintenance.requester-authority.test.ts --maxWorkers=1`: both cases passed, zero skips, 56.37s Vitest duration in [focused CI 38343570880](https://github.com/openclaw/openclaw/actions/runs/38343570880). [Ordinary CI 38343428360](https://github.com/openclaw/openclaw/actions/runs/38343428360) finished successfully with 18 passed and 29 skipped jobs. Its synthetic merge `3e5e41e9` on base `bb3c3eab00fd7` passed selected type-aware lint, test types, source contracts, and boundaries. Madge reports zero cycles; T1 live remains 455, compatibility 9, and dialect ratchets zero. Production types, Knip, build, and published-driver update were not selected for this test-only plan; no fresh passes are claimed for those checks. No local runtime tests, builds, or installs were run. No filters, skips, test timeout changes, or Knip job were added.

Scope: one test file, +4/-2 lines; zero production LOC, new tests, or new processes. No production checks were removed. T1 calls and SQL statements/requests are unchanged by this test-only correction; no new SQL measurement is claimed. Published-driver cell not rerun for this test-only assertion correction; production update/Doctor code is unchanged by this patch.

Direct-main writes are refused by the repository ruleset; this repair uses the authorized PR squash fallback.
steipete added a commit that referenced this pull request Oct 13, 2026
)

A config write inside a deferred plugin migration completion scope (plugin
update or install finishing a pending migration) read the pending-migration
ledger twice before publication: once in replaceConfigFile and again in the
file write. Outside the Gateway each read was a synchronous SQLite snapshot
child on the main thread.

Before publication those reads could only return the scope's admitted
generation minus the resolved plugins, or throw. The publication write
transaction (withDeferredPluginMigrationsCurrent) already re-reads the rows
and asserts that exact generation for root and include-owned writes, so the
pre-publication path now returns the admitted facts directly. After
publication in the same scope the fresh read stays, moved to the async
state-worker read. Scope filtering is unchanged, and no write option or
plugin SDK surface is added.

Related: #160682, #170230.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…claw#170695)

A config write inside a deferred plugin migration completion scope (plugin
update or install finishing a pending migration) read the pending-migration
ledger twice before publication: once in replaceConfigFile and again in the
file write. Outside the Gateway each read was a synchronous SQLite snapshot
child on the main thread.

Before publication those reads could only return the scope's admitted
generation minus the resolved plugins, or throw. The publication write
transaction (withDeferredPluginMigrationsCurrent) already re-reads the rows
and asserts that exact generation for root and include-owned writes, so the
pre-publication path now returns the admitted facts directly. After
publication in the same scope the fresh read stays, moved to the async
state-worker read. Scope filtering is unchanged, and no write option or
plugin SDK surface is added.

Related: openclaw#160682, openclaw#170230.
Farzy added a commit to Farzy/self-config that referenced this pull request Nov 7, 2026
## Summary

Follow-up to #214. A few hours after reopening openclaw/openclaw#178291,
the maintainer [reproduced claw's exact setup
natively](openclaw/openclaw#178291 (comment))
and [closed the
issue](openclaw/openclaw#178291 (comment)).
The test setup was a systemd user gateway, an owner listed only in
`commands.ownerAllowFrom`, the npm-installed Signal plugin, and a real
chat `/update`.

- 2026.10.8 → 2026.10.9 failed twice, with claw's exact
`authority-check-failed … undergoing offline maintenance` error and
Signal left pending.
- Updates to 2026.10.10, 2026.11.1 and current `main` all succeeded,
with Signal converging.

Claw's route was a **third** one. The policy check's config read
(`readCurrentConfigForPolicyCheck` → `readDeferredPluginMigrations`) hit
the state DB guard while Doctor held maintenance ownership.
**openclaw/openclaw#170230** (`20bd4bdcfac`) removed that read. I
checked it with `gh api …/compare`: it is in the `v2026.10.10` and
`v2026.11.1` tags, and not in `v2026.10.9`. Our earlier checks for
`lendPolicyCustody` and `onlyPendingStateMigrations` only looked for the
two other fixes, which is why they never found it.

## Changes (`docs/openclaw.md` §4.4)

- **Upstream status:** marked resolved for claw, with a three-route
table:
  - #170230: claw's route, released in 2026.10.10.
- #188472 (profile-linked owners) and #190433 (`plugin load failed`):
still unreleased, and neither applies to claw.
- **Upgrade guidance:** a chat `/update` to 2026.10.10 or later is fine
on claw, and claw already runs 2026.11.1. The terminal procedure stays
as the fallback, unchanged. The pin bump applies after a chat update
too.
- **New caveat from upstream's runs:** polling `openclaw update status
--json` every 5 s during an update caused a different refusal, so don't
poll during an update.
- **New caveat, applied to the role:** the role's wait task polls
`update status` every 20 s when a pin bump runs the updater. Whether
that interval can trigger the refusal isn't known, so the doc says to
check `migrationWarnings` and run `doctor --fix` after a role-driven
upgrade.
- **Older entries:** the 2026-10-19 and 2026-10-28 entries now give the
#170230 cause and the 2026.10.10 cut-off, instead of the old "both
fixes" wording. The 2026-10-30 entry names claw's route.
- **Commands:** the doc uses the `openclaw-admin` wrapper for `update
status`, like the rest of §4.4.
- **Confirmation plan:** do a chat `/update` to the next stable after
2026.11.1. Report on #178291 only if it fails, with `openclaw update
status` and the full error, as the maintainer asked.

Docs only, nothing to apply.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: clawrouter Extension: clawrouter gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XL 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