Skip to content

Commit f47d6ef

Browse files
committed
feat: add ASC OpenAPI coverage tooling
1 parent 2dec7ed commit f47d6ef

13 files changed

Lines changed: 835 additions & 8 deletions

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,13 @@ jobs:
3030
- name: Fail on release warnings
3131
run: '! grep -q "warning:" /tmp/asc_mcp_release.log'
3232

33+
- name: OpenAPI coverage tooling smoke
34+
run: |
35+
swift run asc-mcp openapi-coverage \
36+
--spec Tests/ASCMCPTests/Fixtures/openapi_minimal.oas.json \
37+
--output /tmp/asc_openapi_coverage.md \
38+
--generated-at 2026-05-07
39+
test -s /tmp/asc_openapi_coverage.md
40+
3341
- name: Test
3442
run: swift test

ASC-COVERAGE-MATRIX-2026-05-05.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Source baseline:
77
- Apple API 4.0 release notes: https://developer.apple.com/documentation/appstoreconnectapi/app-store-connect-api-4-0-release-notes
88
- Apple Webhook notifications: https://developer.apple.com/documentation/appstoreconnectapi/webhook-notifications
99

10+
Update 2026-05-07: automated OpenAPI coverage tooling is now available. See `ASC-OPENAPI-COVERAGE-GENERATED.md` for the generated Apple 4.3 path/operation matrix.
11+
1012
This matrix tracks current `asc-mcp` coverage against the official App Store Connect API documentation. It is intentionally product-oriented: it names what users can do today, what is missing, and which additions should come first.
1113

1214
## Executive Priority
@@ -15,7 +17,6 @@ P0 additions:
1517
- Accessibility declarations, App Clips, background assets, app tags, routing app coverages, and customer review summaries.
1618

1719
P1 additions:
18-
- Automated OpenAPI spec diff against `app-store-connect-openapi-specification.zip`.
1920
- Webhook receiver-side signature verification, event payload decoder, and triage resources/prompts.
2021
- Merchant IDs and Pass Type IDs under provisioning.
2122
- Analytics/customer-review summarization and metric recommendation ergonomics.
@@ -24,7 +25,7 @@ P1 additions:
2425

2526
| Area | Status | Priority | Current worker keys | Missing / next |
2627
|---|---|---:|---|---|
27-
| Essentials: auth, errors, paging, uploads, rate limits | Partial | P1 | `auth` | OpenAPI spec diff; API key inventory/revocation helpers |
28+
| Essentials: auth, errors, paging, uploads, rate limits | Partial | P1 | `auth` | API key inventory/revocation helpers |
2829
| App Store app metadata and release operations | Partial | P0 | `apps`, `versions`, `app_info`, `pricing`, `app_events`, `screenshots`, `custom_pages`, `ppo`, `promoted`, `review_attachments`, `reviews` | accessibility declarations; App Clips; background assets; app tags; routing app coverages; customer review summary endpoint |
2930
| TestFlight builds, testers, groups, and beta app review | Partial | P0 | `builds`, `build_processing`, `build_beta`, `beta_groups`, `beta_feedback`, `beta_testers`, `beta_app`, `pre_release`, `beta_license` | beta recruitment criteria; beta app clip invocation/localization APIs |
3031
| Webhook notifications | Covered | P2 | `webhooks` | OpenAPI drift checks and receiver-side helper ergonomics |
@@ -41,9 +42,8 @@ P1 additions:
4142

4243
1. Add `--read-only` runtime guard so static and live validation can run safely in production-like MCP hosts.
4344
2. Add `AccessibilityWorker` and update `AppsWorker` for `accessibilityUrl`: this closes a new compliance-oriented App Store gap.
44-
3. Add OpenAPI drift tooling so future Apple release-note changes become visible before users report missing methods.
45-
4. Add webhook receiver helpers: signature verification, event payload decoder, and triage prompts/resources.
46-
5. Add merchant/pass identifiers, App Clips, background assets, Game Center, and alternative distribution as larger domain workers.
45+
3. Add webhook receiver helpers: signature verification, event payload decoder, and triage prompts/resources.
46+
4. Add merchant/pass identifiers, App Clips, background assets, Game Center, and alternative distribution as larger domain workers.
4747

4848
## Safety Notes
4949

