Repository navigation
fix(asc-register): RRULE format + strictly-future recurrenceStartDate - #27
Merged
Merged
Conversation
…#26) Closes #26. ASC apply round 5 returned 2 errors: 1. recurrenceRule: 'DAILY' invalid. Format must be 'FREQ=[MINUTELY,HOURLY,DAILY];INTERVAL=$INT' 2. recurrenceStartDate: Recurring leaderboard start can not be in the past Apple uses iCalendar RFC 5545 RRULE syntax + strict future-only start. Changes: - recurrenceRule: 'DAILY' → 'FREQ=DAILY;INTERVAL=1' (RFC 5545) - currentRecurrenceStartDateUTC() renamed to nextRecurrenceStartDateUTC(). Algorithm: UTC calendar floor → if today midnight <= now, add 86,400s (tomorrow midnight); else today midnight (defensive). Result is strictly > input in every call. - Old RecurrenceStartDateTests deleted; new NextRecurrenceStartDateTests covers mid-day/exact-midnight/late-night/month-boundary/strictly-after audit (5 tests). Tests 350 → 352. 0 warnings. §未決 (logged): empirical validation of FREQ=DAILY;INTERVAL=1 cycle reset window — won't know until apply succeeds and we observe ASC's behavior at UTC midnight rollover.
wei18
added a commit
that referenced
this pull request
May 20, 2026
…dary (#30) Wire the elapsedSeconds × 100 conversion required by design.md §How.3.1 (ASC ELAPSED_TIME_CENTISECOND formatter, locked in by PR #17 + #21 + #23 + #25 + #27 ASCRegister API shape iterations). - LiveGameCenterClient.submitScore: compute Int64(elapsedSeconds) × 100; pass to SubmitScoreHook (default no-op for backward-compat). Public protocol signature unchanged — callers (GameCenterSink, Sink adapter) pass elapsedSeconds verbatim. - LiveGameCenterClientSubmitTests (NEW, 3 tests): - 251s → 25100cs - 0s → 0cs - 7200s (2h cap) → 720_000cs (matches §How.3.1 abandon rule) - Uses SubmitSpy actor to assert the conversion + leaderboard ID via LeaderboardIDs lookup, no GKLeaderboard wiring needed yet. Files NOT modified (verified clean): - GameCenterSink.swift — Int passthrough, no double-convert risk - GameStateTelemetryAdapter.swift — Int passes through - design.md §How.3.1 — already correct (× 100, mm:ss.SS, centisecond) - AppComposition/Live.swift — default-arg init means no call-site change Tests 352 → 355 (+3). 0 warnings. §未決 (2 deferred to Phase 10): live GKLeaderboard wiring + composition-root hook injection. Conversion itself locked by spy test. impl-notes: meetings/2026-05-20_submit-score-centisecond.impl-notes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #26. Round 5 fixes — recurrenceRule = FREQ=DAILY;INTERVAL=1 (RFC 5545); recurrenceStartDate = next UTC midnight strictly > now (was current UTC midnight, which Apple rejected as past). 352/352. 🤖 Claude Code