Repository navigation
fix(cron): release idle workers when automatic scheduling is disabled - #196387
Merged
Merged
Conversation
Extract the independently reviewable lifecycle fix from #192552. Preserve manual execution, startup recovery, enabled scheduling, and joined shutdown while allowing disabled cron workers to retire.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
RomneyDa
enabled auto-merge (squash)
November 10, 2026 02:27
RomneyDa
added a commit
that referenced
this pull request
Nov 10, 2026
Move runtime-source minification and disabled-cron scheduler lease work to independent PRs #196386 and #196387. Keep the original catalog, tool, and database cold-import cutover together and preserve all contributor ancestry. Transfer exactly 90 and 153 regression-test lines to their owning changes; reduce this change allocation from 1092 to 849 without changing the shared baseline.
Member
Author
|
Merged via squash auto-merge.
|
RomneyDa
added a commit
that referenced
this pull request
Nov 10, 2026
* fix(models): reduce cold catalog memory * fix(models): reuse captured catalog suppression metadata * fix(openai): defer catalog auth runtime loading * test(openai): explain catalog auth mock isolation * fix(models): defer discovery OAuth runtime loading * fix(process): isolate broker OOM spawn operations * fix(pr): retain broker OOM spawn leaf in wrapper * fix(state): load shared read query owners on demand * fix(gateway): skip empty shared publication recovery * fix(state): defer subagent completion imports during queue recovery * fix(state): isolate placement startup worker imports * fix(state): defer ACP imports for session maintenance * fix(startup): defer unused transcript and hook imports * fix(ci): fund the empty publication recovery regression * fix(startup): defer plugin session event execution * fix(startup): defer catalog migration and process helpers * test(plugins): exercise command revocation without a process mock * fix(startup): separate npm record metadata from command execution * refactor(plugins): keep npm metadata types with registry helpers * fix(gateway): keep optional runtimes out of cold discovery * test(agents): consolidate cold catalog import checks * fix(openai): isolate catalog discovery from runtime hooks * test(openai): consolidate cold import boundary cases * perf(agents): skip globally denied tool construction * test: consolidate cold runtime regression coverage * perf(agents): defer cold tool factory imports Keep asynchronous tool construction independent of the legacy synchronous SDK facade. Load factories only when the shared assembly requests them and revalidate authority after each import. Preserve policy, collector and host-tool behavior. Cover cold chat import boundaries and move consumer mocks to the asynchronous owner. * fix(plugins): expose opaque session event target type * fix(agents): skip auxiliary runtimes when tools are denied * fix(gateway): keep auth policy reads on runtime snapshots * fix(gateway): defer headless model catalog discovery * test(gateway): account for headless catalog regressions * test(gateway): complete cold-start regression allocation * fix(plugins): preserve loaded provider catalogs during discovery * fix(gateway): preserve provider scope during catalog reads * fix(agents): retain source identity for late catalog providers * fix(agents): preserve lazy catalogs across remote updates * fix(gateway): defer unused workspace prewarm imports * fix(gateway): keep headless session display work cold * fix(agents): defer optional execution runtimes * fix(agents): complete deferred runtime cutover * fix(ui): calibrate budget for removed preload * fix(state): isolate session patch publication imports * perf(agents): defer local command and session barrel imports * test: reuse existing cold-import line allocation * test(agents): hook the concrete queued maintenance owner * perf(build): reduce runtime source retained by module loaders Shorten local bindings while preserving module markers and top-level names used by update compatibility and standalone codegen. Apply the existing name-preserving worker minification policy to standalone runtime processes. Add an emitted-byte and relocated-runtime regression with an exact 90-line test allocation. Focused build contracts, tooling typecheck, lint, format, and the test-line ratchet pass. ARM memory acceptance remains pending. * fix(cron): release disabled scheduler worker leases * refactor(startup): simplify regression proof and allocation * test(startup): account for merged publication coverage * test(models): join native catalog refresh before logout * refactor(startup): split independent build and cron fixes Move runtime-source minification and disabled-cron scheduler lease work to independent PRs #196386 and #196387. Keep the original catalog, tool, and database cold-import cutover together and preserve all contributor ancestry. Transfer exactly 90 and 153 regression-test lines to their owning changes; reduce this change allocation from 1092 to 849 without changing the shared baseline. * test(gateway): isolate native catalog RPC demand from startup warmup --------- Co-authored-by: Dallin Romney <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 10, 2026
Extract the independently reviewable lifecycle fix from openclaw#192552. Preserve manual execution, startup recovery, enabled scheduling, and joined shutdown while allowing disabled cron workers to retire. Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 10, 2026
…92552) * fix(models): reduce cold catalog memory * fix(models): reuse captured catalog suppression metadata * fix(openai): defer catalog auth runtime loading * test(openai): explain catalog auth mock isolation * fix(models): defer discovery OAuth runtime loading * fix(process): isolate broker OOM spawn operations * fix(pr): retain broker OOM spawn leaf in wrapper * fix(state): load shared read query owners on demand * fix(gateway): skip empty shared publication recovery * fix(state): defer subagent completion imports during queue recovery * fix(state): isolate placement startup worker imports * fix(state): defer ACP imports for session maintenance * fix(startup): defer unused transcript and hook imports * fix(ci): fund the empty publication recovery regression * fix(startup): defer plugin session event execution * fix(startup): defer catalog migration and process helpers * test(plugins): exercise command revocation without a process mock * fix(startup): separate npm record metadata from command execution * refactor(plugins): keep npm metadata types with registry helpers * fix(gateway): keep optional runtimes out of cold discovery * test(agents): consolidate cold catalog import checks * fix(openai): isolate catalog discovery from runtime hooks * test(openai): consolidate cold import boundary cases * perf(agents): skip globally denied tool construction * test: consolidate cold runtime regression coverage * perf(agents): defer cold tool factory imports Keep asynchronous tool construction independent of the legacy synchronous SDK facade. Load factories only when the shared assembly requests them and revalidate authority after each import. Preserve policy, collector and host-tool behavior. Cover cold chat import boundaries and move consumer mocks to the asynchronous owner. * fix(plugins): expose opaque session event target type * fix(agents): skip auxiliary runtimes when tools are denied * fix(gateway): keep auth policy reads on runtime snapshots * fix(gateway): defer headless model catalog discovery * test(gateway): account for headless catalog regressions * test(gateway): complete cold-start regression allocation * fix(plugins): preserve loaded provider catalogs during discovery * fix(gateway): preserve provider scope during catalog reads * fix(agents): retain source identity for late catalog providers * fix(agents): preserve lazy catalogs across remote updates * fix(gateway): defer unused workspace prewarm imports * fix(gateway): keep headless session display work cold * fix(agents): defer optional execution runtimes * fix(agents): complete deferred runtime cutover * fix(ui): calibrate budget for removed preload * fix(state): isolate session patch publication imports * perf(agents): defer local command and session barrel imports * test: reuse existing cold-import line allocation * test(agents): hook the concrete queued maintenance owner * perf(build): reduce runtime source retained by module loaders Shorten local bindings while preserving module markers and top-level names used by update compatibility and standalone codegen. Apply the existing name-preserving worker minification policy to standalone runtime processes. Add an emitted-byte and relocated-runtime regression with an exact 90-line test allocation. Focused build contracts, tooling typecheck, lint, format, and the test-line ratchet pass. ARM memory acceptance remains pending. * fix(cron): release disabled scheduler worker leases * refactor(startup): simplify regression proof and allocation * test(startup): account for merged publication coverage * test(models): join native catalog refresh before logout * refactor(startup): split independent build and cron fixes Move runtime-source minification and disabled-cron scheduler lease work to independent PRs openclaw#196386 and openclaw#196387. Keep the original catalog, tool, and database cold-import cutover together and preserve all contributor ancestry. Transfer exactly 90 and 153 regression-test lines to their owning changes; reduce this change allocation from 1092 to 849 without changing the shared baseline. * test(gateway): isolate native catalog RPC demand from startup warmup --------- Co-authored-by: Dallin Romney <[email protected]>
RomneyDa
added a commit
that referenced
this pull request
Nov 12, 2026
Extract the independently reviewable lifecycle fix from #192552. Preserve manual execution, startup recovery, enabled scheduling, and joined shutdown while allowing disabled cron workers to retire. Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 4e97c6e) Co-authored-by: RomneyDa <[email protected]>
RomneyDa
added a commit
that referenced
this pull request
Nov 12, 2026
Adapt upstream source 625945b to the beta3 runtime owners. Keep synchronous SDK compatibility while deferring tool, model, plugin, process and state-handler initialization. Integrate on 67cc5d9, preserving #195398, #196301, #196386, #196387, #189991 and #196448. Three automatically merged overlaps retain canonical assertion/mock baseline removals and worker-turn input gating; no new behavioral adaptation. Original source reviews and focused build/test evidence are retained. Fresh integration-only independent review found no actionable issues. Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[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.
What Problem This Solves
Fixes: disabling automatic cron scheduling still pins the native database worker for the lifetime of the service.
Related: #192547. Extracted from #192552; implementation by @vincentkoc.
User Impact
Disabled cron can release its idle worker under memory pressure while manual runs and startup recovery remain available. Enabled scheduling retains its persistent lease. No configuration or schema changes.
Why This Change Was Made
The scheduler owner borrows a finite lease for disabled reconciliation and serializes each borrow through its finalizer. Shutdown joins active work; database retirement invalidates the current borrow. This separates the lifecycle fix from the broader cold-import and build changes in #192552.
Simplification retained one scheduler owner and existing lease machinery. The production delta is +64/-12 lines; regression coverage adds 153 lines, funded by an exact task-specific allocation without raising the shared scalar.
Evidence
d7aaafe92edfe272b7d17f9793a6feb70248956d, the new real-worker retirement test fails at its 10-second deadline with the old persistent lease (1 failed, 3 filtered; 77.39 seconds including cold worker compilation).d7aaafe92edfe272b7d17f9793a6feb70248956d..1507bf9133fa7bd5a48d77b519b0aa4a9fd6ebea: high-confidence review, no actionable correctness or security defects, patch correct. This was source review; the test results above were executed separately.