Repository navigation
Conversation
|
🦞👀 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: needs maintainer review before merge. Reviewed October 2, 2026, 7:35 AM ET / 11:35 UTC (Revision 6). ClawSweeper reviewWhat this changesDoctor 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 Review scores
Verification
How this fits togetherDoctor 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]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +262, Tests +187. Total +449 across 8 files. View PR surface stats
Review metrics
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
e46eccd to
11d5ff7
Compare
|
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 Candidate identity: PR head Sanitized output from the job and artifact: 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. |
|
@victor-gurbani Could you please rebase this PR onto current main? The conflicting file is 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: 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. |
11d5ff7 to
e051886
Compare
|
@steipete The requested rebase is complete on main Main's exact declaration fixture shape was retained, including both 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 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. |
|
@clawsweeper re-review The maintainer-requested rebase is published at |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Current head |
|
🦞👀 Re-review progress:
|
|
@steipete Final-head review and recovery proof are complete for The completed CI run retains one separate root failure in checks-node-changed: unchanged 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. |
|
Landed (squash |
…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]>
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]>
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
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.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.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 upstream0f470aecdc1208c34df6f233371ff1d6e7484d25.The first CI run tested merge
5bf0d1b5a812d2f9d1474c62c9ecc25e993a7fccagainst main25aecf8d10512338ed06180bed5f023cd388d673. 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-diffconfirms the SQLite product patch is unchanged by the rebase.The remaining Windows failure was
ERR_PACKAGE_PATH_NOT_EXPORTEDfor@openclaw/normalization-core/record-coerce: the declaration fixture copied a real process module importing that helper, but its synthetic package exported onlyerror-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 main93625aa3d10dcea99ead6a2e5b58be2e71f646ad. The SQLite rebase commit ise0518863747bea035221582a28f87f1c94bee469; 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. Artifact11216823083(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.7and candidate test mergec80d47842feccd11edcbd29c032414758230730con base8b7a1181271808e7e29ea10afbc1848482463e41. Sanitized output from the maintainer-inspected job/artifact: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-diffreports 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: truemarker, 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
feb9fc5566d9f5cc4c781732ea3595a3da663128has 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; artifact11223831746(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 is71d9b13baf7a56f0a93bd724c18034b56830072aon base067639ad2c1f2dab3d8bc5bed6a4d9e6732f8614.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.