Skip to content

refactor(kilo-pass): remove App Store and Google Play subscription backend - #7306

Open
iscekic wants to merge 6 commits into
mainfrom
igor/remove-store-kilo-pass-backend
Open

iscekic wants to merge 6 commits into
mainfrom
igor/remove-store-kilo-pass-backend

Conversation

@iscekic

@iscekic iscekic commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Warning

Do not merge before both conditions are true:

  1. It is 2026-11-09 or later, and a replica check shows no active app_store or google_play Kilo Pass row for an account that is not blocked.
  2. app_min_versions is raised to the mobile release that contains refactor(mobile): remove in-app Kilo Pass subscription purchase code #7304. Older builds still call kiloPass.getMobileStoreProducts.

Summary

This PR is the last step of retiring Kilo Pass store subscriptions. Before it: #7294 stopped in-app sales, #7304 removed the mobile purchase code, and the App Store and Play products are removed from sale.

Removed:

  • kiloPass.getMobileStoreProducts, completeAppStorePurchase, completePlayPurchase, and isNativeIapMutationAllowed
  • the Kilo Pass Apple and Google verifiers, store subscription completion, Play subscription state, and duplicate-subscription reversal
  • the store-subscription reconcile cron and its route
  • the store money helpers and the money backfill. Only Kilo Pass code used them.
  • 2 finished one-off scripts

Changed:

  • The App Store and Play notification routes stay. Every Kilo Pass subscription notification is recorded once, marked processed, and returns 200, so the stores stop retrying. Blocked accounts' Play renewals can continue until 2028.
  • Credit-pack paths do not change. This covers Apple CONSUMPTION_REQUEST, REFUND, REVOKE, and REFUND_REVERSED, and Play voided one-time product refunds.
  • The Apple transaction decoder moves from the deleted Kilo Pass verifier to apple-store-sdk.ts, because the credit-pack verifier still uses it.

Kept:

  • kiloPass.getPurchasePresentation, because shipped clients still call it
  • Stripe Kilo Pass
  • the readers that show historical store rows as ended
  • all database tables and data. This PR has no migration.

Verification

  • tsgo passed for web, kilo-app, and app-shared.
  • Web jest passed (13 suites, 347 tests): the App Store and Play notifications, all of src/lib/credits, the kilo-pass and credits routers, the Apple and Play SDKs, and PostHog tracking.
  • The app-shared commerce tests passed. The mobile check:unused passed. oxlint passed on the changed files.
  • No manual check. No client calls the removed endpoints after the minimum-version gate, and the notification behavior is covered by the handler tests.

Visual Changes

N/A

Reviewer Notes

  • Look first at the ack-and-ignore branch in each notification handler, and at the credit-pack branches that stay.
  • The web knip run reports old unused exports across the repo. No CI job checks web exports, so this PR does not touch them.

…ckend

