Skip to content

fix: avoid slow requester checks during Doctor repairs - #162200

Merged
steipete merged 1 commit into
mainfrom
upd/upd-requester-authority-snapshot-cost
Oct 1, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-requester-authority-snapshot-cost

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Refs #161949
Refs #161867

What Problem This Solves

Fixes slow Doctor repairs and update activation when repeated requester-permission checks copy the entire shared SQLite database.

User Impact

Chat-requested updates keep checking the original owner's live permissions between repair steps without launching a snapshot child for every callback. Revoked or replaced owners still prevent further changes. No configuration, schema, dependency, or operator action changes.

Why This Change Was Made

The requester-authority read path now selects current reads for its exact database. After Doctor's pre-mutation backup boundary, maintenance owns and reuses a live reader when there is no existing managed connection. Every use rechecks admission and physical file identity and reads current authority rows; permission decisions are never cached. Readers join the existing database and maintenance cleanup owners. Other installations retain artifact-preserving, committed-state reads.

The existing maintenance context moved into its own module to keep the lifecycle owner within its line budget. The accepted +169 net production lines replace per-callback full-database copies with one maintenance-owned live reader: an ownership boundary with a measured 31 s → 4 s operator-visible improvement. Admission, file-identity, and revocation checks remain proven. Tests/support add 89 lines and docs add 2. The separate update-progress observer work in #161982 is unchanged.

Evidence

  • Configured-owner negative control on the original implementation: 31.448 s, 195 distinct synchronous snapshot child launches (6 admission, 189 during maintenance). The instrumented regression fails on that implementation.
  • Candidate configured-owner case: 3.650 / 3.894 / 4.593 s across three runs; at most 8 admission launches and 0 during maintenance, including release. Profile cases: 3.492 / 3.461 / 4.279 s. Existing revocation assertions remain intact; added checks cover physical database replacement, backup equality, absence of WAL/SHM before backup, and foreign-installation isolation.
  • Nine affected suites passed 3 times, 142 tests per run, on Linux Testbox. Fresh direct Codex P1 review is clean for final source tree 9f73929d7c8c5d2dbaa41a4cd8e6a1d0a21f144c.
  • All 198 ordinary importer files completed: 2,999 tests passed with existing platform/fixture skips. Commands suites ran in their original project order.
  • node scripts/check-changed.mjs passed on the final tree, including all 27 test-typecheck graphs, lint (0 warnings/errors), storage/ownership guards, dead-export scans, and import-cycle checks (0 runtime cycles).
  • All four E2E importer files passed: 12 tests passed, 1 Windows-only skip. Vitest wall 339.32 s; native shard 950.26 s including runtime preparation. Named follow-up — paired-node-worker E2E fixture performance: paired-node-worker-lifecycle-wire.e2e.test.ts — "keeps local control usable across bundle loss, disconnect, capacity, and role removal" took 182.687 s test / 182.691 s file; paired-node-worker-upgrade-wire.e2e.test.ts — "recovers a completed workspace after a same-version build update and continues the same session" took 107.130 s test / 107.134 s file. These are pre-existing suites on main, and both files remain unchanged. Their test-time STOP is explicitly waived for this lane; the measured costs are retained as a separate follow-up. These are test-body costs, not outer compiler preparation. The shared wire fixture performs real Gateway/worker startup, bundle installation and prewarming, turns and placement changes, recovery, and cleanup. The lifecycle case composes 14 turns and seven dispatches with deliberate bundle deletion/reinstallation; the upgrade case copies dist and restarts a changed runtime. Source review did not establish a safe small fix or the dominant phase. Dedicated phase timing and fixture ownership work are required; no retries, skips, timeout changes, or weakened assertions were used.
  • Published-driver compatibility: released [email protected] successfully updated the isolated channel-owner-policy installation to the candidate 2026.9.7 package. Installed payload equality, owner-policy assertions, two Gateway starts, and health/readiness probes passed; scenario wall time 163 s, update receipt 103.948 s, final candidate Doctor 17.717 s, and package preparation 558 s. Blacksmith Testbox tbx_01m3t4g0yess6brqj5dfw1y7ha (run) packaged carrier e0bb89d14c16173eb7f2e7b651b447383fd28981, whose tree is the reviewed cb070331901087989325d2d287b303696542b6d1. This proves published-driver compatibility; the instrumented requester test proves callback cost. Readiness returned HTTP 200 with ready: true and no failing checks while reporting startup event-loop degradation. The build emitted a non-blocking UI gzip-size advisory (217.1 KiB versus 215 KiB).
  • Final-tree cost measurements (/usr/bin/time -p pnpm test <file> --maxWorkers=1): requester authority 27.24 s wall, read-only 39.99 s, interruption 22.62 s, settlement 19.40 s, stopped activation 17.28 s. All passed; most wall time is transform preparation. The final requester cases took 4.092 s / 4.069 s. Hosted CI timings are not yet available.

