Repository navigation
fix(cron): prevent extra timer runs in on-exit tests - #149841
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 3:28 AM ET / 07:28 UTC (Revision 2). ClawSweeper reviewWhat this changesClears inherited timer timestamps from exit-triggered cron test fixtures so the tests exercise manual-run and observed-exit races without an unintended scheduled run. Merge readiness✅ Ready for maintainer review The fixture repair remains useful on current main and preserves the existing race coverage. No actionable patch defects were found; this maintainer-authored PR is not a cleanup candidate. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s cron service accepts scheduled jobs, manual runs, and observed command exits. These tests exercise its durable run reservations and verify that competing executions, cancellation, and rearming preserve ownership. flowchart TD
A[Test job fixtures] --> B[Cron service]
C[Manual run] --> B
D[Observed command exit] --> B
B --> E[Durable run reservation]
E --> F[Payload execution]
F --> G[Settlement and ownership assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +9. Total +9 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the event-driven fixtures consistent with normal job creation while retaining the existing receipt-settlement race assertions. Do we have a high-confidence way to reproduce the issue? Yes for the fixture mismatch: current main supplies a due timer timestamp to event-driven jobs, making them eligible for unrelated scheduled admission. The historical third-call interleaving was not reproduced during this read-only review. Is this the best way to solve the issue? Yes. Correcting the fixture state matches the existing schedule contract and preserves the meaningful concurrency checks without weakening assertions or changing runtime behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 05a5bd1c19b7. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
What Problem This Solves
Fixes an unintended timer run in the on-exit receipt-settlement tests, which can make the competing-manual-run case observe three runner calls instead of two.
User Impact
No product behavior changes. These tests now exercise the intended manual-run and observed-exit race without also admitting a scheduled timer run.
Why This Change Was Made
Both directly persisted on-exit fixtures inherited a due
nextRunAtMsfrom the timed-job helper. Event-driven schedules have no timer slot. Clear that inherited state and check its absence before observed-exit reservation. Keep the real timers, deadlines, deferred ordering, atomic receipt assertions, exact runner counts, payload updates, cancellation and rearm checks.Evidence
git diff --checkpass.facff0ee4201f80f71c2c98d1f628cc29911cc7bin tested mergec9c08bd5b08d7cdc875d6393b092ea43453c8267(tree0ce69e123f8ac6800f58b155b811fe12811b0ff9). Full CI and current-head review are still pending.