ASC-OPENAPI-COVERAGE-GENERATED.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# App Store Connect OpenAPI Coverage
2+
3+
Generated: 2026-05-07
4+
5+
Sources:
6+
- Apple App Store Connect API overview: https://developer.apple.com/app-store-connect/api/
7+
- Apple App Store Connect API documentation: https://developer.apple.com/documentation/appstoreconnectapi
8+
- Apple OpenAPI specification download: https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip
9+
- Apple App Store Connect API 4.3 release: https://developer.apple.com/news/releases/?id=03102026b
10+
11+
Spec: App Store Connect API 4.3 (OpenAPI 3.0.1)
12+
Apple paths: 923
13+
Apple operations: 1208
14+
Classified paths: 923
15+
Unclassified paths: 0
16+
17+
## Priority Gaps
18+
19+
- P0 App Store app metadata and release operations: Partial, 303 Apple paths, 380 operations.
20+
- P0 TestFlight builds, testers, groups, and beta app review: Partial, 115 Apple paths, 154 operations.
21+
- P1 Provisioning and identifiers: Partial, 32 Apple paths, 49 operations.
22+
- P1 Reporting, analytics, metrics, and diagnostics: Partial, 47 Apple paths, 56 operations.
23+
- P1 Xcode Cloud workflows and builds: Partial, 56 Apple paths, 59 operations.
24+
25+
## Domain Matrix
26+
27+
| Domain | Status | Priority | Apple paths | Operations | Workers | Notes |
28+
|---|---|---:|---:|---:|---|---|
29+
| App Store app metadata and release operations | Partial | P0 | 303 | 380 | `apps`, `versions`, `app_info`, `pricing`, `app_events`, `screenshots`, `custom_pages`, `ppo`, `promoted`, `review_attachments`, `reviews` | The common release workflow is strong; API 4.0 app-surface additions are the highest App Store coverage gap. |
30+
| TestFlight builds, testers, groups, and beta app review | Partial | P0 | 115 | 154 | `builds`, `build_processing`, `build_beta`, `beta_groups`, `beta_feedback`, `beta_testers`, `beta_app`, `pre_release`, `beta_license` | Current TestFlight management is useful, but feedback retrieval is now core user value and should become a dedicated worker. |
31+
| Essentials: auth, errors, paging, uploads, rate limits | Partial | P1 | 0 | 0 | `auth` | Core runtime behavior is covered; OpenAPI drift is now generated from Apple's official specification. |
32+
| Provisioning and identifiers | Partial | P1 | 32 | 49 | `provisioning` | Core signing automation exists; Wallet and Apple Pay identifiers are useful next additions. |
33+
| Reporting, analytics, metrics, and diagnostics | Partial | P1 | 47 | 56 | `analytics`, `metrics` | Read-heavy workflows are safe and valuable; summaries and recommendations are high UX leverage. |
34+
| Webhook notification receiver resources | Missing | P1 | 0 | 0 | none | The App Store Connect management API is covered; receiver-side helpers are local MCP value-add and should not call Apple. |
35+
| Xcode Cloud workflows and builds | Partial | P1 | 56 | 59 | `xcode_cloud` | Covers read-heavy CI dashboards plus start/rebuild build runs; destructive workflow/product management remains intentionally deferred. |
36+
| Alternative distribution | Missing | P2 | 21 | 28 | none | Region- and entitlement-sensitive APIs should be opt-in and strongly documented. |
37+
| Game Center | Missing | P2 | 238 | 337 | none | Large domain; should be added only after OpenAPI-driven scaffolding is in place. |
38+
| In-app purchases, subscriptions, and offers | Covered | P2 | 129 | 163 | `iap`, `subscriptions`, `offer_codes`, `winback`, `intro_offers`, `promo_offers` | Coverage is broad enough for production workflows; future work is mostly schema tightening and OpenAPI drift checks. |
39+
| Users, access, and sandbox testers | Partial | P2 | 13 | 20 | `users`, `sandbox` | User management is serviceable; API key operations should remain carefully annotated as high-risk. |
40+
| Webhook notifications | Covered | P2 | 6 | 8 | `webhooks` | Covers app webhooks, individual webhook reads, create/update/delete, delivery listing, redelivery, and ping testing. |
41+
42+
## Missing Apple Domains
43+
44+
- Alternative distribution: 21 paths, 28 operations.
45+
- Game Center: 238 paths, 337 operations.
46+
47+
## Unclassified Apple Paths
48+
49+
All Apple paths matched at least one maintained coverage rule.
50+
51+
## How To Regenerate
52+
53+
```bash
54+
rm -rf /tmp/asc-openapi
55+
mkdir -p /tmp/asc-openapi
56+
curl -L --fail -o /tmp/asc-openapi/spec.zip https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip
57+
unzip -q /tmp/asc-openapi/spec.zip -d /tmp/asc-openapi
58+
swift run asc-mcp openapi-coverage --spec /tmp/asc-openapi/openapi.oas.json --output ASC-OPENAPI-COVERAGE-GENERATED.md
59+
```

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- OpenAPI coverage tooling via `asc-mcp openapi-coverage`, using Apple's official App Store Connect OpenAPI JSON without loading ASC credentials or starting the MCP server.
13+
- Generated `ASC-OPENAPI-COVERAGE-GENERATED.md` report for Apple App Store Connect API 4.3 with domain-level path/operation counts and drift triage.
14+
15+
### Changed
16+
17+
- CI now smoke-tests the OpenAPI coverage command against a local fixture.
18+
- Coverage inventory now marks automated OpenAPI drift reporting as implemented.
19+
820
## [2.1.0] - 2026-05-05
921

