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 real behavior proof before merge. What this changesThis PR prevents unchanged canonical one-shot schedules from triggering Doctor cron backups and saves. Example: Doctor repairs an otherwise canonical stored job with schedule.at="2026-04-01T10:00:00.000Z" and no atMs.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this PR narrowly fixes a current Doctor defect and preserves genuine repair protection; no introduced correctness or security defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor reads persisted cron definitions, normalizes supported legacy fields, and uses the mutation result to decide whether to back up and rewrite the shared SQLite store. flowchart TD
A[Doctor CLI or update] --> B[Load cron repair state]
B --> C[Normalize stored jobs]
C --> D{Actual repair needed}
D -->|No| E[Return unchanged]
D -->|Yes| F[Verified SQLite backup]
F --> G[Guarded cron save]
Technical reviewBest possible solution: Keep the mutation correction in the existing normalizer while retaining the existing backup and save guards for genuine repairs. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically marks an identical canonical timestamp mutated and feeds that result into Doctor's backup/save decision; the contributor reports a matching failing-base regression, but this review ran no target code. Is this the best way to solve the issue? The guard fixes the incorrect mutation signal at its producer without duplicating comparison policy in the backup owner or changing timestamp precedence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c7a7539cf40d. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +37. Total +37 across 3 files. Added test files: 0. View PR surface stats
Review metrics
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 October 11, 2026, 2:32 AM ET / 06:32 UTC. |
Doctor CLI and stable-profile proofCandidate: The stable Gateway created the disabled one-shot job through Commands: Recorded results: Terminal lines from the actual repair control: The canonical candidate runs contain Two proof details are explicit:
This covers the actual Doctor entry point, valid stable data loading, and genuine repair protection. Installer self-replacement and live-channel delivery were outside these checks. |
|
@clawsweeper re-review |
|
🦞🧹 Reason: re-review requires an open issue or PR. |
Doctor's cron store migration marked every one-shot schedule as mutated, so canonical stores entered SQLite backup repair on every run. Only noncanonical at/atMs schedules are rewritten now. Fixes #168838. Thanks @harshitgupta31415. (cherry picked from commit 1bd9966)
…#168938) Doctor's cron store migration marked every one-shot schedule as mutated, so canonical stores entered SQLite backup repair on every run. Only noncanonical at/atMs schedules are rewritten now. Fixes openclaw#168838. Thanks @harshitgupta31415.
…#168938) Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Fixes #168838. Credit to @WG-Mojo for the report.
Doctor marks an already canonical one-shot timestamp as mutated and enters the cron backup/save path even though the job is unchanged.
Why This Change Was Made
Keep the mutation decision in
normalizeStoredCronJobs: rewrite only a noncanonical timestamp or a schedule that still containsatMs. The existing guarded backup/save flow stays intact for genuine repairs. Timestamp precedence, exported function signatures, configuration, dependencies, and storage schemas remain unchanged.Production delta: +1/-1, net zero. Focused test growth: +37 lines.
User Impact
Canonical one-shot jobs no longer cause redundant Doctor cron backups. Legacy normalization and malformed-row recovery retain their existing protection.
Evidence
Head:
c8931dc0ab1073537372a7c91512dbc81292e800.Regression base:
e0f1692a6e19f8383c00c0693531dc9a84c47bea.Stable CLI:
2026.10.1, release commite178c39e9aae3fa440735217f9aef9574f286677.Saved pre-repair cron backupandCron store normalizedon the base.ok, and schema version 20 unchanged. Actual candidate Gatewaycron.getconfirms the user-created job's ID, name, disabled flag, payload, creation time, session target, and scheduled instant.git diff --checkpassed. The exact-head hosted CI gate passed before this evidence update.Local baseline limitations were reproduced on a clean base: the full core typecheck fails at
src/cli/gateway-cli/run-loop-startup.test-support.ts:380with TS2353 for the existingruntimeargument; two existing SQLite-rehearsal symlink tests fail with Windows EPERM; the changed-file gate falsely reports Windows SQLite inventory growth (tracked in #168935 and repaired separately by #168956). Checks after that gate failure and full core-test typechecking were not counted as passing.The broad upgrade fixture initially expected a generated Workshop review job to survive; current base intentionally retires it in
src/cron/store/load.kernel.ts:24. The supported heartbeat and user job remain. An initial malformed-row assertion also expected an invalid atMs-only SQLite definition to stay active; the existing contract quarantines it with a verified backup. Those failed assertions are disclosed in the proof comment. Installer self-replacement and live-channel delivery were outside these checks.