Skip to content

fix(doctor): prevent slow archive migrations during maintenance - #163369

Merged
steipete merged 2 commits into
openclaw:mainfrom
victor-gurbani:fix/doctor-maintenance-admission-read
Oct 2, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
victor-gurbani:fix/doctor-maintenance-admission-read

Conversation

@victor-gurbani

@victor-gurbani victor-gurbani commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #163365

Related: #161734.

What Problem This Solves

Fixes slow Doctor archive migrations when repeated maintenance-authority checks hash and snapshot the entire shared SQLite store inside small write transactions.

User Impact

Doctor can repeatedly check current maintenance policy without the full-store work that unnecessarily prolongs offline repairs. No schema, config, permission, retention or archive transaction changes are required.

Why This Change Was Made

The admission reader now retains an independent read-only connection only inside the same schema-maintenance scope and admitted native source lifetime. Each invocation reads fresh committed policy and rechecks source identity, read admission and quarantine; no authorization result is cached. The schema owner observes foreign commits, and scope drainage closes the reader before releasing its source retention. Cold artifact-preserving reads remain available outside that scope.

Evidence

  • Focused Doctor admission regressions: 11/11 passed across two files. Each uses synthetic SQLite state and the actual Doctor admission entry point.
  • Relevant read-retainer, snapshot-admission, source-identity, warm-source and native activation siblings: 38/38 passed across five files with normal host access. The initial restricted-sandbox run could not establish native spawn-broker readiness; the same selection passed with the required host IPC/process access. No assertions or deadlines were weakened.
  • Full check:changed --staged --timed: passed, including production types, all 27 core test type graphs, typed lint, formatting, dead exports, schema alignment and repository guards. The final test delta also passed formatting and the affected ratchets.
  • Codex autoreview: scoped-clean at P0/P1 for the production patch. Independent review of the current-upstream adaptation, final test additions and public text found no actionable P0/P1 or privacy findings.
  • Single-worker test cost: warm-reader file 6 tests, 21.52 s wall / 18.62 s Vitest duration; freshness file 5 tests, 27.76 s wall / 23.25 s Vitest duration. Wall time includes the existing compiled-worker preparation and transform costs; there are no new sleeps, real timers or serial test configuration.
  • Baseline proof: restoring only the original upstream admission reader makes the performance regression fail on three whole-store hashes for three assertions. Restoring the reviewed fix passes with zero hashes and zero full-store copies; the reviewed source was restored byte-for-byte after this proof.
  • Full unfiltered build/test suites were not rerun on this upstream branch. The scoped checks above cover this change; GitHub CI will provide additional review evidence.

The regression exercises the real Doctor admission entry point with synthetic state. It covers repeated reads without full-store hashing/copying, committed foreign policy changes, uncommitted source/peer writes, inherited discovery snapshots, quarantine, replacement and drainage into cold restoration.

Update behavior: the shipped updater runs unchanged; the optimization is candidate-side and applies only after native admission establishes the supported maintenance/native-source scope. No migration or rollback transform is introduced. The original release-based candidate also completed a private native update and final Doctor pass; current-upstream validation is reported separately above.

All public fixtures and text use synthetic data. Production databases, transcripts, configs, incident logs and local operator/recovery scripts are excluded from this PR.

Follow-up to CI and ClawSweeper

Previous tested candidate: 11d5ff7edd550c5b723a682a6425774cdc52f4fa, based on upstream 0f470aecdc1208c34df6f233371ff1d6e7484d25.

The first CI run tested merge 5bf0d1b5a812d2f9d1474c62c9ecc25e993a7fcc against main 25aecf8d10512338ed06180bed5f023cd388d673. Its type/lint failures were a duplicate logger key and delegation-test callback errors in unchanged upstream files; its topology failure was an upstream command-custody import cycle. The corrected base includes their fixes (d81a2d8, 0f470ae). git range-diff confirms the SQLite product patch is unchanged by the rebase.

The remaining Windows failure was ERR_PACKAGE_PATH_NOT_EXPORTED for @openclaw/normalization-core/record-coerce: the declaration fixture copied a real process module importing that helper, but its synthetic package exported only error-coercion. The follow-up commit materializes and exports both real modules. The exact failed declaration-generator case now passes (31 s wall); no assertions, deadlines or guards were weakened. Production types, the fixture-owner type graph, affected lint and formatting passed on the updated base. The 11 Doctor admission regressions passed again (48.80 s wall).

