Skip to content

fix(asc-register): recurrence fields + inspect subcommand - #23

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

wei18 merged 1 commit into
mainfrom
fix/asc-leaderboard-recurrence-fields

Conversation

@wei18

@wei18 wei18 commented May 20, 2026

Copy link
Copy Markdown
Owner

Closes #22. ASC apply round 3 fix + new inspect diagnostic command.

What ships

Recurrence: recurrenceStartDate (UTC midnight ISO 8601 computed at apply time) + recurrenceDuration (P1D)

inspect subcommand: GETs an existing leaderboard's full attribute set via vendorIdentifier lookup. Breaks the iterative 4xx loop — one run reveals Apple's complete schema.

swift run ASCRegister inspect --key <p8> --key-id <id> --issuer <id> --app-id <id> --leaderboard test.bootstrap.delete

Tests

350/350 (+6 over previous 344). 0 warnings.

§未決

  • recurrenceStartDate shape may need adjusting if ASC round 4 rejects (alt: date-only, epoch ms)
  • inspect-for-achievements deferred (not requested in scope)

🤖 Generated with Claude Code

…pect subcommand (#22)

Closes #22. ASC apply round 3 surfaced 2 more required attributes;
add them + a new diagnostic subcommand to stop iterating blindly.

Concern A: recurrence fields
- recurrenceDuration = 'P1D' (ISO 8601, 1 day) per design.md §How.3.1
- recurrenceStartDate computed at apply time: today's UTC 00:00 in
  yyyy-MM-dd'T'00:00:00Z shape via POSIX DateFormatter
- Both passed as plain strings at the top of attributes (not nested)

Concern B: ASCRegister inspect subcommand
  swift run ASCRegister inspect \
    --key <p8> --key-id <id> --issuer <id> --app-id <id> \
    --leaderboard <vendor-id>

GETs an existing leaderboard by vendorIdentifier and prints every
attribute Apple returns. Use case: user has dummy 'test.bootstrap.delete'
in their tenant; one inspect run reveals Apple's complete required+
optional schema, ending the whack-a-mole loop.

Tests 344 → 350: 1 recurrenceDuration + 3 RecurrenceStartDate UTC-floor
tests + 2 InspectArgumentParsing tests. 0 warnings.

impl-notes: meetings/2026-05-20_asc-leaderboard-recurrence-fields.impl-notes.md

§未決: recurrenceStartDate wire shape guess (might need date-only or
epoch ms); inspect-for-achievements deferred.
@wei18
wei18 merged commit 59e762b into main May 20, 2026
@wei18
wei18 deleted the fix/asc-leaderboard-recurrence-fields branch May 20, 2026 07:49
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
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]>
wei18 added a commit that referenced this pull request Jun 17, 2026
…ed (#550)

Both flip after #540 (dynamicTypeSize cap) shipped + sim-verified at AX5:
#22 board header no longer clips off the left edge; #23 digit pad 1-9 now
render visibly. Now 29 pass / 1 fail / 14 pend.

Co-authored-by: Claude Opus 4.8 <[email protected]>
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.

ASC apply round 3 — recurrenceStartDate + recurrenceDuration required

1 participant