Skip to content

fix(asc-register): sortOrder ASC + submissionType BEST_SCORE - #21

Merged
wei18 merged 1 commit into
mainfrom
fix/asc-leaderboard-sort-submission
May 20, 2026
Merged

wei18 merged 1 commit into
mainfrom
fix/asc-leaderboard-sort-submission

Conversation

@wei18

@wei18 wei18 commented May 20, 2026

Copy link
Copy Markdown
Owner

Closes #19. Round 2 ASC API shape fix.

  • scoreSortType: ASCENDING → ASC (ASC enum requires ASC/DESC; semantic unchanged)
  • submissionType: new required attribute = BEST_SCORE (sudoku domain: keep best time)

344/344 tests. §未決: BEST_SCORE is a best guess; ASC didn't enumerate valid values. Leader validates on next apply round.

impl-notes: meetings/2026-05-20_asc-leaderboard-sort-submission.impl-notes.md

🤖 Generated with Claude Code

…CORE (#19)

Closes #19. Round 2 of ASC API shape iteration:

- scoreSortType: 'ASCENDING' rejected by ASC → 'ASC' (semantic unchanged,
  still lower=better matching design.md §How.3.1 'Low to High')
- submissionType: required attribute, ASC's 409 didn't enumerate valid
  values. Best guess 'BEST_SCORE' chosen for sudoku domain (keep personal
  best; new worse times shouldn't pollute the record). Alternate fallback
  'BEST' documented in impl-notes §未決.

Tests 342 → 344 (+2 ConfigConsistency assertions, one per new field).
0 warnings.

Impl-notes: meetings/2026-05-20_asc-leaderboard-sort-submission.impl-notes.md
@wei18
wei18 merged commit 808335b into main May 20, 2026
@wei18
wei18 deleted the fix/asc-leaderboard-sort-submission branch May 20, 2026 07:27
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
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.

ASCRegister apply round 2 — scoreSortType invalid + submissionType missing

1 participant