Verified native proof and maintainer-requested rebase

Current head: feb9fc5566d9f5cc4c781732ea3595a3da663128, based on main 93625aa3d10dcea99ead6a2e5b58be2e71f646ad. The SQLite rebase commit is e0518863747bea035221582a28f87f1c94bee469; the only subsequent change is the one-line test fixture correction below.

The published-driver update job completed successfully at 08:34:46 UTC for head 11d5ff7edd550c5b723a682a6425774cdc52f4fa, after the preceding ClawSweeper review. Artifact 11216823083 (published-driver-update) is bound to that same run/head. The maintainer inspected its logs and artifact and confirmed that this satisfies the requested candidate-specific native proof. The API job/artifact identities and success were independently verified during this follow-up.

The job used published driver 2026.9.7 and candidate test merge c80d47842feccd11edcbd29c032414758230730c on base 8b7a1181271808e7e29ea10afbc1848482463e41. Sanitized output from the maintainer-inspected job/artifact:

candidate-doctor: completed, exitCode=0
managed-service-reconciliation: completed, exitCode=0
gateway verification: completed, exitCode=0
update: exit=0 durationMs=573369
lastRun: phase=finished, status=succeeded
PASS published 2026.9.7 -> candidate 2026.9.7 (c80d47842feccd11edcbd29c032414758230730c): finished, readyz=200, running version verified

This is synthetic state with the maintained service-manager fixture. It is not a real OS systemd-host test or an archive-scale speed benchmark; the duration measures the whole update. The focused regressions separately prove admission cost/freshness. No personal data, endpoints, credentials or raw production captures are included.

As requested by the maintainer, the branch was rebased onto current main. The only conflict was test/scripts/declaration-fixture-packages.ts; both module entries are already upstream, so main's exact current shape was retained and the redundant fixture-only commit dropped. git range-diff reports the SQLite commit as patch-identical, and all four production files plus all three test/support files are byte-identical to the tested prior head. Independent resolution/privacy review found no P0/P1 findings. The exact previously failing declaration case passed on main's retained fixture (20.02 s wall). New-head hosted gates are required and will be reported when complete; the earlier native result is retained with its original head rather than relabeled as a new-head run.

Current-head CI fixture correction

The rebased head's published-driver update job also completed successfully. ClawSweeper's completed review found no actionable patch or security findings and accepted the native proof. That run's sole root failure was the Doctor OAuth isolation test: its unchanged single-agent fixture used the retired default: true marker, so canonical config validation refused before reaching either selected OAuth check.

The follow-up removes only that retired marker. Both original failures reproduced locally; both cases now pass (2/2, 12.54 s wall). Snapshot-preservation, no-fetch/no-refresh and live-refresh assertions remain intact. Affected typed lint, formatting and diff checks passed; scoped Codex review is clean at P0/P1. No product authentication behavior or credentials changed, and the original seven SQLite files remain byte-identical. Fresh hosted gates and exact-head review apply to this follow-up head.

Final-head hosted results

Head feb9fc5566d9f5cc4c781732ea3595a3da663128 has a completed ClawSweeper review with no actionable code/security findings and no contributor-facing blockers. The formerly failing OAuth shard passed. Its published-updater / Doctor / Gateway recovery job passed at 11:22:30 UTC; artifact 11223831746 (published-driver-update) is available and bound to this run/head. Inspected job output confirms update exit zero, durable completion, readyz=200, and the running candidate version. The tested merge is 71d9b13baf7a56f0a93bd724c18034b56830072a on base 067639ad2c1f2dab3d8bc5bed6a4d9e6732f8614.

One separate end-to-end job failed in unchanged test/e2e/qa-lab/runtime/paired-node-worker-lifecycle-wire.e2e.test.ts:328. The disconnected-runner turn returned a generic public reply error after about 120 seconds, while the assertion expected an offline/reconnect explanation. The log does not expose the underlying worker exception. The other four files in that job passed; aggregate CI gates retain this failure.

Bounded investigation found no introduced SQLite failure: the warm-reader caller requires Doctor schema-maintenance scope, which this QA runtime does not create; the added read-scope helper is inactive here, and the retained-read admission change is equivalent without a maintenance scope. This is source/control-flow attribution, not a reproduced main failure or a passing replay. A local attempt used the same five-file selection and stopped before tests when native build admission could not verify separation from the managed Gateway. The documented isolated adapter requires Linux/rootless Podman, unavailable on this macOS host. No service was stopped, guard bypassed, timeout extended, assertion weakened, or CI run repeated to hide this result. The underlying runtime failure remains for the owning maintainer to diagnose; no speculative product or expectation change is included.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: L labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 7:35 AM ET / 11:35 UTC (Revision 6).

ClawSweeper review

What this changes

Doctor reuses a scoped, independent SQLite reader for fresh maintenance-policy checks, adds freshness and cleanup regressions, and corrects an OAuth test fixture.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix: current main and v2026.9.7 still perform the expensive admission observation. No actionable patch or security findings remain, and the accepted recovery proof is sufficient. The separate failing runtime check remains subject to normal landing gates.

Priority: P1
Reviewed head: feb9fc5566d9f5cc4c781732ea3595a3da663128

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused native regressions, original-reader failure evidence and accepted published-driver recovery proof support an above-average patch with no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Accepted published-driver proof exercises candidate Doctor maintenance, service reconciliation and Gateway recovery, with final-head success and artifact identity independently verified. Captured output shows durable completion and readiness; native regressions separately establish admission cost and freshness. Direct log retrieval was proxy-blocked. No stored-data contract changes.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Accepted published-driver proof exercises candidate Doctor maintenance, service reconciliation and Gateway recovery, with final-head success and artifact identity independently verified. Captured output shows durable completion and readiness; native regressions separately establish admission cost and freshness. Direct log retrieval was proxy-blocked. No stored-data contract changes.
Evidence reviewed 10 items Pinned introduced patch: Reviewed the merge-base-to-head patch, including all four production files and the changed tests. The original head is feb9fc5; the supplied test merge has different base parentage and was not used to infer removal of current-main behavior.
Still necessary on current main: Current main retains the content-version observation on every admission-reader invocation. Existing maintenance-reader support serves a different selected read path and does not eliminate this observation.
Latest release still uses the original reader: GitHub's v2026.9.7 source also calls readCurrentOpenClawStateDatabaseContentVersion for each admission check; this optimization is not present in the supplied latest release.
Findings None None.
Security None None.

How this fits together

Doctor checks the shared SQLite update ledger before offline repairs proceed. This reader supplies current committed policy to maintenance guards while database lifecycle owners control admission and cleanup.

flowchart TD
  A[Doctor maintenance] --> B[Check update policy]
  B --> C{Eligible native source}
  C -->|Yes| D[Scoped independent reader]
  C -->|No| E[Artifact-preserving cold reader]
  D --> F[Current committed update records]
  E --> F
  F --> G[Allow repair or refuse conflict]
  A --> H[Drain readers before release]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +262, Tests +187. Total +449 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 4 265 3 +262
Tests 4 213 26 +187
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 478 29 +449

Review metrics

Metric Value Why it matters
Production versus regression growth production net +262 lines; tests/support net +187 lines Production growth is explained by the scoped reader's source retention, schema freshness and cleanup responsibilities.

Technical review

Best possible solution:

Keep maintenance admission proportional to its policy query while preserving committed-state freshness, source identity, quarantine and ordered resource drainage.

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

Yes, source establishes that current-main Doctor admission observes the complete store on every assertion, and the supplied native regression reports failing on that original reader. This review did not execute target code.

Is this the best way to solve the issue?

Yes, the scoped independent reader removes the expensive observation at its owner while retaining fresh policy evaluation and the cold fallback; archive batching remains separate work.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P1: Repeated whole-store admission work prolongs offline Doctor repairs while the managed Gateway is stopped.
  • 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. Sufficient (logs): Accepted published-driver proof exercises candidate Doctor maintenance, service reconciliation and Gateway recovery, with final-head success and artifact identity independently verified. Captured output shows durable completion and readiness; native regressions separately establish admission cost and freshness. Direct log retrieval was proxy-blocked. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Accepted published-driver proof exercises candidate Doctor maintenance, service reconciliation and Gateway recovery, with final-head success and artifact identity independently verified. Captured output shows durable completion and readiness; native regressions separately establish admission cost and freshness. Direct log retrieval was proxy-blocked. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: 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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-02T07:48:39.610Z sha e46eccdcfcd8e241336ed42805477efd01861993 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-02T08:28:13.462Z sha 11d5ff7edd550c5b723a682a6425774cdc52f4fa :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-02T10:53:34.532Z sha e051886 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T11:00:01.895Z sha e051886 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-02T11:12:00.173Z sha feb9fc5 :: needs maintainer review before merge. :: none