The new context owner required updating the settlement/interruption test fixtures at their actual mock boundary. Two interruption cases initially waited 120 seconds after their fixture child had already exited. The approval wait now races child closure and reports the initiating error: a negative control fails in 1.421 s; the corrected Linux cases take approximately 0.78–1.01 s, with assertions and timeouts unchanged.

The first complete static run passed all 27 test-typecheck graphs, then found a shadowed callback parameter. The sole follow-up source change renames that local parameter; behavior and package proof remain applicable. The final static gate uses the corrected tree.

An earlier Testbox lease was cancelled externally during runtime compilation; its unfinished checks were not counted as passing. Recovery validation uses Blacksmith Testbox tbx_01m3t39zdy8bnb94k3svj76c0d (run). No ordinary importer case exceeded the campaign's 30-second test-time threshold and no ordinary importer file exceeded its 120-second test-time threshold; the two pre-existing E2E exceptions above are the named follow-up under the explicit lane waiver. Runtime compilation and serial typecheck preparation are recorded separately from test time.

The final remote command completed successfully in 41m19.455s. Auto-merge is off; this PR is for review and is not being landed by this authoring lane.

Reuse maintenance-owned current authority reads after the pre-mutation backup boundary. Revalidate live permission rows, admission, and database identity on each callback, and drain readers with the existing maintenance owner.
@clawsweeper

clawsweeper Bot commented Sep 30, 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 commands Command implementations size: L labels Sep 30, 2026
@steipete
steipete marked this pull request as ready for review September 30, 2026 23:16
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 30, 2026
@clawsweeper

clawsweeper Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 30, 2026, 7:23 PM ET / 23:23 UTC.

ClawSweeper review

What this changes

Doctor repairs reuse a maintenance-owned SQLite reader for current requester-permission checks after the backup boundary, reducing repeated database snapshots.

Merge readiness

✅ Ready for maintainer review

The current main branch still uses the costly requester read path, and this PR supplies a bounded fix with measured Doctor and upgrade behavior. It remains useful as an active landing candidate.

Priority: P1
Reviewed head: e24655b766c3d95432141dfbb71a568ba8d8e2d2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has strong boundary and upgrade evidence, with the added reader lifecycle warranting normal maintainer review.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed Doctor requester-read owner is tied to isolated configured-owner repair runs showing 31.448 seconds and 195 snapshot children before the change versus 3.650–4.593 seconds and none during maintenance afterward. A published 2026.9.4 updater also reached the candidate with owner-policy and Gateway readiness checks; real SQLite and config-owner tests show refusal before a post-revocation write. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed Doctor requester-read owner is tied to isolated configured-owner repair runs showing 31.448 seconds and 195 snapshot children before the change versus 3.650–4.593 seconds and none during maintenance afterward. A published 2026.9.4 updater also reached the candidate with owner-policy and Gateway readiness checks; real SQLite and config-owner tests show refusal before a post-revocation write. No stored-data contract changes.
Evidence reviewed 7 items Introduced reader path: The PR adds a maintenance-owned reader that checks read admission and physical database identity on each use, then queries current rows through its retained connection.
Authority remains current: The requester guard still reads current config and evaluates the original configured-owner or profile authority; the PR selects current reads for the requester's installation.
Backup and maintenance boundary: Doctor admits live authority reads after its pre-mutation callback and recreates that admission when a maintenance scope is replaced.
Findings None None.
Security None None.

How this fits together

Doctor repairs run during managed updates under a maintenance owner. They read shared SQLite state and current requester permissions before continuing config or database changes.