1022
### Added

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
- **Analytics & Metrics** — sales/financial reports, analytics reports, performance metrics, diagnostics
4646
- **Metadata management** — localized descriptions, keywords, What's New across all locales
4747
- **MCP 2025-11-25 surface** — tool annotations, output schemas for stable tools, structured JSON results, and safe result-size metadata
48+
- **OpenAPI drift tooling** — generate coverage reports from Apple's official App Store Connect OpenAPI specification
4849

4950
## Quick Start
5051

@@ -397,6 +398,24 @@ asc-mcp --read-only --workers apps,builds,reviews,analytics
397398
398399
In this mode, read tools such as `*_list`, `*_get`, `*_search`, `*_status`, `auth_*`, analytics, and metrics remain available. Tools that can create, update, upload, submit, release, delete, revoke, clear, cancel, or otherwise mutate App Store Connect are blocked before their worker handler runs. `company_switch` remains available because it changes only the local active company context.
399400
401+
### OpenAPI Drift Tooling
402+
403+
Use the built-in OpenAPI coverage command to compare the maintained `asc-mcp` coverage map with Apple's latest App Store Connect OpenAPI specification. This command does **not** load App Store Connect credentials, does **not** start the MCP server, and does **not** call Apple APIs beyond your explicit spec download.
404+
405+
```bash
406+
rm -rf /tmp/asc-openapi
407+
mkdir -p /tmp/asc-openapi
408+
curl -L --fail -o /tmp/asc-openapi/spec.zip \
409+
https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip
410+
unzip -q /tmp/asc-openapi/spec.zip -d /tmp/asc-openapi
411+
412+
swift run asc-mcp openapi-coverage \
413+
--spec /tmp/asc-openapi/openapi.oas.json \
414+
--output ASC-OPENAPI-COVERAGE-GENERATED.md
415+
```
416+
417+
The generated report records Apple spec metadata, path and operation counts, domain status, P0/P1 gaps, missing domains, and unclassified paths. The current checked-in report is [`ASC-OPENAPI-COVERAGE-GENERATED.md`](ASC-OPENAPI-COVERAGE-GENERATED.md), generated from App Store Connect API 4.3.
418+
400419
**Available worker names:**
401420
402421
| Worker | Prefix | Tools | Description |

Sources/asc-mcp/Core/ASCCoverageInventory.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ enum ASCCoverageInventory {
5353
"Apple API error decoding",
5454
"pagination helpers",
5555
"bounded upload flow",
56-
"rate-limit metadata capture"
56+
"rate-limit metadata capture",
57+
"automated OpenAPI spec coverage report generation"
5758
],
5859
missingCapabilities: [
59-
"automated OpenAPI spec diff against app-store-connect-openapi-specification.zip",
6060
"first-class API key revocation/read inventory helpers"
6161
],
62-
notes: "Core runtime behavior is covered, but release-time API drift detection still needs an automated spec diff."
62+
notes: "Core runtime behavior is covered; OpenAPI drift is now generated from Apple's official specification."
6363
),
6464
ASCCoverageArea(
6565
name: "App Store app metadata and release operations",

Sources/asc-mcp/EntryPoint.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ import MCP
44
@main
55
struct ASCMCPApp {
66
static func main() async throws {
7+
do {
8+
if try ASCOpenAPICoverageCommand.runIfRequested(arguments: CommandLine.arguments) {
9+
return
10+
}
11+
} catch {
12+
print("OpenAPI coverage error: \(error.localizedDescription)", to: &standardError)
13+
exit(1)
14+
}
15+
716
#if DEBUG
817
if CommandLine.arguments.contains("--test") {
918
print("Test mode activated", to: &standardError)

0 commit comments

Comments
 (0)