Repository navigation
fix(asc-register): leaderboard POST body matches Apple's actual contract - #18
Merged
Merged
Conversation
…act (#17) Closes #17. ASC apply 2026-05-20 hit HTTP 409 with 5 specific complaints about our guessed leaderboard shape. Apply the exact corrections per Apple's error response: - attribute 'scoreFormat' doesn't exist on gameCenterLeaderboards → rename to 'defaultFormatter' - 'defaultFormatter' is a STRING enum, not an object wrapping scoreRange* → flat string 'ELAPSED_TIME_CENTISECOND' - 'recurrenceRule' is a STRING, not an object with frequency/duration → flat string 'DAILY' (best guess; ASC didn't enumerate valid values, will validate on next apply) - nested scoreRangeStart/End keys were unknown attributes → removed from create body entirely; 2-hour cap stays enforced client-side per design.md §How.3.1 abandon rule Design decision recorded by Leader + user 2026-05-20: Apple's elapsed time formatters max at ELAPSED_TIME_CENTISECOND (1/100 sec, 2 decimals). design.md §How.3.1 amended from mm:ss.SSS to mm:ss.SS, 毫秒 to 百分秒, upper cap 7_200_000 ms to 720_000 cs. Internal PersonalRecord retains ms precision (no internal loss); ms→cs conversion belongs at the LiveGameCenterClient submit boundary — that conversion is NOT in this PR because the protocol currently takes elapsedSeconds: Int (no ms input path exists yet). Subagent flagged this as a separate gap for follow-up (will file as new issue). 5 of 7 UNCONFIRMED markers in ASCRegister now resolved: - Config.scoreFormatType (now defaultFormatter): RESOLVED - Config.recurrenceDurationDays (now recurrenceRule): RESOLVED - ASCClient.createLeaderboard type/recurrence: RESOLVED - ASCClient.createLeaderboard scoreRange fields: RESOLVED (removed) - 2 remaining UNCONFIRMED untouched (gameCenterDetail endpoint + listLeaderboards relationship — both confirmed working on apply happy path; markers retained for documentation honesty) Verified: - swift build: 0 warnings - swift test: 342/342 in 65 suites (was 340; +2 ConfigConsistency assertions for defaultFormatter and recurrenceRule) Per AI Collaboration Mode + agent-impl-notes-log: subagent maintained impl-notes at meetings/2026-05-20_asc-leaderboard-api-shape.impl-notes.md with §未決 capturing the recurrenceRule = 'DAILY' guess for Leader validation on next apply.
wei18
added a commit
that referenced
this pull request
Jun 16, 2026
…nv block (#538) Marks #18 (board chrome vs row0 safe-area) pass: chrome bottom y=201 < board row0 top y=218, no overlap, content below the Dynamic Island. Annotates #4 (ResumePill clause) / #19 / #20 as blocked by the signed-out simulator: latestInProgress() returns nil by #515 graceful-degrade design when iCloud is signed out, so no ResumePill renders — these need an iCloud-signed-in sim to verify. Now 21 pass / 0 fail / 22 pend. Co-authored-by: Claude Opus 4.8 <[email protected]>
wei18
added a commit
that referenced
this pull request
Jun 17, 2026
…es filed) (#542) Records this session's drivable-case sweep on the current sim: - pass: #5 rapid double-tap Leave, #28 zh-Hant strings (+ earlier #1/#2/#10/ #18/#25/#39 from #536 work) - fail: #22 Dynamic-Type header clip (#540), #34 timer accrues background time (#539) - pend w/ findings: #8 (near-win harness can't model home-return), #23 (digit-pad frames ≥44pt but glyphs render blank, #540), #29 (no tofu, but Purchases section unlocalized, #541) New issues: #539 (solve timer counts background time — leaderboard fairness), #540 (Dynamic Type AX3+ header/digit-pad breakage), #541 (Purchases/IAP section unlocalized; L10n gate misses catalog-less literals). Co-authored-by: Claude Opus 4.8 <[email protected]>
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 #17. Per ASC's 409 response:
scoreFormat→defaultFormatter(stringELAPSED_TIME_CENTISECOND);recurrenceRule→ stringDAILY(best guess); nested scoreRange fields dropped. design.md §How.3.1 amended to centisecond precision. 342/342 tests. impl-notes at meetings/2026-05-20_asc-leaderboard-api-shape.impl-notes.md.§未決 ITEM:
recurrenceRule = "DAILY"is a guess; will validate on next apply.🤖 Generated with Claude Code