Repository navigation
refactor(cron): split timer lifecycle - #113141
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
This was referenced Jul 23, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
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
src/cron/service/timer.tshad grown beyond 3,000 lines and required a grandfathered max-lines suppression, coupling timeout/watchdog execution, trigger retry policy, outcome mutation, timer admission, startup catch-up, and payload execution.Why This Change Was Made
Split the unchanged public facade into focused timeout/contracts, job runner, trigger/retry, outcome application, runnable selection, scheduler, startup catch-up, notifications, and core execution modules. Shared responsibilities are arranged as an acyclic graph, and the test-only timer API remains registered through the facade.
The production diff grows by about 132 lines of imports and facade/contract plumbing. No scheduling, retry, timeout, or delivery path is duplicated.
User Impact
No user-visible behavior changes. Cron scheduling, startup catch-up, timeout cleanup, trigger evaluation, retry/backoff, and delivery retain their existing behavior while every resulting production module stays below 700 physical lines.
Evidence
node scripts/run-vitest.mjs src/cron/service/timer.test.ts src/cron/service/timer.regression.test.ts src/cron/service/timer.pacing.test.ts src/cron/service.heartbeat-payload.test.ts— 99 tests passed.node --import tsx scripts/check-madge-import-cycles.ts— zero cycles.node scripts/check-changed.mjs -- <touched files>— passed on Blacksmith Testbox, including both typechecks, full core lint, max-lines ratchet, boundary guards, and zero runtime import cycles.$HOME/.claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean after fixing import-order and duplicate-import findings.