fix(cli): clarify --tz help text for offset-less --at values#69975
Conversation
Greptile SummaryThis PR updates the CLI help text for Confidence Score: 5/5Safe to merge — documentation-only changes with no functional impact. Both No files require special attention. Reviews (1): Last reviewed commit: "fix(cli): clarify --tz help text for off..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 587eafa58e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .option("--tz <iana>", "Timezone for cron expressions (IANA)", "") | ||
| .option( | ||
| "--tz <iana>", | ||
| "Timezone for interpreting --cron expressions and offset-less --at datetime strings (IANA, default: UTC)", |
There was a problem hiding this comment.
Remove incorrect UTC default from --tz help text
The new help text says --tz defaults to UTC for interpreting both --cron and offset-less --at, but cron expressions without tz are actually evaluated in the host timezone (see resolveCronTimezone in src/cron/schedule.ts, which falls back to Intl.DateTimeFormat().resolvedOptions().timeZone). This can mislead users into omitting --tz and getting local-time cron execution instead of UTC, so the wording should not claim a UTC default for --cron behavior.
Useful? React with 👍 / 👎.
af0be1d to
3c3816b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c3816be7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .option("--tz <iana>", "Timezone for cron expressions (IANA)") | ||
| .option( | ||
| "--tz <iana>", | ||
| "Timezone for interpreting --cron expressions and offset-less --at datetime strings (IANA, default: UTC)", |
There was a problem hiding this comment.
Remove UTC default claim from cron edit --tz help
This help text now states that --tz defaults to UTC, but cron schedules without tz are evaluated in the host timezone (resolveCronTimezone in src/cron/schedule.ts falls back to Intl.DateTimeFormat().resolvedOptions().timeZone). In cron edit, that mismatch can cause users to omit --tz while changing --cron and get local-time execution instead of UTC, so the wording should avoid claiming a UTC default for cron behavior.
Useful? React with 👍 / 👎.
|
Status update as of 2026-04-23: this is the active clean respin for #59456, the issue/PR links are now corrected, and the current checks are green. If the help-text-only scope looks right, I would appreciate maintainer review on this version. |
|
Related work from PRtags group Title: Open PR duplicate: cron --tz help text clarification for offset-less --at
|
|
Codex review: needs real behavior proof before merge. Latest ClawSweeper review: 2026-05-20 09:39 UTC / May 20, 2026, 5:39 AM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows the PR adds a combined PR rating Rank-up moves:
What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Refresh the branch so Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows the PR adds a combined Is this the best way to solve the issue? No, not as written. The narrow help-text direction is good, but recurring cron defaults and offset-less one-shot Label justifications:
Full review comments:
Overall correctness: patch is incorrect What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 110042d840bb. |
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
3c3816b to
a9bfdc2
Compare
Summary
--tzhelp text incron addandcron editto say it applies to both--cronexpressions and offset-less--atvaluescron edit --athelp text withcron addso the--tzbehavior is discoverable from both commandsWhy
The previous
--tzwording implied it only affected cron expressions. In practice, it also affects offset-less--atvalues such as09:00, so the old help text was incomplete and easy to misread.This PR is a clean replacement for #59487 with only the intended CLI help-text scope.
User Impact
Users reading
openclaw cron add --helporopenclaw cron edit --helpget a more accurate explanation of when--tzapplies, including the Gateway-host local timezone default.Root Cause
The CLI help text drifted from the actual behavior: runtime scheduling already uses
--tzfor offset-less--atvalues, but the exposed help text still described it as cron-only.Validation
git diff --checknode scripts/run-vitest.mjs src/cli/cron-cli.test.ts(92 tests)Real behavior proof
Behavior or issue addressed: The repaired help text documents that offset-less
cron add --atandcron edit --atvalues use--tz, while cron expressions still default to the Gateway host local timezone.Real environment tested: Repaired OpenClaw source checkout at
a9bfdc2884e67c7032189767a5a5d8372ef2a792, Nodev26.0.0, with repository dependencies available from the local full checkout.Exact steps or command run after this patch: Emitted the actual registered Commander help for
cron addandcron editfrom the repaired source CLI registration withnode --import tsx.Evidence after fix: Terminal output from the repaired source help probe:
Observed result after fix: The copied live output shows
cron add --attells users to use--tzfor offset-less datetimes,cron edit --atnow says offset-less values use--tz, and both--tzhelp entries preserve the Gateway-host local timezone default.What was not tested: No known gaps for this help-text-only change; full packaged CLI startup was not used because this local shell lacks global
pnpm, so the proof used the repaired source command registration directly.Related