Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 10:59 PM ET / August 10, 2026, 02:59 UTC. ClawSweeper reviewWhat this changesThis PR lets newly due cron jobs use immediately free shared-concurrency slots while earlier scheduled jobs still run, without reserving saturated work. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer selection: current main still serializes timer batches, while this branch supplies a bounded cross-tick repair with source-backed tests and an exact-head scheduler trace. No discrete patch defect was found; exact-head CI and selection against the competing draft remain before merge. Priority: P1 Review scores
Verification
How this fits togetherCron scheduling loads due persisted jobs, records reservations, and runs them through one shared concurrency pool. This change affects how timer ticks choose work and wake overdue jobs after capacity is released. flowchart LR
A[Persisted cron jobs] --> B[Timer tick]
B --> C[Due-job selection]
C --> D[Shared run admission]
D --> E[Isolated cron execution]
E --> F[Capacity release]
F --> B
Decision needed
Why: Both branches modify the same scheduler and admission invariants; the competing branch is draft and dirty, while choosing a canonical implementation is a maintainer merge-scope decision. Before merge
Agent review detailsSecurityNone. PR surfaceSource +251, Tests +399. Total +650 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt one canonical bounded-admission repair, preferably this clean proof-positive branch after exact-head CI is green, and close or preserve the competing draft only through an explicit maintainer decision. Do we have a high-confidence way to reproduce the issue? Yes—source reproducible: current main's running guard prevents a later timer tick from collecting work, and the branch's regression tests encode the reported deferred-job sequence. Is this the best way to solve the issue? Yes—the branch repairs admission at the scheduler and shared-capacity owner, rather than merely removing the running guard or retaining unbounded waiter batches. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8430fc0e3b86. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
17f05fb to
e079919
Compare
Issue Hunter real-behavior proof
Commands and observed output
Remaining risks
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2e8d88e to
4d59b0f
Compare
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Exact-head real-behavior proof (final tip
|
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Acquire only immediately available cron slots before reserving due jobs, leave saturated rows eligible, and wake once on capacity release so watchdog rechecks cannot pile Gateway roots or unbounded waiters.
Under the bounded cross-tick admission model, sort runnable jobs by due time before taking a free-slot prefix, and skip watchdog ticks that cannot admit work once a capacity listener is already armed.
Main moved createDeferred out of service-regression-fixtures; keep the cross-tick admission tests compiling against current helpers.
e915347 to
0574d28
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing this PR as superseded by the newer bounded-admission implementation in #119195. Both PRs target the same cross-tick cron admission issue and overlap across the same seven scheduler files. #119139 is now stale/conflicting against current main; the bounded-admission/capacity-listener approach from #119195 is the better starting point for a current-main port. The scheduler fix should not be landed from either stale head unchanged; preserve #119139's earliest-due/no-op-tick ideas if they are still needed when the canonical current-main implementation is prepared. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: [Feature]: Continuously admit newly due cron jobs while earlier timer-batch jobs are still running This is item 2/3 in the current shard. Shard 51/89. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Review feedback addressed
ClawSweeper durable review on
e9153473897059f54a7836ba423264482c4b2964(Overall 4/6) blocked merge on dirty merge state (rebase onto current main) plus a fresh exact-head scheduler proof after that rebase. Competing draft #119195 remains for maintainer canonical-branch selection. This tip answers the rebase gate:origin/main— resolved conflict insrc/cron/service/ops.run-admission.test.ts(kept bounded-admission deferred gating); re-importedcreateDeferredfromtest/helpers/promise.jsafter main's helper migration.tryAcquireCronRunSlots+ capacity listener.0574d28e39337c2da5bf6df2aeb37d0ded4f6153— standalone Node/tsx proof (no vitest, no fake timers) exercises productioncreateCronServiceState+onTimerfor cross-tick concurrency, saturation non-reserve, listener-driven refill, durable marker cleanup, and earliest-due prefix admission.Focused vitest on tip
0574d28e39337c2da5bf6df2aeb37d0ded4f6153: cross-tick + ops.run-admission → 24 passed.Final PR head:
0574d28e39337c2da5bf6df2aeb37d0ded4f6153Closes #119083
What Problem This Solves
Addresses #119083: Continuously admit newly due cron jobs while earlier timer-batch jobs are still running, without unbounded saturated retention.
Why This Change Was Made
Scheduled ticks must admit only immediately free slots, leave saturated due work eligible, wake once via a capacity listener, and prefer earliest-due jobs when only a free-slot prefix exists.
User Impact
Later-due cron work can start while earlier batches still run when capacity allows; a full pool no longer stacks reserved/waiter/root work for every watchdog recheck.
Evidence
Exact-head real scheduler proof (
0574d28e39337c2da5bf6df2aeb37d0ded4f6153)Focused vitest
AI-assisted development
This change was implemented with an OpenClaw coding agent and published through a guarded human-approval workflow. The exact diff and exact-head validation evidence were verified before publication.