Skip to content

test(shared): compare overnight recurrence slots by timestamp - #9658

Open
PresentJay wants to merge 1 commit into
ParadevAI:mainfrom
PresentJay:test/macos-rrule-instants
Open

PresentJay wants to merge 1 commit into
ParadevAI:mainfrom
PresentJay:test/macos-rrule-instants

Conversation

@PresentJay

@PresentJay PresentJay commented Nov 12, 2026 •

Copy link
Copy Markdown

What & why

The overnight BYHOUR regression test fails on macOS when the English date formatter puts “at” between the date and the time. The returned run times are correct. Compare all 12 UTC instants in order, including the next evening's slot and the ten-second offset inherited from DTSTART. This keeps the New York time zone and midnight boundary in the test fixture.

The failure showed up while validating #9625. This patch changes only the recurrence test.

How I tested it

  • Reproduced the date-format mismatch on macOS with Bun 1.4.3. With this change, all 53 tests in packages/shared/src/rrule.test.ts pass (108 assertions).
  • Repository lint and typecheck passed (42 typecheck tasks).
  • The default full macOS suite stopped at the unrelated five-second translation display-only source-scan timeout. The full suite is not reported as passing.

Summary by cubic

Fixes the overnight recurrence test so it passes on macOS, where the English date formatter inserts “at” between the date and time.

Compares the 12 UTC instants directly by timestamp instead of formatting them into locale-dependent strings. The New York time zone and midnight boundary stay in the fixture, and the assertions now include the next evening's slot plus the ten-second offset inherited from DTSTART.

Written for commit 3b7c73f. Summary will update on new commits.

View guided diff

Summary by CodeRabbit

  • Tests
    • Updated automated coverage for overnight recurring schedules to verify returned occurrences in UTC. The expected results now explicitly cover the sequence across two dates, helping ensure consistent checks independent of local-time formatting. No user-facing behavior changes are included in this update.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The overnight BYHOUR test now checks its 12 occurrences as UTC ISO timestamps instead of formatted New York local-time strings.

Changes: Overnight BYHOUR test

Layer / File(s) Summary
Update UTC timestamp assertions
packages/shared/src/rrule.test.ts
The test expects 12 UTC ISO timestamps, ending at October 31, 00:00 UTC.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Possibly related PRs

  • ParadevAI/Paradev#9274: Changes BYHOUR ordering and adds tests for chronological occurrence order after midnight wrap.

Suggested reviewers: saddlepaddle

Merge Risk: Minimal · up to 3b7c7

This change only makes a recurrence test independent of date formatting, so it has no runtime impact. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(shared): compare overnight recurrence slots by timestamp" matches the changeset. The only change is to the overnight BYHOUR ordering test in packages/shared/src/rrule.test.ts, which no…
Description check Passed The description covers the required template areas. The 'What & why' section explains the macOS date formatter failure, the fix, and the linked context (#9625). The 'How I tested it' section lists the…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(shared): compare overnight recurrence slots by timestamp" matches the changeset. The only change is to the overnight BYHOUR ordering test in packages/shared/src/rrule.test.ts, which now compares UTC ISO timestamps instead of formatted New York local-time strings. It follows the conventional commit format and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description covers the required template areas. The 'What & why' section explains the macOS date formatter failure, the fix, and the linked context (#9625). The 'How I tested it' section lists the reproduction on macOS with Bun 1.4.3, the passing test file, lint and typecheck results, and the unrelated full-suite timeout. It does not link an issue with a closing keyword, and the checklist items (conventional title, lint/typecheck, maintainer edits, CLA) are not marked, so the author should confirm them. These gaps are non-critical.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4fa5557b-77f1-4887-a928-68849a8e4105
Commits

Reviewing files that changed from the base of the PR and between 9b7f8b9 and 3b7c73f.

Files selected for processing: 1

  • packages/shared/src/rrule.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

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