Repository navigation
fix(cron): show running status for active paused jobs - #129339
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 10:22 AM ET / 14:22 UTC. ClawSweeper reviewWhat this changesThe PR changes cron CLI status precedence so an actively running paused job reports Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. Current main still returns Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherCron jobs store both an enabled setting and runtime execution state. The CLI combines those fields into list, show, and JSON status for operators inspecting automations. flowchart LR
A[Stored cron job] --> C[CLI status evaluation]
B[Active run marker] --> C
C --> D[List output]
C --> E[Show output]
C --> F[JSON output]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +32. Total +32 across 2 files. View PR surface stats
Review metrics
Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Keep the active-run marker first in the shared status resolver, retain the four-surface regression case, and merge after exact-head CI is green. Do we have a high-confidence way to reproduce the issue? Yes—source establishes the path: forced execution persists Is this the best way to solve the issue? Yes—the shared status resolver is the canonical owner for list, show, and JSON output, so changing its decision order avoids divergent per-renderer fixes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 712a97d2ab5c. LabelsLabel changes:
Label 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
History |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(cron): show running status for active paused jobs This is item 1/1 in the current shard. Shard 0/1. 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. |
|
Merged via squash.
|
What Problem This Solves
A paused cron job started with Run Now, or a running job paused while cancellation drains, is actively executing, but CLI list, show, and JSON output incorrectly report it as disabled.
Why This Change Was Made
The canonical CLI status owner checked the persisted enabled flag before the authoritative active-running marker. The scheduler already explicitly supports forced execution of paused jobs and preserves the running marker while cancellation is in progress. Reordering the existing owner decisions makes running status take precedence without adding production code and matches the Control UI's existing precedence.
User Impact
Operators see
runningwhile a paused job is actually executing acrosslist --all,show, individual JSON, and collection JSON output. Idle paused jobs, completed cancellation, failures, and existing non-delivery/auto-disable decorations retain their behavior.Evidence
mainwas incorporated through a history-preserving merge after the old head's unrelated stale-base CI failures.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/cli/cron-cli/shared.test.ts: 89 tests passed, including all four human/JSON status surfaces.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/cli/cron-cli/register.cron-simple.test.ts -t show: 4 actual Commandershowtests passed.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/cron/service/ops.regression.test.ts -t 'aborts and records a queued isolated job when it is': 2 real active disable/removal/cancellation lifecycle tests passed.