@victor-gurbani
victor-gurbani force-pushed the fix/doctor-maintenance-admission-read branch from e46eccd to 11d5ff7 Compare October 2, 2026 08:17
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

The candidate-specific published-updater proof requested by the exact-head ClawSweeper review is now available and passed. I inspected the published-driver job and its logs and the published-driver-update artifact (ID 11216823083). The job finished at 08:34:46 UTC, after the 08:28 UTC review.

Candidate identity: PR head 11d5ff7edd550c5b723a682a6425774cdc52f4fa on base 8b7a1181271808e7e29ea10afbc1848482463e41, tested as merge commit c80d47842feccd11edcbd29c032414758230730c. The installed published driver was 2026.9.7; the candidate package retained version 2026.9.7 and is distinguished by its commit/build identity.

Sanitized output from the job and artifact:

candidate-doctor: completed, exitCode=0
managed-service-reconciliation: completed, exitCode=0
gateway verification: completed, exitCode=0
update: exit=0 durationMs=573369
lastRun: phase=finished, status=succeeded
PASS published 2026.9.7 -> candidate 2026.9.7 (c80d47842feccd11edcbd29c032414758230730c): finished, readyz=200, running version verified

This exercises the published updater, completed candidate Doctor maintenance, service reconciliation, and Gateway recovery using synthetic state and the maintained service-manager fixture. It is not a real systemd-host test or an archive-scale timing benchmark; the 573 seconds measure the whole update. The focused regressions separately cover the admission cost and freshness contracts. This resolves the review's request for inspectable candidate-linked update/Doctor/recovery evidence and its corresponding rank-up move.

Thanks @victor-gurbani for the Doctor admission fix.

@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@victor-gurbani Could you please rebase this PR onto current main? The conflicting file is test/scripts/declaration-fixture-packages.ts. Both sides already include the error-coercion and record-coerce fixture entries; please keep both in main's current shape.

Maintainer edits are enabled. I resolved the test-support conflict in the managed preparation checkout, with the reviewed production files unchanged, but native publication refused: GraphQL push cannot preserve merge ancestry; publish the verified signed merge with git transport. The contributor branch remains at 11d5ff7edd550c5b723a682a6425774cdc52f4fa; no maintainer update was pushed.

The candidate-specific published-updater/Doctor/Gateway recovery proof is recorded above. After the rebase, the new head will need its hosted gates. Thanks for the fix.

@victor-gurbani
victor-gurbani force-pushed the fix/doctor-maintenance-admission-read branch from 11d5ff7 to e051886 Compare October 2, 2026 10:46
@victor-gurbani

victor-gurbani commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@steipete The requested rebase is complete on main 93625aa3d10dcea99ead6a2e5b58be2e71f646ad; current head is feb9fc5566d9f5cc4c781732ea3595a3da663128.

Main's exact declaration fixture shape was retained, including both error-coercion and record-coerce, and its redundant fixture-only commit was dropped. All seven SQLite production/test/support files remain byte-identical to the previously tested candidate. Independent conflict/privacy review passed; the affected declaration case passed in 20.02 seconds.

The rebased candidate also passed published updater / Doctor / Gateway recovery, and ClawSweeper reports no actionable findings with sufficient proof. Its sole root CI failure was the unchanged Doctor OAuth fixture's retired default: true marker, rejected before the selected OAuth checks. The follow-up removes only that marker: both failures reproduced, both cases now pass (2/2, 12.54 seconds), and all snapshot/no-refresh/live-refresh assertions remain. Typed lint, formatting and scoped P0/P1 review passed.

The body records the proof with accurate head attribution. Fresh gates are attaching to the one-line fixture follow-up; please continue native preparation/merge once those gates and exact-head review are satisfied.

