Repository navigation
Conversation
…egated Doctor start Builds with #188978 opened the live state database natively before Doctor's migration capture, changing its captured file generation. Released updaters (2026.10.7-10.9) then refused the update with state-migrated-no-rollback and left the Gateway stopped. Read the plugin cohort pair from a private snapshot.
|
Codex review: needs maintainer review before merge. What this changesThis PR reads plugin recovery metadata through the existing private snapshot reader before candidate Doctor starts. Example: The published OpenClaw 2026.10.9 updater installs a candidate containing plugin-cohort recovery.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this PR narrowly repairs a current-main update regression while preserving plugin rollback recovery; no introduced defect was found, but required CI remains unresolved. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe installed updater captures database generations before delegating to candidate Doctor; plugin recovery reads reservation metadata at that handoff, and migration admission checks that captured state remains unchanged. flowchart TD
A[Installed updater] --> B[Capture database generations]
B --> C[Candidate Doctor handoff]
C --> D[Read plugin recovery snapshot]
D --> E[Validate migration source]
E --> F[Migrate and activate Gateway]
Technical reviewBest possible solution: Use the existing artifact-preserving reader before Doctor capture while retaining current-row reads and live ownership checks at publication. Do we have a high-confidence way to reproduce the issue? The native read is reachable before Doctor migration capture, and the supplied Linux upgrade results and linked bisect identify the matching failure; no target code was executed during this review. Is this the best way to solve the issue? Removing the native-read override is the smallest complete repair: it reuses the existing snapshot owner without reverting plugin recovery or weakening migration-source checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 59ef5cdce44f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource 0, Tests +18. Total +18 across 2 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 4:03 AM ET / 09:03 UTC. |
|
Exact-head proof at
The same lane on main Reviews: autoreview came back scoped-clean. The independent Codex review found nothing in this change. It flagged one existing pre-capture write, |
|
Superseded by #190179, merged as 9172615. It makes the same production change in Thank you for the bisect to #188978 and for the native Crabbox proof that 10.7–10.9 fail. Our deep-pass matrix reproduced the same failure from released 2026.9.36 in all three flows, and #190179 replayed those flows green with the fix. Not yet released. The remaining follow-up is tracked separately: |
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
What Problem This Solves
On current main, native
openclaw updatefrom every current stable release (2026.10.7, 10.8 and 10.9) fails withstate-migrated-no-rollbackand leaves the Gateway stopped. The candidate Doctor refuses withSQLite migration source changed after update capture: ~/.openclaw/state/openclaw.sqlite. The bisect points to #188978 (6fd646e86cd): its parenta5d66efpasses, and6fd646eand every later main build tested fail.Why This Change Was Made
The installed (older) updater captures each state database's file generation before it hands off to the candidate's delegated Doctor (
update-migrated-finalize.worker.js --doctor). #188978 wrapped that Doctor inwithPluginCohortConfigCapture. That wrapper reads the plugin-cohort pair withallowNativeRead: true, a native open of the live state database, before Doctor's migration capture begins. The native open changes the captured file family. The first migration then sees a different generation and refuses the update as an unattributed write.A SQL write trace on the delegated Doctor process showed no logical writes to the state database before the failure. The changed generation therefore came from the native open itself, not from a writer, which is why earlier write traces found nothing.
The fix reads the pair through the default artifact-preserving snapshot read, which returns the same rows from a private copy. #188978's plugin-restore behavior is unchanged. This replaces the full revert in #189617, which no longer applies cleanly: #189624 and later commits build on the cohort code.
User Impact
Updates driven by the 2026.10.7–10.9 updaters (the first hop for every current user) complete again, and the Gateway is restarted and verified.
Evidence
openclaw update --tag <tarball>). Tarballs were built on the lease.1e293027afc: rc=1,state-migrated-no-rollback, unit inactive.update-plugin-cohort-recovery.test.ts, "keeps the installed updater's captured state generation before Doctor starts". It fails without the fix (generation changes) and passes with it. The whole file passes, 16/16.