Skip to content

fix(cron): show running status for active paused jobs - #129339

Merged
steipete merged 2 commits into
mainfrom
codex/qa-cron-paused-running-status-20260825
Aug 26, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/qa-cron-paused-running-status-20260825

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

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 running while a paused job is actually executing across list --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

  • The existing maintainer-authored fix and original commit are preserved; current main was 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 Commander show tests 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.
  • Total focused proof: 95 passing tests. Exact-file lint and formatting passed; two independent full-diff reviews reported no actionable findings.
  • Production delta: +3/-3 lines, net 0.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 13:16
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 10:22 AM ET / 14:22 UTC.

ClawSweeper review

What this changes

The PR changes cron CLI status precedence so an actively running paused job reports running rather than disabled.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. Current main still returns disabled before inspecting the active-run marker, while this PR makes the shared status owner report running; the focused regression covers list, show, and both JSON shapes. Exact-head CI failures still need resolution before merge.

Priority: P2
Reviewed head: 678dfb68a415441338f6ef7aff2d3a46d80cc0c0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a focused owner-boundary repair with appropriate rendering coverage; CI must still be green before merge.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor real-behavior-proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor real-behavior-proof gate.
Evidence reviewed 5 items Current-main defect: Current main checks enabled before state.runningAtMs, so an active paused job is rendered as disabled.
Runtime owner contract: Cron run activation persists runningAtMs; the existing scheduler integration test proves a disabled forced run retains that marker while executing.
Shared caller coverage: The list command sends both human and collection JSON output through the shared status helpers, while show uses the same owner for human and single-job JSON output.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw cron list --help

Result: PASS (completed)

pnpm openclaw cron list --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129339-nzzQCy/target$ pnpm openclaw cron list --help
$ node scripts/run-node.mjs cron list --help
pnpm openclaw cron list --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 110.76 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 14.4s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 4394ms (slowest: built plugin control-plane loads 3609ms)
│
◇

OpenClaw 2026.8.1 (678dfb6) — All your chats, one OpenClaw.

Usage: openclaw cron list [options]

List automations

Options:
  --agent ‹id›           Filter by agent id
  --all                  Include disabled jobs (default: false)
  --expect-final         Wait for final response (agent) (default: false)
  -h, --help             Display help for command
  --json                 Output JSON (default: false)
  --password ‹password›  Gateway
… output truncated …

Assertions:

  • PASS expect_output: Usage:

How this fits together

Cron 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]
Loading

Before merge

  • Complete next step (P2) - The maintainer label and unresolved required CI failures require maintainer verification; there is no concrete patch defect for an automated repair lane.
Agent review details

Security

None.

PR surface

Source 0, Tests +32. Total +32 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 1 37 5 +32
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 40 8 +32

Review metrics

Metric Value Why it matters
Production versus test delta production +3/-3 (net 0); tests +37/-5 The repair changes only decision order and adds regression coverage across all affected renderers.

Merge-risk options

  • Exact-head CI has failing required checks; the supplied context contains no failure logs, so whether they relate to this focused patch remains unproven.

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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 runningAtMs, but current main returns disabled before reading it. This read-only review did not execute the reproduction.

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.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This corrects misleading operator-visible cron status with a bounded CLI blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor real-behavior-proof gate.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main blame attributes the status ordering to Peter Steinberger, and the same contributor authored the focused repair. (role: current status-path contributor; confidence: medium; commits: 33369faa27, 678dfb68a415; files: src/cli/cron-cli/shared.ts, src/cli/cron-cli/shared.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve or explain the exact-head required CI failures and obtain a green merge gate.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-25T13:22:42.009Z sha 678dfb6 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T13:39:53.300Z sha 678dfb6 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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.

@steipete
steipete merged commit f498727 into main Aug 26, 2026
138 checks passed
@steipete
steipete deleted the codex/qa-cron-paused-running-status-20260825 branch August 26, 2026 17:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant