Skip to content

ASC apply round 5 — recurrenceStartDate future-only + recurrenceRule needs RFC 5545 RRULE #26

Closed

Description

@wei18

Status

Round 5 of apply. Two new ASC rules surfaced:

```

  1. ENTITY_ERROR.RECURRENCE_START_CANNOT_BE_PAST
    recurrenceStartDate: Recurring leaderboard start can not be in the past.
  2. ENTITY_ERROR.RECURRENCE_RULE_INVALID
    recurrenceRule: 'DAILY' is not valid.
    Format must be 'FREQ=[MINUTELY,HOURLY,DAILY];INTERVAL=$INT'
    ```

Apple uses iCalendar RFC 5545 RRULE syntax, not plain "DAILY".

Fix

  1. `Config.swift`: `recurrenceRule` value `"DAILY"` → `"FREQ=DAILY;INTERVAL=1"`.

  2. `Config.swift`: `currentRecurrenceStartDateUTC()` → `nextRecurrenceStartDateUTC()`. Compute tomorrow UTC 00:00 (i.e. today UTC 00:00 + 86400 seconds), not today's. Apple rejects past dates even at the millisecond level.

  3. `ConfigConsistencyTests.swift`: update `recurrenceRule` assertion to `"FREQ=DAILY;INTERVAL=1"`.

  4. `RecurrenceStartDateTests.swift`: rename + update tests — given a fixed `Date`, the formatter returns next-day UTC 00:00. Edge case: when called at exactly 23:59 UTC, the result must be ≥ 1 second in the future.

Risk

`FREQ=DAILY;INTERVAL=1` per the spec hint. If ASC accepts the syntax but the leaderboard doesn't reset as expected, we'll learn that empirically post-merge.

Discovery

Via `swift run ASCRegister apply` 2026-05-20 round 5.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions