Repository navigation
fix(cron): keep manually forced disabled reminders paused - #139947
Conversation
Only enabled one-shots own automatic retry scheduling. A forced invocation while global heartbeats are paused records its outcome without re-enabling the disabled job or scheduling another run.
|
🦞👀 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 6, 2026, 4:44 AM ET / 08:44 UTC. ClawSweeper reviewWhat this changesKeeps manually forced disabled reminders paused, adds regression coverage for saved scheduling state, and documents how to resume scheduled runs. Merge readiness✅ Ready for maintainer review Keep open: fetched main and v2026.9.2 still contain the reported re-enablement path. This focused repair addresses the linked bug without actionable correctness findings; the related terminal-disable PR addresses a different outcome. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s automation scheduler accepts scheduled and manual job runs, sends main-session reminders through the heartbeat runner, and records their outcomes. Its outcome handler controls whether the saved job remains paused or receives another scheduled run. flowchart TD
A[Manual reminder run] --> B[Automation scheduler]
B --> C[Heartbeat runner]
C --> D[Skipped because heartbeats are paused]
D --> E{Job schedule enabled?}
E -->|No| F[Preserve paused state]
E -->|Yes| G[Apply existing schedule policy]
F --> H[Saved job and run history]
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1, Tests +70, Docs +2. Total +71 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep scheduling decisions in the existing outcome owner so an explicit pause survives manual runs while enabled jobs retain their established retry and completion policies. Do we have a high-confidence way to reproduce the issue? Yes: disable a retained one-shot main-session reminder, pause heartbeats, force-run it, and inspect saved enablement and next-run state. Current-main source proves the reactivation path; this review did not execute it. Is this the best way to solve the issue? Yes: the guard repairs the existing outcome owner without adding another scheduler path, configuration option, or stored representation, and preserves earlier replay and in-flight-edit decisions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 279d42d4be3f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Only enabled one-shots own automatic retry scheduling. A forced invocation while global heartbeats are paused records its outcome without re-enabling the disabled job or scheduling another run.
Only enabled one-shots own automatic retry scheduling. A forced invocation while global heartbeats are paused records its outcome without re-enabling the disabled job or scheduling another run. (cherry picked from commit 835c4e2)
Closes #139945. Related: #131590 (one-shot terminal-disable visibility).
Additional instructions
Keep Allow edits from maintainers enabled.
What Problem This Solves
Fixes an issue where users manually running an already-disabled one-shot reminder would re-enable its schedule when heartbeats were globally paused. The run correctly reported
skippedwith reasondisabled, but the saved job became active and acquired a retry 30 seconds later. The Automations page showed the unexpected active state and next run even after reload.Why This Change Was Made
The one-shot outcome branch treated a disabled-heartbeat result as permission to enable the job; disabled jobs have no next-run timestamp, so the earlier future-occurrence preservation gate could not protect them. Restricting that branch to enabled jobs removes the redundant enablement assignment and lets disabled manual runs use the existing schedule-preservation owner, while keeping successful deletion, replay, and in-flight schedule ownership in their existing order.
User Impact
Running a paused reminder once keeps its schedule paused and does not add automatic retries. Enabled one-shot retries and recurring manual-run behavior retain their existing policy. The manual-run CLI reference now explains this distinction.
Evidence
Real isolated Gateway, public CLI, and Control UI proof compared baseline
95f963e342abwith candidate8ee16bcf586a. The baseline's affected admission, heartbeat execution, outcome, and persistence owners match the unpatched parent. Each build's installed dependencies were checked against its own lockfile; the candidate was rebuilt and recorded after a frozen install of the current graph.truefalseskipped/disabledskipped/disabledCron stayed enabled throughout the live scenarios. Each Gateway, browser, and synthetic endpoint was isolated and fully cleaned up. The proof covers the first forced invocation and persisted/UI state through reload; it does not claim a resumed-heartbeat soak or external channel delivery.
attachment-3142578920.mp4
attachment-2072139660.mp4
Hosted CI 34022608834 passed on exact head
8ee16bcf586ad99a6a2928c7bcc5fa38e98517b1. Native main56924648b69b97ee0d9eca5dcac9d3aa58fce3f4retains identical affected scheduling, heartbeat and CLI-doc owner bodies, so the repair remains necessary and composes without changing those contracts.