Repository navigation
fix(cron): one-shot details omit seconds and milliseconds - #197791
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. |
|
Codex review: needs maintainer review before merge. What this changesShow seconds and milliseconds for one-shot schedules in CLI details while preserving compact schedule summaries. Example: Inspect a job scheduled at 2030-02-15T12:34:56.789Z with openclaw cron show.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current CLI display defect with a focused change, sufficient production CLI proof, passing head CI, and no actionable findings. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe cron and automations command aliases read jobs from the Gateway and send human-readable details through a shared formatter; JSON output uses a separate branch. flowchart TD
A[Cron or automations CLI] --> B[Gateway job lookup]
B --> C[Human details]
B --> D[JSON output]
C --> E[Shared schedule formatter]
E --> F[Full UTC timestamp]
Technical reviewBest possible solution: Merge the existing formatter change to preserve exact one-shot times in details while retaining compact summaries. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically truncates the timestamp, and supplied baseline CLI output demonstrates the same failure through both aliases; no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete fix using the existing formatter, preserves normalization and sanitization, and strengthens existing rendering cases without adding scaffolding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b46197029a3a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +2, Tests 0. Total +2 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 (1 earlier review cycle)
Reviewed November 12, 2026, 11:08 AM ET / 16:08 UTC (Revision 2). |
|
Proof on the built CLI ( Main, both rounds: two jobs at different seconds look the same in Candidate, both rounds: the full stored time shows: Controls
Candidate checks: |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…97791) fix(cron): show the full one-shot time in cron and automations details openclaw cron show and automations show formatted a one-shot job's at time to the minute, so jobs at different seconds in the same minute looked identical. The detail view now shows the configured time with seconds and milliseconds. The compact cron list row, --json output, stored schedules, and cron-expression and repeating schedules are unchanged. No new text. Evidence: the built CLI against an isolated Gateway with cron disabled, two disabled one-shot jobs at 12:34:12.321Z and 12:34:45.678Z, main twice and candidate twice. On main both details show 12:34Z; with this change they show 12:34:12.321Z and 12:34:45.678Z. The list row, --json, stored schedules and repeating jobs are the same on both; a whole-minute job shows 12:34:00.000Z. Net test lines 0. Details: openclaw#197791 (comment). Closes openclaw#197789. Thanks @Malpin07. Co-authored-by: Ayaan Zaidi <[email protected]>
Closes #197789
What Problem This Solves
Fixes one-shot schedule details losing their configured seconds and milliseconds in
automations showandcron show.User Impact
Users can distinguish one-shot jobs scheduled at different times within the same minute. Compact list output, stored schedules, JSON output, and execution behavior remain unchanged.
Why This Change Was Made
Use the existing schedule formatter's full UTC timestamp for the detail view while retaining minute precision for summaries.
Evidence
Reproduced through the built CLI and an isolated local Gateway at
a41c7111, then checked the same workflow at7a6226b2. Three jobs were disabled system-event jobs; scheduling and delivery were not exercised.schedule.atschedule:schedule:2030-02-15T12:34:12.321Zat 2030-02-15 12:34Zat 2030-02-15 12:34:12.321Z2030-02-15T12:34:56.789Zat 2030-02-15 12:34Zat 2030-02-15 12:34:56.789Z2030-02-15T12:34:00.000Zat 2030-02-15 12:34Zat 2030-02-15 12:34:00.000ZBoth command aliases agree. List rows retain
at 2030-02-15 12:34Z; JSON retains each original timestamp. Each run completed 14 CLI calls with exit 0 and cleaned up the isolated Gateway and temporary state.Reproduction and local checks
With an isolated Gateway and
cron.enabled=false:src/cli/cron-cli/shared.test.ts.--maxWorkers=1.pnpm buildpasses on both the baseline (647.643 s) and final commit (543.037 s); final build metadata matches7a6226b22099c27165c7610923b31b844d8eec9e.Observed final-head stdout excerpt for job
3a23b5b4-7614-456e-b909-0a1031fbece0:The corresponding JSON contains
"schedule":{"kind":"at","at":"2030-02-15T12:34:56.789Z"}. Before the change, the same configured time producedschedule: at 2030-02-15 12:34Z.