Repository navigation
fix(cron): prevent maintenance from dropping scheduled runs during model setup - #115804
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
pull Bot
pushed a commit
to yann0001/openclaw
that referenced
this pull request
Jul 29, 2026
* origin/main: fix(gateway): keep Responses replacement streams consistent (openclaw#115799) fix(gateway): hosted setup exits no longer stop the gateway (openclaw#115671) fix(cron): protect sessions throughout model preparation (openclaw#115804) fix(ui): preserve model names alongside aliases (openclaw#115789) fix(qa): prepare shared Slack live flows fix(ui): stabilize memory engine selection (openclaw#115750) fix(web-fetch): release abandoned fallback response bodies (openclaw#115759)
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
* origin/main: fix(gateway): keep Responses replacement streams consistent (openclaw#115799) fix(gateway): hosted setup exits no longer stop the gateway (openclaw#115671) fix(cron): protect sessions throughout model preparation (openclaw#115804) fix(ui): preserve model names alongside aliases (openclaw#115789) fix(qa): prepare shared Slack live flows fix(ui): stabilize memory engine selection (openclaw#115750) fix(web-fetch): release abandoned fallback response bodies (openclaw#115759)
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.
Closes #114573
What Problem This Solves
Fixes an issue where users running isolated scheduled jobs on busy gateways would lose every scheduled run when session maintenance deleted its unprotected cron session during asynchronous model preparation.
Why This Change Was Made
Claim and protect the exact original session generation immediately after cron session resolution, before asynchronous model selection, provider preflight, delivery preparation, or skill loading. Keep the existing missing-row, archived-session, replacement-owner, and lifecycle-generation fences completely unchanged. Release the early admission on both non-executing model-selection/provider-preflight returns and on preparation exceptions.
This fixes the actual create-to-claim race rather than recreating deleted rows, so an older run cannot resurrect a row after a newer lifecycle owner was removed.
User Impact
Isolated scheduled runs survive concurrent session maintenance and reach the model instead of repeatedly failing with
CronSessionLifecycleClaimError. Persistent and user-owned sessions still fail closed on deletion or takeover. Existing model fallback, unavailable-provider skips, detached exact-run state, cleanup, and delivery keep their behavior.Evidence
pnpm check:changedon Blacksmith: passed; both core and core-test tsgo, changed-file format and lint, production/full-tree/script Knip scans (all zero), SDK and owner-boundary guards, database-first/state-schema guards, and runtime import-cycle guard all passed.gpt-5.6-solxhigh autoreview: clean, 0.96. Its earlier ABA finding against an exploratory recreate-on-missing approach was accepted; this submitted solution preserves the existing generation fences and eliminates that approach.AI-assisted; source, lifecycle invariants, production owner boundaries, and proof were reviewed against the actual repository.