Merged
Conversation
|
This pull request has been automatically marked as stale due to inactivity. |
9ca5e19 to
7bb9ff8
Compare
hwb96
pushed a commit
to hwb96/openclaw
that referenced
this pull request
Mar 1, 2026
github-actions bot
pushed a commit
to tankerwng2/openclaw
that referenced
this pull request
Mar 1, 2026
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 1, 2026
Cherry-pick of upstream 5784963.
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
Cherry-pick of upstream 5784963.
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
Mateljan1
pushed a commit
to Mateljan1/openclaw
that referenced
this pull request
Mar 7, 2026
alexey-pelykh
pushed a commit
to remoteclaw/remoteclaw
that referenced
this pull request
Mar 16, 2026
(cherry picked from commit 5784963)
alexey-pelykh
added a commit
to remoteclaw/remoteclaw
that referenced
this pull request
Mar 16, 2026
(cherry picked from commit 5784963) Co-authored-by: Pierre <[email protected]>
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
saveCronStoreinsrc/cron/store.tswas always writingjobs.json.bakon every save, even when the serialized cron payload was unchanged. This created unnecessary disk churn and made the backup file less useful because it was being overwritten with the latest state each write.Root Cause
The previous save flow always:
jobs.json,jobs.jsontojobs.json.bak.That means
.bakrepresented the newest snapshot, not the previous one, and it was rewritten on every persist tick.Fix
jobs.json.bakfrom the previous on-diskjobs.jsonbefore replacing it.This preserves meaningful backup semantics and avoids unnecessary backup rewrites.
Tests
Added/updated tests in
src/cron/store.test.ts:Validation
pnpm lintpnpm buildpnpm testAI Assistance
Greptile Summary
Fixed unnecessary disk churn in cron store backup mechanism. The previous implementation always created a backup file on every save, even when the content was unchanged. Now the function reads the current file first, short-circuits if the serialized JSON is identical, and only creates
jobs.json.bakfrom the previousjobs.jsonwhen the content actually changes. This preserves proper backup semantics (backup = previous state, not current state) and eliminates wasteful disk writes.Confidence Score: 5/5
Last reviewed commit: 3dbb196
(2/5) Greptile learns from your feedback when you react with thumbs up/down!