flowchart LR
A[Chat update] --> B[Doctor maintenance]
B --> C{Backup boundary passed?}
C -->|Yes| D[Live state reader]
C -->|No| E[Private snapshot]
D --> F{Requester still authorized?}
E --> F
F -->|Yes| G[Repair continues]
F -->|No| H[Further changes refused]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +169, Tests +89, Docs +2. Total +260 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 6 313 144 +169
Tests 4 93 4 +89
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 408 148 +260

Review metrics

Metric Value Why it matters
Production and test growth production +169 net, tests and support +89 net The production growth establishes reader ownership and cleanup for the measured reduction in repeated snapshots.
Configured-owner repair time 31.448 s before; 3.650–4.593 s after The reported isolated runs exercise the slow permission-check path rather than an unrelated startup smoke check.

Technical review

Best possible solution:

Keep one Doctor-owned reader per admitted maintenance scope, with fresh permission decisions, physical-identity checks, and cleanup before database replacement.

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

Yes. Current-main source retains the snapshot-producing requester path, and the PR supplies an instrumented original-implementation control; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. Reusing a reader within Doctor's existing maintenance owner addresses the measured cost while retaining current-row and database-identity checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5ca201627d3d.

Labels

Label changes:

  • add P1: Repeated synchronous database snapshots slow a real chat-requested update and Doctor repair workflow.
  • add merge-risk: 🚨 security-boundary: Permission checks now consume rows through a retained live reader, so revocation and database replacement matter beyond a green CI result.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed Doctor requester-read owner is tied to isolated configured-owner repair runs showing 31.448 seconds and 195 snapshot children before the change versus 3.650–4.593 seconds and none during maintenance afterward. A published 2026.9.4 updater also reached the candidate with owner-policy and Gateway readiness checks; real SQLite and config-owner tests show refusal before a post-revocation write. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed Doctor requester-read owner is tied to isolated configured-owner repair runs showing 31.448 seconds and 195 snapshot children before the change versus 3.650–4.593 seconds and none during maintenance afterward. A published 2026.9.4 updater also reached the candidate with owner-policy and Gateway readiness checks; real SQLite and config-owner tests show refusal before a post-revocation write. No stored-data contract changes.

Label justifications:

  • P1: Repeated synchronous database snapshots slow a real chat-requested update and Doctor repair workflow.
  • merge-risk: 🚨 security-boundary: Permission checks now consume rows through a retained live reader, so revocation and database replacement matter beyond a green CI result.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed Doctor requester-read owner is tied to isolated configured-owner repair runs showing 31.448 seconds and 195 snapshot children before the change versus 3.650–4.593 seconds and none during maintenance afterward. A published 2026.9.4 updater also reached the candidate with owner-policy and Gateway readiness checks; real SQLite and config-owner tests show refusal before a post-revocation write. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Doctor requester-read owner is tied to isolated configured-owner repair runs showing 31.448 seconds and 195 snapshot children before the change versus 3.650–4.593 seconds and none during maintenance afterward. A published 2026.9.4 updater also reached the candidate with owner-policy and Gateway readiness checks; real SQLite and config-owner tests show refusal before a post-revocation write. No stored-data contract changes.

Evidence

What I checked:

  • Introduced reader path: The PR adds a maintenance-owned reader that checks read admission and physical database identity on each use, then queries current rows through its retained connection. (src/state/openclaw-state-db-readonly-reuse.ts:33, e24655b766c3)
  • Authority remains current: The requester guard still reads current config and evaluates the original configured-owner or profile authority; the PR selects current reads for the requester's installation. (src/infra/update-requester-authority.ts:150, e24655b766c3)
  • Backup and maintenance boundary: Doctor admits live authority reads after its pre-mutation callback and recreates that admission when a maintenance scope is replaced. (src/commands/doctor-maintenance-state.ts:112, e24655b766c3)
  • Forbidden final effect: The production-owner test revokes a profile binding or configured owner, attempts another Doctor config write, expects refusal, and verifies the file was not changed; it also checks physical database replacement. (src/commands/doctor-maintenance.requester-authority.test.ts:170, e24655b766c3)
  • Runtime and upgrade proof: The captured PR body reports an original configured-owner run of 31.448 seconds with 195 synchronous snapshot children, candidate runs of 3.650–4.593 seconds with none during maintenance, and a released 2026.9.4 updater reaching a candidate installation with successful owner-policy and Gateway readiness checks. The packaged carrier predates a reported local-parameter rename; final-tree checks are reported separately. (e24655b766c3)
  • Still needed on main: Fetched current main still wraps requester checks in artifact-preserving reads without the PR's maintenance reader selection. (src/infra/update-requester-authority.ts:148, 5ca201627d3d)

