Repository navigation
refactor(cron): await quarantine observations in Doctor - #162091
Conversation
Move health, repair reporting, and legacy repair preparation onto the existing shared-state read worker. Keep the ordered quarantine query, payload decoder, source and snapshot ownership, and schema errors unchanged. Group the existing Cron read dispatch in its domain and separate quarantine store tests while preserving their assertions and shared fixture. Prove warm and cold Doctor observations without caller-thread quarantine SQL, existing store and dispatch contracts, and the real Doctor-to-Gateway process flow on isolated Linux. Preserve schemas, retention, and migration writes.
|
🦞👀 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 September 30, 2026, 4:58 PM ET / 20:58 UTC (Revision 2). ClawSweeper reviewWhat this changesMoves Doctor’s Cron quarantine observations to the shared SQLite read worker while retaining the Cron store’s ordered query and payload decoder. Merge readiness✅ Ready for maintainer review Current main still performs Doctor’s Cron quarantine observation on the caller thread, so this PR remains useful. The introduced worker path has no identified correctness defect. The cited upgrade and Doctor evidence addresses the prior review’s concern in combination; exact-head CI remains subject to normal landing gates. Priority: P2 Review scores
Verification
How this fits togetherDoctor checks scheduled jobs and their quarantine records in OpenClaw’s shared SQLite state. Its findings inform operators and repair preparation, while the Cron store continues to own quarantine writes. flowchart LR
A[Doctor health and repair] --> B[Cron quarantine request]
B --> C[Shared SQLite read worker]
C --> D[Ordered quarantine query]
D --> E[Quarantined job records]
E --> F[Doctor findings and repair preparation]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +59, Tests +71, Docs +7. Total +137 across 24 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep Doctor’s quarantine reads on the shared worker, with ordered records, schema errors, missing-database behavior, and repair ownership preserved. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main’s Doctor path calls the synchronous quarantine SELECT, and the PR adds warm and cold Doctor checks for that boundary. I did not execute the checkout. Is this the best way to solve the issue? Yes. Reusing the admitted SQLite reader while leaving the Cron query and writer with their existing owner is a narrow solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 33513de8d98a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
) Move health, repair reporting, and legacy repair preparation onto the existing shared-state read worker. Keep the ordered quarantine query, payload decoder, source and snapshot ownership, and schema errors unchanged. Group the existing Cron read dispatch in its domain and separate quarantine store tests while preserving their assertions and shared fixture. Prove warm and cold Doctor observations without caller-thread quarantine SQL, existing store and dispatch contracts, and the real Doctor-to-Gateway process flow on isolated Linux. Preserve schemas, retention, and migration writes.
What Problem This Solves
Doctor's Cron health and repair observations still executed quarantine SELECTs on the caller thread.
User Impact
The observations now await the existing SQLite reader. Reports, quarantined records, query ordering, schema errors, and missing-database behavior remain unchanged. No configuration, schema, retention, or SDK contract changes are required.
Why This Change Was Made
The three callers use one private
cron.quarantineoperation with the existing query and payload decoder. The reader retains its original source, snapshot, and cleanup ownership. A small Cron dispatcher groups the existing six read operations without changing their native execution frame. Existing quarantine tests have their own file, sharing the unchanged store fixture.This completes the quarantine observation path. Doctor repair writes and the synchronous message/source authority guards remain separate migration work.
Evidence
doctor --fix, subsequent Gateway readiness, and preserved invalid Cron records and retired plugin sidecars. Source-bound remote run. The lease was stopped. This proof precedes the final equivalent dispatch-type narrowing and private test-type correction; the final local receiving covers those changes.The local CLI process attempt was refused before execution by the managed-artifact separation guard, so its runtime preparation and proof used the isolated runner. The separate published-driver cell below covers the installed-updater boundary; installed updater markers, persisted representations, and migration writes remain unchanged.
Published updater and current CI
The maintained
legacy-operator-statecell passed with published[email protected]upgrading to the candidate package built from the exact1ec30bafsource tree. It preserved both Cron jobs, their effective owners, successful histories and transcripts; the candidate Gateway passed health/readiness/status and a mock turn. The no-op update, clean Doctor lint, formerly bundled plugin Doctor check, and backup rollback also passed. The lane completed in 392 seconds with its unchanged maintained budgets. Blacksmith proof run. Package SHA-256:6b853fc902458dac5b6d507e5df285e2ee5e40ef23e3de0fbe56fbbeec1ebca7.The remote source capsules use generated carrier commits whose trees were verified against the exact PR tree; those carriers are retained as such, not relabeled as the signed PR commit. An initial invocation refused before baseline installation because it mixed the original PR commit with the registry carrier stamp. Correcting that invocation to the verified execution carrier preserved all source and package guards. No product, assertion, or timeout changes were made.
This survivor scenario does not seed nonempty Cron quarantine records; the warm/cold Doctor and isolated CLI tests above cover their preservation separately.
Exact-head CI remains cancelled after one first-sign-in test assertion failed; seven sibling jobs were cancelled. All seven actual job logs were inspected without finding another failed assertion, but interrupted and unrun tails remain unverified. The independent first-sign-in diagnosis is in progress; this is not a passing-CI claim.