Repository navigation
feat(kilo-pass): record Google Play purchase amount, currency and tax (part 1/1) - #6282
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of Files Reviewed (18 files)
Previous Review Summaries (4 snapshots, latest commit 4cb7e99)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4cb7e99)Status: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change bounds converted Play money to PostgreSQL Files Reviewed (3 files)
Previous review (commit b34ca2a)Status: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change replaces the CLDR-derived currency exponent with an explicit ISO 4217 minor-unit table and restricts the order-total fallback to orders with a single line item, so both previously reported issues are resolved and no new issue was found in the changed lines. Files Reviewed (2 files)
Previous review (commit 1f382e1)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe new Google Play money mapping can attribute an entire multi-line-item order's total to a single Kilo Pass purchase, which would misreport warehouse revenue for upgrade/deferred-replacement orders. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (18 files)
Fix these issues in Kilo Cloud Previous review (commit d0f2fdd)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (16 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
1173234 to
1f382e1
Compare
1f382e1 to
b34ca2a
Compare
4cb7e99 to
a0e8287
Compare
Changelog for users
kilo_pass_store_purchases.Changelog for maintainers
kilo_pass_store_purchasesgains nullableamount_charged_minor_units(integer),currency(text), andtax_minor_units(integer); migration 0250 is additive and adds check constraints for non-negative amounts,^[A-Z]{3}$currency, and a currency whenever an amount is present.totalandtax; the same call feeds verification, notifications, and the backfill.store-purchase-money.tsconverts PlayMoney { currencyCode, units, nanos }to the currency's smallest unit using its ISO exponent; it prefers the matched line item, then the only line item, then order totals, and maps anything unusable to nulls.completeStoreKiloPassPurchasepersists it; App Store rows stay NULL.backfillGooglePlayPurchaseAmountsre-reads each stored order id, updates only rows with both money columns NULL, and is idempotent and resumable vialimit; failures carry row id, order id, and message.--limit,--dry-run, and--help, and validates the Play service account before the first request so a bad credential exits non-zero instead of reporting only a failure count.E2E proof
[e10] ux-check: Kilo Pass purchase/checkout and account surfaces regression — e10-surfaces.log records '/subscriptions' rendering 'Kilo Pass / KiloClaw / Coding Plans' and '/profile' rendering the Kilo Pass plans ('Starter', 'Pro', 'Expert', 'Buy now'), and e10-checkout.log records 'after buy url=https://checkout.stripe.com/c/pay/cs_test_' with 'Subscribe to Kilo Pass (Starter)' (screenshots e10-subscriptions.png, e10-profile.png, e10-checkout.png); the only error state seen, a 500 on /api/auto-routing/settings (e10-autorouting.log), is tagged [pre-existing] — no auto-routing file appears in e10-diffstat.log — and presents a 'Try again' action.
[e10] ux-check: Kilo Pass purchase/checkout and account surfaces regression — e2e-web/e10-profile.png (capture not retained)
[e10] ux-check: Kilo Pass purchase/checkout and account surfaces regression
[e10] ux-check: Kilo Pass purchase/checkout and account surfaces regression — e2e-web/e10-checkout.png (capture not retained)
[e10] ux-check: Kilo Pass purchase/checkout and account surfaces regression
[e10] ux-check: Kilo Pass purchase/checkout and account surfaces regression
E2E proof — log excerpts
/home/igor_kilocode_ai/.local/share/kwf/sections/req-20260917-192220-8435/e2e-web/e2-surfaces.log/home/igor_kilocode_ai/.local/share/kwf/sections/req-20260917-192220-8435/e2e-web/e2-diffstat.log/home/igor_kilocode_ai/.local/share/kwf/sections/req-20260917-192220-8435/e2e-web/e2-layoutshift.log/home/igor_kilocode_ai/.local/share/kwf/sections/req-20260917-192220-8435/e2e-web/e2-autorouting.log/home/igor_kilocode_ai/.local/share/kwf/sections/req-20260917-192220-8435/e2e-web/web-setup-smoke.logOwner request for the stack
PR stack (merge bottom to top)
kwf/req-20260917-192220-8435-l1) ← this PR