Repository navigation
refactor(heartbeat): make cron monitor rows own heartbeat cadence - #113135
Merged
Merged
Conversation
agents.*.heartbeat.every stays the documented desired-state input; gateway reconciliation and openclaw doctor --fix write it through into durable system-owned cron monitor rows, and a scheduled monitor tick carries its persisted everyMs/anchorMs as the authoritative cadence, which the runner adopts for subsequent event cooldowns. Doctor gains a read-only cadence preview (resolves the scheduler seed without creating device identity) and an idempotent fix path that converges monitor rows per agent. The cron-disabled fallback timer is deleted per its named removal plan (#110950): gateways with cron.enabled=false or OPENCLAW_SKIP_CRON=1 log a startup warning and get no scheduled heartbeats; manual and event-driven wakes remain.
steipete
marked this pull request as ready for review
July 23, 2026 19:25
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 23, 2026
This was referenced Jul 23, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
…enclaw#113135) * refactor(heartbeat): make cron monitor rows own heartbeat cadence agents.*.heartbeat.every stays the documented desired-state input; gateway reconciliation and openclaw doctor --fix write it through into durable system-owned cron monitor rows, and a scheduled monitor tick carries its persisted everyMs/anchorMs as the authoritative cadence, which the runner adopts for subsequent event cooldowns. Doctor gains a read-only cadence preview (resolves the scheduler seed without creating device identity) and an idempotent fix path that converges monitor rows per agent. The cron-disabled fallback timer is deleted per its named removal plan (openclaw#110950): gateways with cron.enabled=false or OPENCLAW_SKIP_CRON=1 log a startup warning and get no scheduled heartbeats; manual and event-driven wakes remain. * fix(ci): drop unused requestHeartbeat import and refresh plugin SDK baseline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
After the heartbeat scheduler unification (#112585) and the scratch migration (#112967), heartbeat cadence was still config-derived at reconcile time, which forced a dedicated fallback interval timer for cron-disabled gateways. This PR makes durable cron monitor rows the canonical owner of heartbeat execution timing and deletes that fallback timer per its named removal plan (umbrella #110950).
Why This Change Was Made
agents.*.heartbeat.everyremains the documented desired-state input (it also carries the Anthropic OAuth1hpolicy default, and system-owned jobs intentionally reject direct CLI/API edits), but gateway reconciliation andopenclaw doctor --fixnow write it through into system-owned cron monitor rows. A scheduled monitor tick carries its persistedeveryMs/anchorMsand is authoritative; the runner adopts that cadence for subsequent event cooldowns. Doctor gains a read-only cadence preview that resolves the scheduler seed without creating device identity, plus an idempotent per-agent fix path.User Impact
cron.enabled=falseorOPENCLAW_SKIP_CRON=1no longer receive scheduled heartbeats (startup warning logged; manual and event-driven wakes still work). Previously a local fallback timer kept them alive — deleted here per the removal plan recorded when it shipped.Evidence
node scripts/run-vitest.mjs src/commands/doctor-heartbeat-cadence-migration.test.ts src/commands/doctor-heartbeat-scratch-migration.test.ts src/cron/service.heartbeat-payload.test.ts src/gateway/server-cron.test.ts src/gateway/server-cron-heartbeat-jobs.test.ts src/gateway/server-runtime-services.test.ts src/infra/heartbeat-runner src/flows/doctor-health-contributions.test.ts