Mobile no longer sells Kilo Pass (#7294, #7304), and the store products
are removed from sale. This commit removes the backend that completed,
verified, and reconciled Kilo Pass store subscriptions.

- Delete kiloPass.getMobileStoreProducts, completeAppStorePurchase, and
  completePlayPurchase, the Kilo Pass store verifiers, subscription
  completion, Play subscription state and duplicate handling, the
  reconcile cron, the store money helpers, and two one-off scripts.
- The App Store and Play notification routes stay. They acknowledge and
  ignore every Kilo Pass subscription notification, so the stores stop
  retrying. Credit-pack consumption, refund, and restore paths do not
  change.
- The shared Apple transaction decoder moves to apple-store-sdk.ts,
  because the credit-pack verifier still uses it.
- Historical store rows and their readers stay. No migration.
@iscekic iscekic self-assigned this Oct 8, 2026
iscekic and others added 2 commits October 8, 2026 17:43
…o-pass-backend

# Conflicts:
#	.specs/kilo-pass.md
#	apps/web/src/lib/kilo-pass/google-play-notifications.test.ts
#	apps/web/src/lib/kilo-pass/store-subscription-completion.test.ts
#	apps/web/src/routers/kilo-pass-router.test.ts
#	apps/web/src/routers/kilo-pass-router.ts
Comment thread .specs/kilo-pass.md Resolved
@kilo-code-bot

kilo-code-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.specs/kilo-pass.md 104 Breaking client/API change: removing kiloPass.getMobileStoreProducts / completeAppStorePurchase / completePlayPurchase breaks old mobile builds unless the documented merge gate (2026-11-09 and raised app_min_versions) is enforced.

Everything else in this retirement PR checks out: the App Store and Google Play ack-and-ignore branches still leave the credit-pack CONSUMPTION_REQUEST / REFUND / REVOKE / REFUND_REVERSED and Play one-time voided-refund paths reachable and behaviorally unchanged; the moved decodeAppleStoreTransactionJws in apple-store-sdk.ts is identical to the deleted verifier; no surviving non-test reference to any removed export, module, router procedure, or cron route; kilo_pass_store_events has no constraint that rejects the new 'unknown' environment/product values; and the narrowed PostHog params have only the Stripe caller. This is a breaking API change, so the gate must be verified before merge.

Files Reviewed (42 files)
  • .kilo/skills/kilo-mcp/SKILL.md
  • .specs/kilo-pass.md - 1 issue
  • ENVIRONMENT.md
  • apps/web/src/app/api/cron/kilo-pass-store-subscription-reconcile/route.ts
  • apps/web/src/lib/credits/store-verifier.test.ts
  • apps/web/src/lib/credits/store-verifier.ts
  • apps/web/src/lib/kilo-pass/apple-store-notifications.test.ts
  • apps/web/src/lib/kilo-pass/apple-store-notifications.ts
  • apps/web/src/lib/kilo-pass/apple-store-sdk.test.ts
  • apps/web/src/lib/kilo-pass/apple-store-sdk.ts
  • apps/web/src/lib/kilo-pass/apple-store-verifier.test.ts
  • apps/web/src/lib/kilo-pass/apple-store-verifier.ts
  • apps/web/src/lib/kilo-pass/google-play-duplicate-subscription.ts
  • apps/web/src/lib/kilo-pass/google-play-notifications.test.ts
  • apps/web/src/lib/kilo-pass/google-play-notifications.ts
  • apps/web/src/lib/kilo-pass/google-play-sdk.test.ts
  • apps/web/src/lib/kilo-pass/google-play-sdk.ts
  • apps/web/src/lib/kilo-pass/google-play-subscription-state.ts
  • apps/web/src/lib/kilo-pass/google-play-verifier.test.ts
  • apps/web/src/lib/kilo-pass/google-play-verifier.ts
  • apps/web/src/lib/kilo-pass/mobile-store-products.test.ts
  • apps/web/src/lib/kilo-pass/mobile-store-products.ts
  • apps/web/src/lib/kilo-pass/posthog-tracking.test.ts
  • apps/web/src/lib/kilo-pass/posthog-tracking.ts
  • apps/web/src/lib/kilo-pass/store-purchase-money-backfill.test.ts
  • apps/web/src/lib/kilo-pass/store-purchase-money-backfill.ts
  • apps/web/src/lib/kilo-pass/store-purchase-money.test.ts
  • apps/web/src/lib/kilo-pass/store-purchase-money.ts
  • apps/web/src/lib/kilo-pass/store-subscription-completion.test.ts
  • apps/web/src/lib/kilo-pass/store-subscription-completion.ts
  • apps/web/src/lib/kilo-pass/store-subscription-products.test.ts
  • apps/web/src/lib/kilo-pass/store-subscription-reconcile.test.ts
  • apps/web/src/lib/kilo-pass/store-subscription-reconcile.ts
  • apps/web/src/routers/kilo-pass-router.test.ts
  • apps/web/src/routers/kilo-pass-router.ts
  • apps/web/src/scripts/d2026-09-17_backfill-store-purchase-amounts.ts
  • apps/web/src/scripts/d2026-09-21_revoke-duplicate-google-play-subscriptions.ts
  • apps/web/vercel.json
  • packages/app-shared/src/commerce/purchase-presentation.test.ts
  • packages/app-shared/src/commerce/purchase-presentation.ts
  • packages/web-shared/src/lib/kilo-pass/state.ts
  • services/kilo-mcp/catalog.json

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 219.2K · Output: 24.8K · Cached: 2.3M

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the do-not-merge Do not merge this PR (yet) label Oct 8, 2026
…o-pass-backend

# Conflicts:
#	.kilo/skills/kilo-mcp/SKILL.md
#	.specs/kilo-pass.md
#	apps/web/src/lib/kilo-pass/apple-store-notifications.test.ts
#	apps/web/src/lib/kilo-pass/apple-store-notifications.ts
#	apps/web/src/lib/kilo-pass/google-play-notifications.test.ts
#	apps/web/src/lib/kilo-pass/google-play-notifications.ts
#	apps/web/src/lib/kilo-pass/google-play-subscription-state.ts
#	apps/web/src/lib/kilo-pass/store-subscription-completion.test.ts
#	apps/web/src/lib/kilo-pass/store-subscription-completion.ts
#	apps/web/src/lib/kilo-pass/store-subscription-reconcile.test.ts
#	apps/web/src/lib/kilo-pass/store-subscription-reconcile.ts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Do not merge this PR (yet)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants