storebound/CHANGELOG.md

61 KiB

Changelog

Unreleased

  • Local font files in shots.fonts: title, body and fallback[] take, besides a Google Fonts family, a path (relative to the config) or { family, file, weight?, style?, license? } (TTF / OTF / WOFF / WOFF2, validated by extension and signature; the family comes from the name table when not given). shots fonts checks the file's cmap per language, tries the listed fallbacks in order before the automatic Noto ones (pl title: ę ł ą Ł not in ER Display -> Noto Sans Display), errors when nothing covers a character, and records the file in fonts.json with its path, sha256 and license. Render and shots video serve it in place at /fonts/local/... (never copied); the hash in fonts.css invalidates the capture cache, and render refuses a font file changed since shots fonts. shots check treats the local font and listed fallbacks as configured and warns when a local font has no license note.

  • Idempotency: every store write is an upsert; running a command twice, or again after a crash or a lost answer, leaves exactly one of each thing (table of every write path: docs/idempotency.md).

    • New cli/lib/upsert.ts: findOrCreate looks again with a fresh GET right before a create and asks a journal of recent creates (.storebound/created.json, a direct GET by id) so a re-run during the store's list lag reuses what the last run made; createOnce treats 409 / ALREADY_EXISTS as found and never sends a create blindly again after a timeout or 5xx (it looks first; only keys the store keeps unique get one more try).
    • The App Store Connect, Google Play, RevenueCat and storebound api clients retry 5xx / network errors only for requests that are safe twice (GET, PUT, PATCH, DELETE, relationship adds, state actions, price schedules); a POST create without a clear answer throws AmbiguousWriteError. Plan runners treat a 409 duplicate as done and stop on an unclear create instead of retrying.
    • Uses it in apple iap, apple subscriptions (groups, subscriptions, localizations, promotional offers, offer code campaigns, custom codes, review screenshot by MD5), apple offer-codes, apple cpp create, apple events create, apple ppo create, apple testflight groups, apple bundle, apple review-details (only changed fields), apple release --phased on, apple adhoc register / profile, apple signing ensure (a lost certificate answer keeps the key and finds the certificate by its public key), apple upload (a COMPLETE build upload is not sent again, an unfinished one is resumed), analytics setup, reviews send, revenuecat sync, play subscriptions (subscriptions and offers).
    • Review submissions (apple iap-submit, cpp submit, events submit): the draft is reused or created once, an item already in it is not added again.
    • Screenshot and preview sets keep the leading files that already match (MD5, position, delivered), replace the rest in order and fix the order if Apple shows another; a crash midway converges on the next run without duplicates.
    • Play edits: one open at a time per run, deleted on every error path, committed only on success, deleted instead of committed when nothing changed (ctl.unchanged()); redone only when nothing went live, never after a commit without a clear answer. play images compares sha256 first and replaces only changed image types; play release reuses a versionCode Play already has and skips identical track releases; play rollout commits nothing when the track is already like that; play upload is done when the versionCode is on the track already.
    • One writer per app and store: write runs take .storebound/locks/<store>-<app>.lock (dry runs and reads do not); a second run stops with who holds it; a lock of a process that is gone is taken over; --force-unlock.
    • tests/idempotency.test.ts with stateful store doubles (tests/helpers/fake-stores.ts): write commands run twice with zero writes on the second run, a crash in the middle of a screenshot set, IAP and subscription creates whose answer is lost, 409 duplicates, the list lag after a crash, Play edit error paths and an unclear commit, the lock. Pitfall 9 in docs/pitfalls.md and the store-pitfalls skill.
  • Faster shots capture (web) and shots render (a 22-language game took about 50 min to capture, serially, with a new context and a full game boot per frame):

    • --concurrency N (and shots.capture.concurrency): parallel browser contexts in one Chromium; defaults from the CPU count (capture min(3, cores / 4), render min(4, cores / 2)). Output files do not depend on the order; progress lines carry language / device / frame, n/total and an ETA. Render runs ffmpeg asynchronously and makes the contact sheets after the images.
    • Per-frame timing (goto, waitFor, eval, delay, screenshot, total) in each progress line and in .storebound/capture-report.json, with time per step and the slowest frames at the end.
    • shots.capture.session: 'per-language': one page per language and device, booted once; shots switch with navigate: 'spa' (pushState + popstate, then waitFor / eval) or 'reload'; a failed precondition falls back to a fresh page (reuseTimeoutMs).
    • Input-hash cache (.storebound/capture-cache.json: shot entry, URL, frame size, session, copy text, app build from shots.capture.build or the served HTML + scripts, fonts): unchanged frames are skipped; --only-missing, --force. MCP shots_capture (concurrency, mode) and shots_render (concurrency).
  • apple listing --dry, play listing --dry and apple appinfo --dry print a real plan (also --json), read-only: the version decision of apple listing (keep, update the editable version's string while PREPARE_FOR_SUBMISSION, create, or refuse: number taken, not higher than a reviewed version, another version in review / pending release), the build to attach, and per locale / language create or update with old -> new per field (long text cut with its length, unchanged fields summarized); app info name / subtitle / privacy URL, categories, age rating and content rights the same way. Locales whose section is status=draft or status=translate (listing translate) are skipped with the reason; --include-drafts sends them. The real run prints the same plan, asks in a terminal and applies exactly it (unchanged localizations are no longer PATCHed, Play PUTs only changed languages); what's new is left out on an app's first version.

  • apple.name: the App Store name in the primary locale (at most 30 characters, validated) for when the plain name is taken on the App Store ("already being used"). app.name stays the Play and on-device name. console fill apple-app-record fills Name from it (else app.name), and apple listing, apple listing pull (a pulled name equal to it is not written into the file), the listing completeness view, check --aso, the console app picker and scan's beta-wording rule use it for every locale without its own ### name block. check reports an App Store name over 30 characters in any locale and hints when every locale uses the plain app.name (hints in --json).

  • Pitfalls from real use become guardrails: new skill store-pitfalls (read before any store task, linked from the agent rules) and docs/pitfalls.md (changelog of lessons; CONTRIBUTING: every real-use bug adds an entry and, where possible, a check or test).

    • apple iap-review names config products missing from App Store Connect's list (it lags a minute after a create) and exits 1 instead of skipping them silently; apple iap and play products re-read the list after creating and warn when a new product is not in it yet.
    • cli/lib/dry.ts dryPlan(title, rows): the standard dry-run plan table. apple iap --dry now reads localizations, price schedule and availability and prints what a real run would add; apple iap-review and play products end their dry runs with the table. A test scans cli/** for --dry branches that print only a count (allowlist with TODOs for commands being fixed elsewhere).
  • Screenshot glyphs (a Turkish render showed fallback glyphs for "ş" / "ğ" while shots check passed): the cause was not subsetting (css2 text= already takes glyphs from every subset) but the title font: Lilita One has no ş ğ İ and most of Latin Extended-A, so Chrome silently drew them with another font.

    • shots fonts checks every character of every language (copy.json + config languages) against the cmap of the faces that draw it (new pure-TS cmap reader for TTF / OTF / TTC / WOFF / WOFF2, no dependency), adds an automatic Noto fallback per missing character (Noto Sans Display for titles at a heavy weight, Noto Sans, Noto Sans