Repository navigation
fix(test): await the cron scheduler child's exit instead of a wall-clock kill - #155278
Merged
Merged
Conversation
…ock kill Reuse the compiled cron fixture and join scheduler children before store cleanup. Preserve cross-process receipt/recovery assertions and expose exit signals. Related: #153167 Evidence: CI run 35659161173 / job 106530444451; five contended full-shard replays plus a 61-second completion-delay probe; check:changed and P1 review.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
steipete
marked this pull request as ready for review
September 21, 2026 23:42
steipete
enabled auto-merge (squash)
September 21, 2026 23:45
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Sep 22, 2026
…ock kill (openclaw#155278) Reuse the compiled cron fixture and join scheduler children before store cleanup. Preserve cross-process receipt/recovery assertions and expose exit signals. Related: openclaw#153167 Evidence: CI run 35659161173 / job 106530444451; five contended full-shard replays plus a 61-second completion-delay probe; check:changed and P1 review.
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.
Related: #153167
What Problem This Solves
Fixes cron shared-store CI failures when slow scheduler-child startup or completion reaches the fixture's 60-second kill deadline. The failures appeared in run 35659161173 / job 106530444451.
User Impact
No production behavior change. The tests continue to verify cross-process runtime writes, receipt identity, and successor recovery without treating fixture delay as a scheduler crash.
Why This Change Was Made
Reuse the existing compiled cron fixture graph, await each child's recorded close, and report its exit code, signal, stderr, and elapsed time. A shared cleanup hook joins children before releasing their stores. The successor test still requires actual process death, and the direct persisted-state assertions and existing 90-second test budgets remain intact.
The original helper's
spawnSyncand overlappingspawnboth had independent 60-second deadlines. A deterministic 61-second completion hold reproducedETIMEDOUT,SIGTERM, and null exit status at 60.091 seconds with empty stderr. The patched helper passed that same hold in 63.289 seconds. The original hosted log omitted the signal; its three failures occurred at 62.694, 60.623, and 60.156 seconds.Evidence
Five independent contended Testbox replays passed 125 files / 1,561 tests each. Times below are seconds.
Provider:
blacksmith-testbox. Lease IDs:tbx_01m3339zn0m5dx00r6yew00d9g,tbx_01m333ay6hred5fs9a30hrxz4c,tbx_01m333bmm8ja7jsrh1177ej9z3,tbx_01m333bme2vwe5wzx6exwhz3rg,tbx_01m333bmdq3sggmpmct87g6ay8. The Crabbox command results are exit 0; lease workflow status can change during cleanup.The five runs use the original 125-file shard inventory through the native shard runner, Node 24.19.0, Vitest 5.0.0, two effective Vitest workers, and four CPU-busy processes per Testbox. Each run injects a 61-second hold after the first real
cron.runreturns, within the existingcannot overwrite runtime committed by a scheduler processcase. The receipt-identity and successor cases are unchanged. The delay is proof-only; no sleep is added to committed tests. The leases expose four CPUs; the original hosted log reported eight. Exact concurrent file-start order was not recorded, so the original inventory and native sequencing are preserved.node scripts/run-vitest.mjs --config test/vitest/vitest.cron.config.ts src/cron/service/shared-store-runtime.test.ts --maxWorkers=1.check:changedpassed on Testboxtbx_01m333bmehn24f8ppe4f9cw30x: all 25 core-test typecheck shards, static guards/dead-export scans, and changed-file lint (0 warnings, 0 errors); command exit 0.Named follow-up — warm database fixtures in
ops.test.ts: contended replays completed its 71 tests in 128.448–138.341 seconds of test time.withStateDirForStorePathand the task-registry reset repeatedly close/reopen database resources across about 28 isolated scopes. Amortize those boots while preserving task-row isolation, repeated IDs/timestamps, global task lookups, and the separate schema-repair case. This test-performance work is a follow-up, not a gate for this fix.