Repository navigation
Description
Status
After #19 merged, ASC apply round 3 still 409 — two new required attributes surfaced:
```
status: 409 path: /v1/gameCenterLeaderboards
errors:
- ENTITY_ERROR.ATTRIBUTE.REQUIRED
recurrenceStartDate: You must provide a value for the field 'recurrenceStartDate' - ENTITY_ERROR.ATTRIBUTE.REQUIRED
recurrenceDuration: You must provide a value for the field 'recurrenceDuration'
```
`scoreSortType="ASC"` + `submissionType="BEST_SCORE"` both accepted.
We're playing whack-a-mole with ASC's required attributes (each apply round surfaces a new pair). Time to break the loop.
Fix
Two new fields
Per design.md §How.3.1: "Recurrence 設定: Start Date = 發版當日 UTC 00:00;Duration = 1 day".
- `recurrenceStartDate`: ISO 8601 datetime string. Use today's UTC 00:00 (computed at apply time, not hardcoded). The Date() formatter should output `yyyy-MM-dd'T'00:00:00Z` shape.
- `recurrenceDuration`: ISO 8601 duration, value `"P1D"` (1 day).
Both are plain strings at the top level of `attributes`, not nested under `recurrenceRule`.
Plus: new `inspect` subcommand to ASCRegister
To stop the whack-a-mole loop, add an `inspect` subcommand that GETs an existing entity by vendor identifier and prints the full JSON response. Use case: user has a dummy leaderboard `test.bootstrap.delete` in their tenant. Running `swift run ASCRegister inspect --leaderboard test.bootstrap.delete --app-id ...` would print the complete attribute set ASC populated, including any fields we haven't been sending.
Usage:
```
swift run ASCRegister inspect --key --key-id --issuer --app-id --leaderboard
```
Implementation:
- Look up gameCenterDetail (same path used by plan/apply)
- `getCollection` on `/v1/gameCenterDetails/{id}/gameCenterLeaderboards`
- Filter by `vendorIdentifier == --leaderboard arg`
- Print all attributes from the matching APIResource
Future dev can run this against the dummy and copy/paste the working shape into Config.swift.
Tests
- ConfigConsistencyTests: assert `recurrenceStartDate` matches expected ISO 8601 shape (regex `^\d{4}-\d{2}-\d{2}T00:00:00Z$`) and `recurrenceDuration == "P1D"` for all 3 boards.
- New simple test: `inspect` subcommand parses CLI args correctly.
Risk
If `recurrenceStartDate` shape is wrong (e.g., ASC wants date-only `yyyy-MM-dd` or epoch seconds), apply round 4 will surface. Document fallback formats in §未決.
Discovery
Via `swift run ASCRegister apply` 2026-05-20 (Phase 10 A2 — ASCRegister round 3 of N iterations).
Activity
chore(workflows): seed .claude/workflows/ cohort + refresh CR core mo…
docs(test-plans): Phase 3 session batch — +5 pass, 2 fail (3 new issu…
docs(test-plans): mark #22/#23 Dynamic Type pass after #540 fix shipp…