Merge remote-tracking branch 'origin/main' into play-app-record

# Conflicts:
#	CHANGELOG.md
#	docs/pitfalls.md
#	skills/store-pitfalls/SKILL.md
#	tests/console-fill.test.ts
This commit is contained in:
CRTkafa 2026-10-11 21:24:52 +00:00
commit ebc45c8c1a
70 changed files with 3729 additions and 290 deletions

View file

@ -12,7 +12,7 @@ Specs: Apple [App Store Connect API 4.5.1](https://developer.apple.com/sample-co
| API | operations | GET | other | wrapped by a command | owner only |
|---|---:|---:|---:|---:|---:|
| App Store Connect API 4.5.1 | 1303 | 826 | 477 | 196 | 166 |
| App Store Connect API 4.5.1 | 1303 | 826 | 477 | 197 | 166 |
| Google Play Android Developer API v3 (revision 20261008) | 145 | 45 | 100 | 32 | 49 |
| Google Play Developer Reporting API v1beta1 (revision 20261008) | 25 | 15 | 10 | 6 | 0 |
@ -386,7 +386,7 @@ Specs: Apple [App Store Connect API 4.5.1](https://developer.apple.com/sample-co
| `appStoreVersions_deleteInstance` | DELETE | `/v1/appStoreVersions/{id}` | owner only (typed confirm) | |
| `appStoreVersions_gameCenterAppVersion_getToOneRelated` | GET | `/v1/appStoreVersions/{id}/gameCenterAppVersion` | read | |
| `appStoreVersions_gameCenterAppVersion_getToOneRelationship` | GET | `/v1/appStoreVersions/{id}/relationships/gameCenterAppVersion` | read | |
| `appStoreVersions_getInstance` | GET | `/v1/appStoreVersions/{id}` | read | |
| `appStoreVersions_getInstance` | GET | `/v1/appStoreVersions/{id}` | read | apple/listing |
| `appStoreVersions_routingAppCoverage_getToOneRelated` | GET | `/v1/appStoreVersions/{id}/routingAppCoverage` | read | |
| `appStoreVersions_routingAppCoverage_getToOneRelationship` | GET | `/v1/appStoreVersions/{id}/relationships/routingAppCoverage` | read | |
| `appStoreVersions_updateInstance` | PATCH | `/v1/appStoreVersions/{id}` | write (dry by default) | apple/listing |

View file

@ -38,8 +38,9 @@ Tests: `tests/idempotency.test.ts` runs the write commands twice against statefu
## Commands
Status: **ok** = converges, second run writes nothing (tested where marked T). **writes** = converges but sends the
same values again (no duplicate; noted below). **owner** = a public or irreversible step that asks first.
Status: **ok** = converges, second run writes nothing (tested twice where marked T; the rows without T are covered
by the shared helpers, see "Not run twice in the tests" below). **owner** = a public or irreversible step that asks
first. No write path sends the same values again on a second run.
| command | key | on re-run | status |
|---|---|---|---|
@ -48,9 +49,9 @@ same values again (no duplicate; noted below). **owner** = a public or irreversi
| `apple iap-review` | one review screenshot per product (MD5 + not FAILED) | kept when the bytes match, else deleted and uploaded | ok |
| `apple subscriptions` | group reference name; product id; locale; promo offer code; campaign name; custom code | groups and subscriptions: findOrCreate + journal; localizations / offers / codes: createOnce; prices compared per territory, only differences sent; a subscription found late is read live (prices, intro) | ok T (twice, lost answer) |
| `apple offer-codes` | campaign name per product; custom code; one-time batches by count | campaign: findOrCreate + journal (names not known unique: no blind retry); codes: 409 = exists | ok T |
| `apple win-back` | offer id per subscription | only missing offers; 409 = exists | ok (owner: asks) |
| `apple promoted` | product per promoted purchase | plan from the store; order PATCH only when it differs | ok |
| `apple preorder` | territory | plan from the store | ok (owner) |
| `apple win-back` | offer id per subscription | only missing offers; 409 = exists | ok T (owner: asks) |
| `apple promoted` | product per promoted purchase | plan from the store; order PATCH only when it differs | ok T |
| `apple preorder` | territory | plan from the store; a territory already on pre-order with that date is left | ok T (owner) |
| `apple cpp create` | page name; locale | page: findOrCreate + journal; locales from a fresh read, 409 = exists | ok T |
| `apple cpp upload` / `apple ppo upload` / `apple screenshots` | display type; position + MD5 | set: findOrCreate (unique, 409 = found); screenshots: matching prefix kept, rest replaced in order | ok T (twice, crash on the 3rd file) |
| `apple cpp submit` / `apple events submit` / `apple iap-submit` | the app's draft submission; version id per item | draft reused or created once (journal); an item in the draft is not added again | ok T (iap-submit) (owner: submit asks) |
@ -59,7 +60,7 @@ same values again (no duplicate; noted below). **owner** = a public or irreversi
| `apple ppo create` | test name (open tests only); treatment name; locale | findOrCreate + journal for test and treatments | ok T |
| `apple previews` | preview type; position + MD5; poster time code | like screenshots; poster PATCH only where it differs | ok |
| `apple testflight groups` | group name | findOrCreate + journal, 409 = found | ok T |
| `apple testflight testers` | email (masked) per group | only missing testers / memberships; 409 = exists | ok (owner: asks) |
| `apple testflight testers` | email (masked) per group | only missing testers / memberships; 409 = exists | ok T (owner: asks) |
| `apple testflight what-to-test` / `info` | locale; fields | POST missing locales, PATCH changed fields only | ok |
| `apple testflight distribute` | group per build | relationship adds (same when sent twice); beta review once per build (409 = exists) | ok (owner) |
| `apple testflight expire` | build | only unexpired builds planned | ok (owner) |
@ -70,20 +71,20 @@ same values again (no duplicate; noted below). **owner** = a public or irreversi
| `apple adhoc profile` | profile name (+ dated names of earlier runs) | a current profile (also a dated one) ends the run; a new name never collides | ok |
| `apple signing ensure` | certificate with a local key (SPKI); profile with that certificate | a lost certificate answer keeps the pending key and finds the certificate by its public key (now or on the next run); profiles: createOnce, re-read | ok |
| `apple upload` | build upload per version + build number | a COMPLETE upload is not sent again (only the wait); an unfinished one is resumed; reservations createOnce | ok |
| `apple listing` | version (editable); locale | see "open points" | writes |
| `apple appinfo` | categories, age rating, rights, price, availability | PATCHes every run (same values); price / availability only when missing | writes |
| `apple listing` | version string (editable, iOS); locale; build per version | plan from the store; version: findOrCreate (fresh GET right before the create, journal, unique: a lost answer looks first); localizations: createOnce (409 / lost answer = found, then only differing fields PATCHed); unchanged localizations skipped; the build is not re-attached when it is attached | ok T (twice, changed field, lost answer, 409) |
| `apple appinfo` | categories, age rating, rights, price, availability | each compared with the live value, only what differs is PATCHed; price schedule and availability only when missing (an existing price is never changed here: `prices import`) | ok T (twice, one changed answer) |
| `analytics setup` | the ONGOING request | exists = done; createOnce | ok |
| `reviews send` | review id (local `sent:` mark) | Apple 409 (already answered) = noted as sent; Play `:reply` replaces | ok (owner) |
| `play products` | product id | PATCH `allowMissing` (create or update) only when it differs; activation only when not ACTIVE | ok T |
| `play subscriptions` | product id; base plan id; offer id | create: 409 = found (createOnce); PATCH only differences; activation only when needed | ok T (twice, lost answer) |
| `play images` | language + image type, sha256 in order | one read edit compares; only changed types are cleared and uploaded, in one edit per language | ok T |
| `play listing` | language | see "open points" | writes |
| `play listing` | language; details | compared like the dry run (`playPlan`), again inside the write edit: only differing details / languages PUT; nothing differs = the edit is deleted, not committed; commit only after every PUT worked | ok T (twice, store current by the time the edit opens) |
| `play release` | versionCode; track release | a versionCode Play has is reused, not uploaded; an identical track release is not PUT; nothing changed = edit deleted | ok T |
| `play upload` | versionCode + track | already on that track with that status = done | ok |
| `play upload` | versionCode + track | already on that track with that status = done | ok T |
| `play rollout` | track releases | the same releases = edit deleted, not committed | ok T |
| `play data-safety` | the form | Play has no read API for it: the same CSV is sent again (a set, no duplicates) | writes |
| `play data-safety` | sha256 of package + CSV (`.storebound/data-safety.sha256`) | Play cannot read the form back: the hash of the last upload is kept locally, the same CSV is not sent again; `--force` sends it anyway (after a hand edit in Play Console) | ok T |
| `play share` | none (a new link each time) | a new internal sharing artifact per run (asks first; links expire in 60 days) | owner |
| `prices import` | product x store x region | diff first; only changed product / store pairs written (`--reconvert` always rewrites Play regions) | ok |
| `prices import` | product x store x region | diff first; only changed product / store pairs written (`--reconvert` always rewrites Play regions) | ok T (Play) |
| `revenuecat sync` | store identifier + app; lookup keys | plan from a fresh read; creates through createOnce (409 = found by key); attaches are the same twice | ok |
| `ads apple bid / budget / pause` | campaign / keyword | PUT of a value | ok (owner) |
| `web init` | file content | unchanged files are not written | ok |
@ -91,13 +92,19 @@ same values again (no duplicate; noted below). **owner** = a public or irreversi
| `console fill` | none | fills fields in a visible browser, never presses Save / Submit / Next | ok (never saves) |
| `storebound api <write>` | none (one raw request) | a POST without a clear answer is not retried; check with a GET first | raw |
## Open points (owned by another change)
## Not run twice in the tests
- `apple listing`: the version is matched by "the editable version", not by its version string, and a new one is
created without findOrCreate; localizations are POSTed without `createOnce` (a 409 stops the run), and the build is
re-attached (PATCH) every run. Should use findOrCreate for the version and localizations, and skip the build PATCH
when it is attached already.
- `play listing`: every run opens an edit, PUTs details and every listing and commits, also when nothing changed. Should
compare like its dry run (`listingChanges`, `detailsChanges`) and call `ctl.unchanged()` when nothing differs.
- `apple appinfo`: categories, age rating and content rights are PATCHed every run. Should compare with the current
values first.
No row is open. These write paths are not run twice against the store doubles; they converge through the shared,
tested helpers instead:
- `apple previews`: the asset-set logic of `apple screenshots` (`keptPrefix`, `syncAssets`), tested with a crash on
the 3rd file. `apple iap-review` and `apple events upload` compare MD5 / size with what is delivered before sending.
- `apple signing ensure`, `apple upload`: reservations and certificates through `createOnce` and lookups by key
(tested in `helpers`); `apple adhoc profile` stops at a current profile. The doubles have no certificate, profile
or build upload pipeline.
- `revenuecat sync`: `createOnce` with RevenueCat's 409 (`isConflict` tested); there is no RevenueCat double.
- `apple testflight what-to-test` / `info` / `distribute` / `expire`, `apple cpp upload` / `ppo upload` (the
screenshot path), `analytics setup`, `reviews send`, `ads apple`, `web init`, `flow run`: plan from the store (or
the file) first, the same helpers.
- `prices import` on the App Store side: the doubles have no manual price list per schedule; the Play side is tested,
and both share `diffPrices` / `sameSchedule`.

View file

@ -9,8 +9,10 @@ fails without the fix.
| # | date | lesson | guard |
|---|---|---|---|
| 11 | 2026-10 | App Privacy purposes were over-mapped: Play "advertising" became both Third-Party Advertising and Developer's Advertising or Marketing (Device ID, Coarse Location, Product Interaction, Performance Data). | `applePurpose` maps one Play purpose to one Apple purpose (advertising: third-party only); Developer's Advertising only from `appPrivacy.types`; `check` compares `appPrivacy.types` with Info.plist / PrivacyInfo.xcprivacy (`tests/app-privacy.test.ts`). |
| 10 | 2026-10 | A new Play app has no API: Play Console's "Create app" is the only way, its page-level button carries the same words as the form's final submit, and Free cannot become Paid later. | `console fill play-app-record`: `createAppAllowed` lets the opener through only on the app list, never in a form or dialog (EN + TR); declarations never ticked; Free / Paid outlined as an owner check (`tests/console-fill.test.ts`). |
| 13 | 2026-10 | App Privacy purposes were over-mapped: Play "advertising" became both Third-Party Advertising and Developer's Advertising or Marketing (Device ID, Coarse Location, Product Interaction, Performance Data). | `applePurpose` maps one Play purpose to one Apple purpose (advertising: third-party only); Developer's Advertising only from `appPrivacy.types`; `check` compares `appPrivacy.types` with Info.plist / PrivacyInfo.xcprivacy (`tests/app-privacy.test.ts`). |
| 12 | 2026-10 | A new Play app has no API: Play Console's "Create app" is the only way, its page-level button carries the same words as the form's final submit, and Free cannot become Paid later. | `console fill play-app-record`: `createAppAllowed` lets the opener through only on the app list, never in a form or dialog (EN + TR); declarations never ticked; Free / Paid outlined as an owner check (`tests/console-fill.test.ts`). |
| 11 | 2026-10 | Google Play has no public search API, so there is no Play keyword rank or Play competitor list to read without scraping. | `aso` reads App Store search only (iTunes Search API); `aso audit` covers Play through the listing text (short description, density); the aso-basics skill says so. |
| 10 | 2026-10 | The iTunes Search API order is close to, not equal to, App Store search (no personalisation, no search ads, no in-app event rows) and it has no subtitle field. | `aso rank` / `aso competitors` / `aso audit` label ranks as a trend and show no competitor subtitles; popularity only from Apple Ads, never estimated (`cli/lib/aso-intel.ts`). |
| 9 | 2026-10 | A retried or repeated write can duplicate on a live store: a POST create retried after a timeout or 5xx, a re-run during the list lag right after a create, two runs at once, a Play edit redone after an unclear commit, a crash in the middle of a screenshot set. | Every write is an upsert (`cli/lib/upsert.ts`: findOrCreate with a fresh re-check and a journal of recent creates, createOnce treating 409 as found, no blind retry of a create); API clients retry only requests that are safe twice; Play edits are all or nothing; asset sets keep the matching prefix; one lock per app and store (`cli/lib/lock.ts`, `--force-unlock`). Table: `docs/idempotency.md`; `tests/idempotency.test.ts` runs every write twice and asserts zero writes on the second run. |
| 8 | 2026-10 | Capacitor plugins in a monorepo live in `apps/native/node_modules`, so `scan` missed them. | `scan` / `privacy-manifest` resolve workspace packages (`cli/lib/scan/project.ts`, `cli/lib/node-packages.ts`). |
| 7 | 2026-10 | Console UIs: the App Store Connect sign-in runs in an `idmsa.apple.com` iframe; "User Access" is a plain heading, not a labeled group; Chrome drops session cookies without `--restore-last-session`. | `console` session and fill (`cli/console/`), `tests/console-*.test.ts`. |