@victor-gurbani

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The maintainer-requested rebase is published at e0518863747bea035221582a28f87f1c94bee469; the SQLite patch is unchanged and the redundant fixture delta is now upstream. The PR body includes the maintainer-inspected successful published-updater/Doctor/Gateway-recovery job and artifact, with accurate prior-head attribution and synthetic service-fixture scope. Fresh hosted checks have attached.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 2, 2026
@victor-gurbani

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head feb9fc5566d9f5cc4c781732ea3595a3da663128 adds only a one-line correction to the unchanged Doctor OAuth test fixture, removing the retired default: true marker that prevented config validation from reaching its checks. Both cases reproduce before and pass after the correction; assertions are unchanged and scoped P0/P1 review passed. The seven SQLite files are unchanged. The PR body now also links the successful rebased-head published-updater/Doctor/Gateway-recovery job.

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@victor-gurbani

Copy link
Copy Markdown
Contributor Author

@steipete Final-head review and recovery proof are complete for feb9fc5566d9f5cc4c781732ea3595a3da663128: ClawSweeper revision 5 has no actionable code/security findings or contributor-facing blockers. The corrected OAuth shard passed, and published updater / candidate Doctor / Gateway recovery passed too, with artifact 11223831746 bound to this head/run and verified running candidate/readiness.

The completed CI run retains one separate root failure in checks-node-changed: unchanged paired-node-worker-lifecycle-wire.e2e.test.ts:328 expected an offline/reconnect explanation but received the generic public reply error after 120116ms. Its four other files passed. The exact tested merge/base are 71d9b13baf7a56f0a93bd724c18034b56830072a / 067639ad2c1f2dab3d8bc5bed6a4d9e6732f8614.

Independent bounded source review found no introduced SQLite defect: this turn path does not enter Doctor schema-maintenance custody; the warm reader is inactive and ordinary borrow behavior is unchanged. The log has no underlying worker exception, so this is not a reproduced main failure. The intended offline launch deadline is 10 seconds; widening the assertion to accept a generic error would conceal the missing diagnosis. The local same-selection attempt was refused before tests by native artifact-separation admission, and the documented Linux/rootless-Podman adapter is unavailable here. No guard, assertion or timeout was weakened and no CI rerun was used to hide the failure.

The PR body records those facts and the reproduction limit. Please have the runtime owner inspect the failing Gateway/worker diagnostics or exact-base comparison, then continue the native landing under the normal gates or a specifically qualified inherited-failure route. My upstream account is pull-only, so I cannot complete that maintainer operation. The SQLite patch and its accepted proof remain unchanged.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 2, 2026
@steipete
steipete merged commit 0eca3d0 into openclaw:main Oct 2, 2026
164 of 168 checks passed
@steipete

steipete commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Landed (squash 0eca3d020e1a927143c5d851c95c39098c1fdf0f, head feb9fc5566d9): read-only lead triage found no product defect (independent bounded reader, fresh admission/quarantine/identity checks retained); the four production files match the previously reviewed head; exact-head published-driver recovery job passed (candidate Doctor, service reconciliation, Gateway verification all exit 0). The one failing CI job on this head is paired-node-worker-lifecycle-wire.e2e.test.ts:328 (gateway node-worker e2e), which this PR does not touch; admin-merged per the unrelated-red rule rather than re-running CI. Thanks @victor-gurbani.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 3, 2026
…nt reader (openclaw#163369)

Doctor update-admission checks hashed the complete shared SQLite artifact family on every assertion (readCurrentOpenClawStateDatabaseContentVersion inside the admission reader), and lease writes invalidated the row cache, so repeated maintenance checks re-hashed archives inside small write transactions and prolonged the Gateway-offline window. The admission reader now holds an independent read-only connection within the schema-maintenance scope and admitted native-source lifetime, reads committed policy in one bounded snapshot per assertion, keeps lease/update admission, quarantine, schema and source-identity checks fresh, and closes before releasing source retention.

Closes openclaw#163365

Co-authored-by: victor-gurbani <[email protected]>
RomneyDa added a commit that referenced this pull request Oct 7, 2026
Backport the approved Doctor/update and Claude CLI fixes to the frozen 2026.9.9 cut. Preserve release-local migration prelude and recovery paths. Include the landed WhatsApp fixture synchronization repair uncovered by validation. No version, dependency, schema, or publication change.

Sources: #164868, #163369, #165837, #165596, and #166531.

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Víctor Gurbani Carballo <[email protected]>
Co-authored-by: Abdel Gomez-Perez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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.

[Bug]: Doctor maintenance rehashes shared SQLite state on every admission check

2 participants