fix(cron): migrate legacy string schedule/command cron store jobs#31926
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 2, 2026
Merged
fix(cron): migrate legacy string schedule/command cron store jobs#31926steipete merged 2 commits intoopenclaw:mainfrom
steipete merged 2 commits intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryMigrated legacy cron jobs with string Key changes:
Migration flow:
The test comprehensively verifies all migration aspects including no schedule-compute warnings after migration. Confidence Score: 5/5
Last reviewed commit: 5475fdb |
5475fdb to
2fe63e9
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @bmendonca3! |
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
dawi369
pushed a commit
to dawi369/davis
that referenced
this pull request
Mar 3, 2026
OWALabuy
pushed a commit
to kcinzgg/openclaw
that referenced
this pull request
Mar 4, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 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.
Summary
Describe the problem and fix in 2–5 bullets:
schedulewas a plain cron string and payload existed only as top-levelcommand, so those jobs entered schedule-error loops instead of being normalized.ensureLoadednow migrates stringscheduleto{ kind: "cron", expr }, infers payload from legacy top-levelcommand, normalizes missing/invalidsessionTarget, and strips legacy top-levelcommand/timeoutfields during migration.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
schedulestring +command) can trigger scheduler.trimerrors and hide jobs fromcron list#18445User-visible / Behavior Changes
schedule: "<cron expr>"commandare now normalized on load and persisted as canonical cron jobs.
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
schedule: "0 */2 * * *"command: "bash /tmp/imessage-refresh.sh"payloadand nosessionTarget.CronServiceagainst that store.Expected
Actual
scheduleremained unmigrated and triggered schedule-compute failure path.Evidence
Attach at least one:
Before (same test on this branch before fix):
pnpm vitest src/cron/service.store.migration.test.ts -t "#18445""0 */2 * * *".After:
pnpm vitest src/cron/service.store.migration.test.tspnpm vitest src/cron/store.test.ts src/cron/service.issue-13992-regression.test.ts src/cron/service/jobs.schedule-error-isolation.test.tsHuman Verification (required)
What you personally verified (not just CI), and how:
schedulemigrates to canonical cron schedule object.payload.kind="systemEvent".sessionTargetinfers deterministically from payload kind.command/timeouttop-level fields are removed after migration.pnpm checkgate currently fails on upstream due an unrelated existing TypeScript error inextensions/zalouser/src/monitor.ts.Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
jobs.json.bak) if needed.storePath.Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.sessionTarget, top-level legacy fields removed).