Skip to content

Describe a repeated minute in a routine's schedule once - #803

Open
kevin9327 wants to merge 1 commit into
CopilotKit:mainfrom
kevin9327:describe-cron-dedupe-minutes
Open

kevin9327 wants to merge 1 commit into
CopilotKit:mainfrom
kevin9327:describe-cron-dedupe-minutes

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

What this changes

describeCron renders a comma list of plain minutes on one hour as "Every day at …", but it did not de-duplicate the minutes. cron-parser fires once per distinct minute, so 0,30,0 9 * * * runs at 09:00 and 09:30, yet the routines page and the model were told:

Every day at 09:00, 09:00 and 09:30

weekdays() in the same file already de-duplicates (0,7 is said once as "Sundays"); the minute list now does the same with a Set before sorting.

Where it runs

  • New state that outlives a request? None. Pure formatting.
  • What happens on the second replica? Nothing new.
  • Anything serialised? None.
  • Anything fanned out to a browser? None.
  • New listener, port, or schedule? None.

Boundary and audit

  • Every acting call still goes through the gateway. Untouched.
  • New refusals and new failures each write a row. None added.
  • Nothing new is trusted from the client.

Changelog

  • A section in CHANGELOG.md under Unreleased, at the top; happy to rebase if it conflicts.

Proof

New case in server/tests/routine-schedule.test.ts. On unmodified main:

Expected: "Every day at 09:00 and 09:30"
Received: "Every day at 09:00, 09:00 and 09:30"
(fail) describeCron > a repeated minute in the list is described once

After the fix: 29 pass, 0 fail. Biome check clean on the changed files.

AI assistance: this change was prepared with an AI coding assistant and reviewed and tested by me.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-17T22:48:31.272060Z db54213 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant