4 Commits

Author SHA1 Message Date
1bab00e74b feat(mint): add Google Play direct payments (RTDN + Developer API)
Closes the other half of I31 ("Direct ASSN v2 and Play RTDN in Mint") —
Apple App Store Server Notifications v2 was already built; this adds the
matching direct (no-aggregator) integration for Google Play.

New ProviderId::PlayStore in mint-payments, mirroring the AppStore adapter's
shape but necessarily async: an RTDN notification carries neither a price
nor the Mint account to credit, so a mintable delivery is re-confirmed
against the Play Developer API (OAuth2 service-account JWT, RS256 via the
already-vendored `ring` crate — no new dependency) before it mints.

Key correctness decisions, documented in the module:
- deposit_ref is keyed on the Developer API's own order id, not the purchase
  token (which Play keeps stable across a subscription's own renewals) — a
  renewal mints again instead of idempotently replaying the original
  purchase, covered by a dedicated regression test.
- USD price comes from a static PLAYSTORE_PRICES_JSON catalog: neither the
  v3 ProductPurchase nor SubscriptionPurchaseV2 Developer API resource
  carries a price field.
- voidedPurchaseNotification (Google's refund signal) reverses by its own
  orderId with no second network call; REVOKED/CANCELED on the primary
  notification types are deliberately Ignored in favor of that cleaner,
  orderId-bearing signal.
- the Pub/Sub push auth token travels as a `?token=` query parameter (push
  subscriptions can't attach a custom static header); mint-server's
  deposits.rs bridges it into a synthetic header so mint-payments itself
  stays axum/query-string-free.

18 new unit tests in playstore.rs (the OAuth2 path signs with a real
synthetic RSA test key, not a mocked signer) plus 4 in mint-server's
deposits.rs for the query->header bridge. Full existing suites re-run green
with zero regressions: mint-payments 112+13+6+6+3, mint-server
22+13+14+3+3+6+8. cargo clippy --all-targets: zero warnings in any touched
file.

Also closes the gap in scripts/parity/recount.mjs: new wave-s.mjs moves I31
MISSING -> DONE on real evidence; infra now 30/10/4 (was 29/10/5),
--self-test still exits 0, recount.test.mjs extended with a Wave S test.

Not deployed: PLAYSTORE_SERVICE_ACCOUNT_KEY / CLIENT_EMAIL / PACKAGE_NAME /
WEBHOOK_TOKEN / PRICES_JSON all need a real Google Play Console service
account and a Pub/Sub push subscription, which is an owner-only step.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 16:30:40 +03:00
8bc3b49ca9 docs(product-analytics): refresh parity recount for A4/A22/A23, add real Mixpanel ingestion-compat test
The 2026-10-05 static parity recount still called A4 (native SDKs),
A22 (warehouse destinations) and A23 (CDP destinations/transforms)
PARTIAL, but the code that closes them landed on main the next day
(fba4dba7, 8cd06952, 0e611a19, b4612a4f, 41653aeb, aa25b536) and was
never folded back in. Add scripts/parity/wave-r.mjs on top of wave-q.mjs
(recount.mjs now merges waves, later wins) and regenerate
docs/parity/recount-2026-10-15.txt: analytics moves from 24/6/7 to
27/3/7 DONE/PARTIAL/MISSING. Verified before writing any of it: full
pnpm run test:all in apps/product-analytics (220 tests, 216 pass, 0
fail, 4 skipped for an uncached Chromium) and `swift test` in
packages/analytics-swift (6/6).

Add apps/product-analytics/docs/MIXPANEL-PARITY-CHECKLIST.md and
test/qy/mixpanel-compat.test.ts, which points the real `mixpanel` npm
client (not a mock) at this service. Findings: /track and /engage
($set/$set_once/$unset) are Mixpanel-compatible today; /groups is not
(the real SDK's $group_key/$group_id don't match this service's
$group_type/$group_key), the $add/$append/$union/$remove people ops are
accepted but silently dropped, there's no /import route, and a
non-verbose Mixpanel client treats this service's JSON response as a
failure. None of that ingestion-routing code is touched here; it's
scoped to docs and tests only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-15 17:04:12 +03:00
207dc9190a fix(parity): recount overlays Wave Q rows proven by their tests (QY1.0 verify)
The QY1.0 recount printed only the static 2026-09-30 record, so the rows QY1.1
to QY1.5 closed still showed as open. scripts/parity/wave-q.mjs lists each
verified change with the test file that proves it; the recount applies a
change only when that file exists and keeps --baseline for the 26/12/6 and
20/9/8 record. Infra is now 29/10/5 and analytics 24/6/7. I6 stays PARTIAL
until the owner-run real-domain proof.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 14:00:20 +03:00
7d82919e88 feat(parity): Railyard recount steward for infra and analytics rows (QY1.0)
Static record of PARITY-RECOUNT-2026-09-30 section 5: I1-I44, A1-A26 and L1-L12.
recount.mjs prints DONE, PARTIAL or MISSING per row and reproduces infra 26/12/6
and analytics 20/9/8 (L11 n/a, not counted). G12 marked done in LIMRUN-GAPS.md.

Skipped: IB/CAPACITY.md and IB/stacks/scribase-etl are not in this worktree
(infra-box is a different repo; the etl stack also waits on QS1.3).
Skipped: GTM/policy denylist byte-equality was not verified, so policy files
were not edited.
2026-10-02 23:46:58 +03:00