Skip to content

fix(cron): keep manually forced disabled reminders paused - #139947

Merged
steipete merged 1 commit into
mainfrom
codex/qa-cron-disabled-force-20260906
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-cron-disabled-force-20260906

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

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 skipped with reason disabled, 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 95f963e342ab with candidate 8ee16bcf586a. 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.

After the forced run Baseline Candidate
Saved job enabled true false
Next run Run end + 30 seconds Absent
Run result skipped / disabled skipped / disabled
UI after reload Active, retry visible Paused, no next run
Synthetic model endpoint requests 0 0
  • Both disabled one-shot regressions failed on the original code for the enablement mismatch; five controls passed.
  • Current-lock focused proof: 15 passed, covering the 12 real-heartbeat cases, the enabled retry/event-cleanup control, and direct/queued admission of jobs disabled before reservation. Other cases were intentionally filtered.
  • Targeted type-aware lint, formatting, canonical runtime and UI builds passed. Independent full-source Codex review found no P0–P2 findings.
  • Production change: +3/-4 lines. Tests: +75/-5. Documentation: +2. No new configuration, schema, or stored representation.

Cron 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.

Before: the skipped force run re-enables the paused reminder

attachment-3142578920.mp4

After: the skipped force run preserves the paused schedule

attachment-2072139660.mp4

Hosted CI 34022608834 passed on exact head 8ee16bcf586ad99a6a2928c7bcc5fa38e98517b1. Native main 56924648b69b97ee0d9eca5dcac9d3aa58fce3f4 retains identical affected scheduling, heartbeat and CLI-doc owner bodies, so the repair remains necessary and composes without changing those contracts.

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.
@steipete steipete self-assigned this Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 4:44 AM ET / 08:44 UTC.

ClawSweeper review

What this changes

Keeps 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
Reviewed head: 8ee16bcf586ad99a6a2928c7bcc5fa38e98517b1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression controls and recorded real Gateway behavior; no actionable defect found.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Captured Gateway/public CLI observations exercise the changed outcome and persistence owner and show the candidate retaining enabled=false with no retry after skipped/disabled, including after UI reload; attached media could not be independently retrieved here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Captured Gateway/public CLI observations exercise the changed outcome and persistence owner and show the candidate retaining enabled=false with no retry after skipped/disabled, including after UI reload; attached media could not be independently retrieved here.
Evidence reviewed 9 items Introduced repair: The complete pinned introduction changes the one-shot outcome branch to require effective enablement and removes its unconditional enablement assignment. Successful deletion, replay, and stale-schedule preservation remain earlier decisions.
Still necessary on fetched main: Fetched main still enters the one-shot branch without checking enablement and assigns enabled=true after a retryable disabled-heartbeat skip.
Latest release comparison: The supplied latest release also contains the unconditional re-enablement assignment; this repair is not already present there.
Findings None None.
Security None None.

How this fits together

OpenClaw’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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1, Tests +70, Docs +2. Total +71 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 4 -1
Tests 1 75 5 +70
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 80 9 +71

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #139945
Summary: This PR is the explicit candidate for the paused-reminder reactivation report; terminal-disable visibility remains distinct.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label changes:

  • add P2: Repairs unexpected schedule reactivation in the bounded case of manually forcing a disabled reminder while heartbeats are paused.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Captured Gateway/public CLI observations exercise the changed outcome and persistence owner and show the candidate retaining enabled=false with no retry after skipped/disabled, including after UI reload; attached media could not be independently retrieved here.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Captured Gateway/public CLI observations exercise the changed outcome and persistence owner and show the candidate retaining enabled=false with no retry after skipped/disabled, including after UI reload; attached media could not be independently retrieved here.

Label justifications:

  • P2: Repairs unexpected schedule reactivation in the bounded case of manually forcing a disabled reminder while heartbeats are paused.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Captured Gateway/public CLI observations exercise the changed outcome and persistence owner and show the candidate retaining enabled=false with no retry after skipped/disabled, including after UI reload; attached media could not be independently retrieved here.
  • proof: sufficient: Contributor real behavior proof is sufficient. Captured Gateway/public CLI observations exercise the changed outcome and persistence owner and show the candidate retaining enabled=false with no retry after skipped/disabled, including after UI reload; attached media could not be independently retrieved here.

Evidence

What I checked:

  • Introduced repair: The complete pinned introduction changes the one-shot outcome branch to require effective enablement and removes its unconditional enablement assignment. Successful deletion, replay, and stale-schedule preservation remain earlier decisions. (src/cron/service/timer-outcomes.ts:247, 8ee16bcf586a)
  • Still necessary on fetched main: Fetched main still enters the one-shot branch without checking enablement and assigns enabled=true after a retryable disabled-heartbeat skip. (src/cron/service/timer-outcomes.ts:247, 279d42d4be3f)
  • Latest release comparison: The supplied latest release also contains the unconditional re-enablement assignment; this repair is not already present there. (src/cron/service/timer-outcomes.ts:254, 3928bad9badf)
  • Manual-run and persistence boundary: Manual force runs select schedule preservation, compare admitted and current scheduling inputs, and apply the outcome again to the authoritative row inside the runtime commit. The patch preserves these existing ownership checks. (src/cron/service/ops-run.ts:114, 8ee16bcf586a)
  • Regression and sibling coverage: Seven added cases exercise disabled one-shot and recurring jobs through direct/queued runs plus enabled one-shot controls. Assertions cover in-memory state, persisted state, terminal events, and removal of undelivered reminder events. The existing enabled-retry test also checks eventual successful consumption. Tests were inspected, not executed during this read-only review. (src/cron/service.wake-now-real-heartbeat.test.ts:233, 8ee16bcf586a)
  • Captured real behavior evidence: The supplied PR body at sourceRevision 091cee41dc22336ce48c79dd7d2ad4d57a7ab84d708638307e1414f669e35d10 records isolated Gateway/public CLI results comparing baseline 95f963e with candidate 8ee16bc: skipped/disabled remains unchanged, while saved enabled state changes from true to false and the automatic retry disappears through UI reload. It reports zero synthetic endpoint requests and explicitly limits coverage to the first invocation. Screenshot retrieval through the available browser failed, so the media was not independently viewed. (8ee16bcf586a)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ray Winkelman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 835c4e2 into main Sep 6, 2026
193 checks passed
@steipete
steipete deleted the codex/qa-cron-disabled-force-20260906 branch September 6, 2026 09:13
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
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.
necromman pushed a commit to necromman/openclaw that referenced this pull request Sep 20, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manually forcing a disabled one-shot reminder re-enables its schedule

1 participant