test: speed up Docker scheduler coverage#99988
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 10:27 AM ET / 14:27 UTC. Summary PR surface: Tests +5. Total +5 across 1 file. Reproducibility: not applicable. as a test-performance cleanup rather than a product bug. Current source shows the parent-signal proof exercises the real 10s shutdown grace, and the PR body provides before/after timing evidence. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow test-only speedup after required CI finishes green, while keeping the production 10s scheduler shutdown grace and the existing 27-case coverage intact. Do we have a high-confidence way to reproduce the issue? Not applicable as a test-performance cleanup rather than a product bug. Current source shows the parent-signal proof exercises the real 10s shutdown grace, and the PR body provides before/after timing evidence. Is this the best way to solve the issue? Yes. The patch accelerates only the disposable spawned proof process before importing the real scheduler module, which is narrower than changing production grace constants or dropping coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 11eeba972f46. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +5. Total +5 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Land-ready verification for
Known proof gaps: none for this test-only change. |
|
Merged via squash.
|
What Problem This Solves
test/scripts/docker-all-scheduler.test.tsspent more than ten seconds of each run waiting through the production shutdown grace in one parent-signal proof. That made this 27-case file the second-slowest measured tooling test despite the behavior itself being deterministic.Why This Change Was Made
Scale
Date.nowonly inside the disposable spawned proof process before it imports the real scheduler module. The production 10-second grace and implementation remain unchanged; the test still drives the real SIGTERM, grace polling, SIGKILL escalation, descendant cleanup, second-command suppression, and exit-143 path.All 27 cases were audited. Each protects a distinct CLI, scheduler admission, artifact, log-bound, timer-clamp, process-tree, or operator-policy contract, so none were removed.
User Impact
No runtime behavior changes. The focused test is 55.6% faster locally and 73.2% faster on Linux, with lower local peak RSS and identical behavioral coverage.
Evidence
tbx_01kwpqmcbfszdwxzk18xae9t5e, Actions run https://github.com/openclaw/openclaw/actions/runs/28708869458check:changed: Testboxtbx_01kwpqqf7cyvdh1rvtybhpz06q, Actions run https://github.com/openclaw/openclaw/actions/runs/28708913375, exit 0pnpm test:changed— 27/27 passpnpm format:check test/scripts/docker-all-scheduler.test.ts— passgit diff --check— passRelated: #57266