Repository navigation
fix(tray): a cron job stays marked running after the gateway says it is not - #1666
Conversation
The page latches a job as running when its scheduled time passes before lastRunAtMs changes. That latch cleared only when lastRunAtMs changed or the job disappeared. A later list can leave runningAtMs at zero, move nextRunAtMs forward, and keep the same last run. The row stayed disabled. Clear the latch when the gateway reports no running time and the next run has moved forward. CronRunningLatchTests passed 4. ./build.ps1 exit 0. Shared 4262 passed, 33 skipped. Tray 3994 passed. Signed-off-by: Sebastien Tardif <[email protected]>
|
🦞👀 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. |
|
Codex review: needs maintainer review before merge. What this changesClear a Cron job’s running indicator when the gateway reports it idle and advances its next scheduled run. Example: Job idle1666stub reports runningAtMs=0, unchanged lastRunAtMs, and nextRunAtMs advancing from 1700000000000 to 1700003600000.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a stale running state that remains on current main, with no introduced correctness or security defect found; maintainer-engaged landing work should continue. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Windows Cron page consumes gateway cron.list state, reconciles its local running-job set, and projects that state into badges and job controls. flowchart LR
A[Gateway cron list] --> B[Cron page parser]
B --> C[Running latch reconciliation]
C --> D[Running job set]
D --> E[Action buttons and badge]
Technical reviewBest possible solution: Land the focused idle-state reconciliation through the existing running-state owner. Do we have a high-confidence way to reproduce the issue? Current-main source retains an inferred running latch when runningAtMs is zero, lastRunAtMs is unchanged, and nextRunAtMs advances; supplied current-head UI diagnostics exercise that transition. Is this the best way to solve the issue? The narrow condition corrects local reconciliation without weakening protection for a positive running timestamp or introducing a competing state owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8e8888fed47a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 14, 2026, 10:41 PM ET / October 15, 2026, 02:41 UTC (Revision 5). |
Signed-off-by: Sebastien Tardif <[email protected]>
|
Global triage: NEEDS_HUMAN_TEST. Take confidence 55%; recommendation confidence 97%; effort small; risk medium. Reviewed exact head Maintainer or proof-pool owner: run every declared Windows proof pool at this exact head and replace blocked or historical evidence with current-head results. This is a triage classification, not a merge action. No branch changes were made. |
|
Thanks for the volume of careful bug-finding and proof here. We are actively processing this queue and have landed several of your focused fixes, but 40 concurrent open PRs is beyond the maintainer review capacity even when individual patches are good. Please pause opening new PRs for now and identify the three existing branches you consider highest priority. We will keep working through small, independent, high-confidence fixes first. Additional discoveries should be filed as issues until the active queue is below roughly five PRs. Please also keep each branch to one behavior and squash CI-only retrigger commits when updating a branch. This is queue management, not a request to stop contributing. The focused fixes and concrete validation are valuable; limiting work in flight will help us review and land them faster. |
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4d3c001c-1771-40bf-8817-777a4e08e9c0
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4d3c001c-1771-40bf-8817-777a4e08e9c0
Preserve both cron timezone editing and the running-state latch behavior added by openclaw#1666. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f66f0e00-0c9b-4632-8bc4-9dae1cd81754
What Problem This Solves
Fixes: a cron job stays marked running after the gateway says it is not, so Remove, Edit, Run Now, and the enable toggle stay disabled.
User Impact
User impact: when the gateway reports no running time and genuinely advances the next run, the job's actions become available again. Active jobs and jobs with unchanged, missing, or regressed schedules stay latched.
Why This Change Was Made
The page latches a job as running when its scheduled time passes before
lastRunAtMschanges. That latch previously cleared only whenlastRunAtMschanged or the job disappeared. The gateway can instead reportrunningAtMsas zero and movenextRunAtMsforward while leaving the same last-run value. This change clears only that completed idle transition.Evidence
Current head:
b852d38f407c701334262f08832fc73f706cec77.Focused predicate coverage passed for all required boundaries:
An isolated ARM64 WinUI run connected to the repository fixture Gateway and received three
cron.listsnapshots for the same row. The first established the expired next-run value, the second kept that value and visibly latched the row as Running with its toggle disabled, and the third keptrunningAtMs=0while advancingnextRunAtMsby one hour. The Running badge disappeared and the row toggle became enabled. The fixture report recordedoutcome: passed,appResponding: true, and app version stamped with exact headb852d38f.Rubber-duck review found no blocking issue. Its suggested missing and regressed next-run guard cases were added. The low-value source-string assertion identified during maintainer review was removed, leaving only behavioral predicate tests and live UI proof.
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: isolated current-head WinUI proof shows the latched row becoming actionable after the fixture Gateway advances the next run while reporting no running time.Validation
.\build.ps1: passed. Shared, CLI, WinNodeCli, SetupEngine, and WinUI built successfully for ARM64.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: passed, 4311 passed, 36 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: passed, 4014 passed, 0 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter FullyQualifiedName~CronRunningLatchTests: passed, 3 passed, 0 failed.cron.listsnapshots against the exact-head app without modifying the shipped app code.Real Behavior Proof
b852d38f407c701334262f08832fc73f706cec77.GatewayFixtureRun, navigated to Cron, supplied an expired unchanged idle schedule to latch the row, then suppliedrunningAtMs=0withnextRunAtMsadvanced by one hour.Runningand disabled the row toggle. The advanced idle snapshot removedRunningand enabled the toggle. The fixture recorded three successfulcron.listrequests and no unexpected requests.Security Impact
Yes, explain the risk and mitigation: N/ACompatibility and Migration
Review Conversations