Likely related people:

  • Peter Steinberger: Raw commit ed25898 adds src/commands/doctor-maintenance-state.ts:180 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ed25898341cc; files: src/commands/doctor-maintenance-state.ts)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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.

@steipete
steipete merged commit 588b5d7 into main Oct 1, 2026
294 of 512 checks passed
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Landed via the admin exception for an unrelated failure (squash 588b5d7d50b78250148110f070d9deb55f4ace1d, head e24655b766c3).

Inherited failure on the PR head: checks-node-compact-small-6 → test/scripts/pr-worktree-provision.test.ts (four "native PR source provisioning" cases, not every launched provisioner received its private store), a hosted intermittent in the PR private-store handoff gate. This PR touches only Doctor requester-authority reads and state read-only reuse, no scripts/ or test/scripts files; the CI-status triage confirms the test is not red on main (main run 36786150394 fully green on the tooling shards) and no fix is pending. Remaining jobs were fail-fast cancellations of that failure. A root-cause lane for the flake is open; no CI was re-spent on this PR.

@steipete
steipete deleted the upd/upd-requester-authority-snapshot-cost branch October 1, 2026 00:26
steipete added a commit that referenced this pull request Oct 1, 2026
#162200 left openclaw-state-maintenance-context.ts importing OpenClawDatabaseMaintenanceScope from the lifecycle module that imports values from it, so pnpm check:madge-import-cycles fails on main. The leaf now owns the scope type and its migration helper type; the lifecycle module re-exports the scope type, so importers are unchanged.
steipete added a commit that referenced this pull request Oct 1, 2026
Fix check:madge-import-cycles after #162200 introduced the cycle
openclaw-state-db-async-lifecycle.ts ->
openclaw-state-maintenance-context.ts ->
openclaw-state-db-async-lifecycle.ts through a type-only import.

Move OpenClawDatabaseMaintenanceScope and AgentSchemaMigration into the
maintenance context, and preserve the lifecycle module's public scope type
export. Runtime behavior and existing caller imports remain unchanged.

Validation:
- pnpm check:madge-import-cycles (1 cycle before; 0 cycles after)
- pnpm check:import-cycles (0 runtime value cycles)
- node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo (passed)
- node scripts/run-tsgo-core-test-shards.mjs (all 27 shards passed)
- node scripts/run-vitest.mjs src/state/openclaw-state-db-async-lifecycle.test.ts src/state/openclaw-agent-db.storage-migration.test.ts src/state/openclaw-state-db-readonly.worker-lifecycle.test.ts src/state/openclaw-state-lease-async.maintenance.test.ts src/state/openclaw-agent-execution.creation-witness.test.ts src/state/openclaw-state-db-resource-scope.test.ts src/state/agent-deletion-journal.snapshot.test.ts src/state/openclaw-state-db-readonly.snapshot-admission.test.ts (95 tests passed)
- node_modules/.bin/oxfmt --check src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- git diff --check (passed)
- Independent Codex autoreview (no actionable findings through P2)
steipete added a commit that referenced this pull request Oct 1, 2026
A concurrent main fix for the #162200 check:madge-import-cycles failure
moved the same types and used an inline scope re-export. Rebasing the
standalone re-export onto that change retained both exports and caused
TS2300 at lines 20 and 28.

Keep the standalone type re-export and remove the duplicate inline export.
Both affected modules now exactly match the previously validated candidate.

Validation:
- node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo (TS2300 before; passed after)
- pnpm check:madge-import-cycles (0 cycles)
- node_modules/.bin/oxfmt --check src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- git diff --check (passed)
- Byte-for-byte comparison against the candidate that passed all 95 focused tests and 27 test-type shards (identical for both modules)
- Independent Codex autoreview (no actionable findings through P2)
steipete added a commit that referenced this pull request Oct 1, 2026
…tory (#162244)

#162200 added src/state/openclaw-state-maintenance-context.ts without a scripts/pr-lib/wrapper-components.txt entry; the PR wrapper provisioner failed with MODULE_NOT_FOUND, surfaced by test/scripts/pr-worktree-provision.test.ts as a private-store assertion. pr-wrapper-source-closure.test.ts fails on main without this entry and passes with it.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
Doctor requester-authority validation copied the entire SQLite database in a synchronous worker on every authority callback (195 snapshot launches, 31 s for the configured-owner case; candidate Doctor 74 s). Maintenance now owns one reusable live reader; admission, physical file identity, and revocation are re-checked on every reused read, and the reader joins maintenance and database cleanup. Configured-owner case 31.4 s -> 3.6-4.6 s; snapshot launches <= 8 during admission, zero during maintenance.

Refs openclaw#161949
Refs openclaw#161867
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
openclaw#162200 left openclaw-state-maintenance-context.ts importing OpenClawDatabaseMaintenanceScope from the lifecycle module that imports values from it, so pnpm check:madge-import-cycles fails on main. The leaf now owns the scope type and its migration helper type; the lifecycle module re-exports the scope type, so importers are unchanged.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
Fix check:madge-import-cycles after openclaw#162200 introduced the cycle
openclaw-state-db-async-lifecycle.ts ->
openclaw-state-maintenance-context.ts ->
openclaw-state-db-async-lifecycle.ts through a type-only import.

Move OpenClawDatabaseMaintenanceScope and AgentSchemaMigration into the
maintenance context, and preserve the lifecycle module's public scope type
export. Runtime behavior and existing caller imports remain unchanged.

Validation:
- pnpm check:madge-import-cycles (1 cycle before; 0 cycles after)
- pnpm check:import-cycles (0 runtime value cycles)
- node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo (passed)
- node scripts/run-tsgo-core-test-shards.mjs (all 27 shards passed)
- node scripts/run-vitest.mjs src/state/openclaw-state-db-async-lifecycle.test.ts src/state/openclaw-agent-db.storage-migration.test.ts src/state/openclaw-state-db-readonly.worker-lifecycle.test.ts src/state/openclaw-state-lease-async.maintenance.test.ts src/state/openclaw-agent-execution.creation-witness.test.ts src/state/openclaw-state-db-resource-scope.test.ts src/state/agent-deletion-journal.snapshot.test.ts src/state/openclaw-state-db-readonly.snapshot-admission.test.ts (95 tests passed)
- node_modules/.bin/oxfmt --check src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- git diff --check (passed)
- Independent Codex autoreview (no actionable findings through P2)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
A concurrent main fix for the openclaw#162200 check:madge-import-cycles failure
moved the same types and used an inline scope re-export. Rebasing the
standalone re-export onto that change retained both exports and caused
TS2300 at lines 20 and 28.

Keep the standalone type re-export and remove the duplicate inline export.
Both affected modules now exactly match the previously validated candidate.

Validation:
- node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo (TS2300 before; passed after)
- pnpm check:madge-import-cycles (0 cycles)
- node_modules/.bin/oxfmt --check src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/state/openclaw-state-maintenance-context.ts src/state/openclaw-state-db-async-lifecycle.ts (passed)
- git diff --check (passed)
- Byte-for-byte comparison against the candidate that passed all 95 focused tests and 27 test-type shards (identical for both modules)
- Independent Codex autoreview (no actionable findings through P2)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 1, 2026
…tory (openclaw#162244)

openclaw#162200 added src/state/openclaw-state-maintenance-context.ts without a scripts/pr-lib/wrapper-components.txt entry; the PR wrapper provisioner failed with MODULE_NOT_FOUND, surfaced by test/scripts/pr-worktree-provision.test.ts as a private-store assertion. pr-wrapper-source-closure.test.ts fails on main without this entry and passes with it.
steipete added a commit that referenced this pull request Oct 1, 2026
Limit supplemental protected-test expansion to depth two instead of whole owner areas. Preserve the previous PR selection behind OPENCLAW_CI_NODE_SELECTION=full and summarize selected files and rules. Keep six non-import inventory guards on source edits, including the wrapper and swap-fixture regressions from #162200 and #162246. Scheduled and ordinary release inventories stay complete.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 2, 2026
Limit supplemental protected-test expansion to depth two instead of whole owner areas. Preserve the previous PR selection behind OPENCLAW_CI_NODE_SELECTION=full and summarize selected files and rules. Keep six non-import inventory guards on source edits, including the wrapper and swap-fixture regressions from openclaw#162200 and openclaw#162246. Scheduled and ordinary release inventories stay complete.
RomneyDa added a commit that referenced this pull request Oct 14, 2026
…ions and optional cron cleanup (#171818)

* fix(update): success summary repeats settled plugin data/settings upgrades as pending (#170413)

* fix(update): retire settled plugin migration warnings from update reports

Doctor's config preflight reports a plugin data/settings upgrade as pending,
then post-session plugin repairs (acpx, codex) can settle it later in the same
pass. The stale warning still reached the updater, which persisted it as a run
warning and repeated it in the success summary with "Let the current update
finish" guidance after the update had finished.

- Doctor drops warnings the ledger shows settled before publishing its update
  result (new doctor-health-update-result sibling keeps doctor-health under cap).
- Finalization retires persisted warning rows a later pass settled or
  superseded, so the run record and report match the pending ledger.
- Post-core convergence is the last migration pass: guidance now says to run
  the repair command instead of waiting.
- The post-core plugin summary names the reason for each informational skip.

Fixes #170334

* fix(update): publish an empty warning list when every plugin migration settled

* fix(update): leave skipped plugin reasons to the post-core summary owner

* fix(update): report a still-pending plugin migration once after post-plugin convergence

* test(update): type the settled plugin warning expectation

* fix(update): keep warning guidance compatible with recovery bootstrap

* fix(doctor): omit absent diagnostics from update publication
(cherry picked from commit 7039a32)

Backport note: the release line lacks #170392 (post-plugin convergence
rereading the ledger and reporting pending migrations as plugin warnings) and
the main-only deferredInspectionCheckIds Doctor capture. Dropped the
finallyReportedPluginIds supersede path so readiness advisories cannot retire a
still-pending Doctor migration warning, omitted deferredInspectionCheckIds from
the publication helper, kept the release-line Doctor intro/outro, and adapted
the resume-completion test: a still-pending migration is reported once as the
final Doctor warning.

(cherry picked from commit 46d65ed)

Backport adaptation: ported to the 2026.9.33 extended-stable line from the
2026.10.5 adaptation of main's #170413. The 9.33 line has no
doctor-health-startup.js or install-owner.js, so doctor-health keeps its
release-line exit path and only imports the new publication helper; the config
change logging moved with the helper, retiring doctor-health's inline
formatUpdateDoctorConfigChange/createSubsystemLogger imports. The helper
carries no deferredInspectionCheckIds capture. The 9.33 triage tests are
parametrized per update marker; their post-core-convergence cases now expect
direct repair guidance, while package-swap cases keep "Let the current update
or repair finish".

* fix: keep updates moving when optional cron inspection or snapshot cleanup fails (#170754)

* fix: keep updates moving through optional cron inspection failures

* fix(cron): preserve inspection failures through cleanup

* test(cron): prove both failure causes through native workers

(cherry picked from commit 1864a74)

Backport adaptation: partial backport to the 2026.9.33 extended-stable line.
Takes the memory-core dreaming cron inspection catch, the cron read-only
snapshot cleanup change (a completed read survives deferred cleanup; a failed
read keeps both the inspection and cleanup failures), and the cleanup tests.
Drops the store-repair.ts maintenance-reader reuse hunk and its
doctor/cron/index.test.ts case, which need #162200 (absent here; 9.33 keeps
Doctor cron inspection in src/cron/store/doctor.ts), and drops the matching
reader-reuse sentence from the update docs. The 9.33 cold-cleanup test predates
main's fault-injection support, so it is adapted in place: its read case
completes and now resolves while the registered snapshot retries through
cleanupSnapshotOperations, and its copy case asserts the aggregate of the
worker copy failure and the snapshot cleanup failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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