Skip to content

Apply October 9 UTC cutoff to monthly Kilo Pass welcome bonuses - #7284

Merged
iscekic merged 7 commits into
mainfrom
igor/kilo-pass-month-two-bonus
Oct 8, 2026
Merged

iscekic merged 7 commits into
mainfrom
igor/kilo-pass-month-two-bonus

Conversation

@iscekic

@iscekic iscekic commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Monthly behavior

Cutoff: 2026-10-09 00:00:00 UTC, based on the subscription's original start timestamp.

Subscriber Month 1 Month 2 Month 3
Eligible first-time, before cutoff 50% 10% 15%
Eligible first-time, at or after cutoff 5% 50% 15%
Non-first-time, either side 5% 10% 15%
  • Later monthly bonuses keep the normal ramp, capped at 40%.
  • Yearly bonuses remain unchanged.
  • Existing payment eligibility and usage unlock rules remain unchanged.
  • A pending referral reward skips the welcome-month issuance and applies to the next issuance. This applies to referees and referrers.
  • Without this change, a referral reward in month 2 blocks the new month-2 welcome promo.
  • getState again shows the welcome promo to users with no subscription. feat(mobile): add Apple Kilo Pass purchases #3079 changed this to false on May 13.
  • Remove the pre-May-7 double welcome promotion.
  • Remove the stored schedule flag and its unshipped migration. No database migration is required.
  • Update offers and previews for the actual signup date and first-time eligibility.

Verification

  • Ran the production usage-triggered grant function against an isolated Google Cloud VM database.
  • Verified eight database-backed grant cases: immediately before cutoff, exactly at cutoff, returning accounts, and old May starts.
  • Replayed every case and confirmed one bonus grant and a cleared threshold.
  • Verified live monthly subscription cards and bonus dialogs for both cutoff cohorts.
  • Mounted the real KiloClaw billing components in a temporary VM route and checked first-time, returning, and yearly offers.
  • Used a browser-only clock set to the cutoff to verify prospective offers after midnight.
  • The VM regression run passed 498 cases; two stale assertions were corrected and their four-case regression subset passed locally.
  • Referral deferral: a new DB-backed test covers referees and referrers at the cutoff, a referee before the cutoff, and a returning referrer.
  • The deferred cases failed without the fix (2 of 4) and passed with it. The month-2 welcome bonus was 50%, and the reward applied in month 3.
  • stripe-handlers-invoice-paid.test.ts passed 58 tests. The usage-triggered, issuance, and bonus suites passed 84 tests.
  • Passed shared and web typechecks and PR-only lint.
  • Deleted the verification VM, tunnels, temporary routes, browser profile, and local test service.

Deployment

Deploy the application before the cutoff. The subscription start timestamp selects the welcome month, not the deployment time.

@iscekic iscekic self-assigned this Oct 8, 2026
@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change adds a single clause to referral rule 120 in .specs/impact-referrals.md, exempting the welcome-month issuance and cross-referencing rule 123. The reference is valid and consistent; no code findings.

Files Reviewed (1 file)
  • .specs/impact-referrals.md
Previous Review Summaries (4 snapshots, latest commit 3d1502f)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 3d1502f)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The follow-up makes the welcome-month issuance free of referral rewards by deferring a pending referral bonus when a monthly invoice pays the 50% welcome promo, extracts a shared getMonthlyWelcomePromoAccountContext helper, and updates the specs and tests. The deferral, streak computation, and decision inputs are consistent across the invoice-paid and usage-triggered paths, and the prior findings remain resolved.

Files Reviewed (7 files)
  • .specs/impact-referrals.md
  • .specs/kilo-pass.md
  • apps/web/src/lib/kilo-pass/stripe-handlers-invoice-paid.ts
  • apps/web/src/lib/kilo-pass/stripe-handlers-invoice-paid.test.ts
  • packages/web-shared/src/lib/kilo-pass/issuance.ts
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.ts
  • packages/web-shared/src/lib/kilo-pass/welcome-promo-context.ts

Previous review (commit b7b370c)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The follow-up rewrites the monthly welcome-bonus schedule to select month 1 or month 2 from the subscription start timestamp against the 2026-10-09 UTC cutoff, removes the stored schedule flag and its unshipped migration, and keeps the grant logic, ramp dialog, and upsell/preview copy consistent; the prior findings remain resolved and no new issues were found in the changed lines.

Files Reviewed (33 files)
  • .specs/impact-referrals.md
  • .specs/kilo-pass.md
  • apps/web/src/app/(app)/claw/components/billing/PlanSelectionDialog.tsx
  • apps/web/src/app/(app)/claw/components/billing/WelcomePage.tsx
  • apps/web/src/components/profile/kilo-pass/KiloPassActiveSubscriptionCard.logic.ts
  • apps/web/src/components/profile/kilo-pass/KiloPassActiveSubscriptionCard.test.ts
  • apps/web/src/components/profile/kilo-pass/KiloPassBonusRampDialog.tsx
  • apps/web/src/components/profile/kilo-pass/KiloPassSubscribeCard.tsx
  • apps/web/src/components/profile/kilo-pass/KiloPassTierCard.tsx
  • apps/web/src/components/subscriptions/kilo-pass/KiloPassDetail.tsx
  • apps/web/src/lib/kilo-pass/google-play-notifications.test.ts
  • apps/web/src/lib/kilo-pass/store-subscription-completion.ts
  • apps/web/src/lib/kilo-pass/store-subscription-completion.test.ts
  • apps/web/src/lib/kilo-pass/stripe-handlers-invoice-paid.ts
  • apps/web/src/lib/kilo-pass/stripe-handlers-invoice-paid.test.ts
  • apps/web/src/lib/kilo-pass/stripe-handlers-subscription-events.ts
  • apps/web/src/lib/kilo-pass/stripe-handlers-subscription-events.test.ts
  • apps/web/src/routers/kilo-pass-router.ts
  • apps/web/src/routers/kilo-pass-router.test.ts
  • apps/web/src/routers/kiloclaw-router.ts
  • packages/db/src/migrations/0272_equal_human_robot.sql (deleted)
  • packages/db/src/migrations/meta/0272_snapshot.json (deleted, generated)
  • packages/db/src/migrations/meta/_journal.json
  • packages/db/src/schema.ts
  • packages/web-shared/src/lib/kilo-pass/bonus-decision.ts
  • packages/web-shared/src/lib/kilo-pass/bonus.ts
  • packages/web-shared/src/lib/kilo-pass/bonus.test.ts
  • packages/web-shared/src/lib/kilo-pass/constants.ts
  • packages/web-shared/src/lib/kilo-pass/state.ts
  • packages/web-shared/src/lib/kilo-pass/state.test.ts
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.ts
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.test.ts
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.unit.test.ts

Previous review (commit 70fc5da)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The follow-up commit gates the yearly upsell copy on the selected cadence and bounds the welcome-promo callout to the applicable streak-month window; all five prior findings are resolved and no new issues were found in the changed lines.

Files Reviewed (5 files)
  • .specs/kilo-pass.md
  • apps/web/src/app/(app)/claw/components/billing/PlanSelectionDialog.tsx
  • apps/web/src/app/(app)/claw/components/billing/WelcomePage.tsx
  • apps/web/src/components/profile/kilo-pass/KiloPassBonusRampDialog.tsx
  • apps/web/src/components/subscriptions/kilo-pass/KiloPassDetail.tsx

Previous review (commit b022db5)

Status: 5 Issues Found | Recommendation: Address before merge

Executive Summary

The core bonus migration is correct and well-tested; the remaining issues are user-facing copy/logic that now misstates the schedule on the Yearly cadence and a welcome-promo callout shown after the promo window.

Overview

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

WARNING

File Line Issue
apps/web/src/app/(app)/claw/components/billing/PlanSelectionDialog.tsx 137 Monthly Month 1: +5%; month 2: +50% claim rendered for the Yearly cadence, which is a flat 50%/month
apps/web/src/app/(app)/claw/components/billing/WelcomePage.tsx 130 Same monthly-only claim rendered for the Yearly cadence

SUGGESTION

File Line Issue
apps/web/src/app/(app)/claw/components/billing/PlanSelectionDialog.tsx 323 "How credits work" copy describes the monthly schedule regardless of cadence
apps/web/src/app/(app)/claw/components/billing/WelcomePage.tsx 316 "How credits work" copy describes the monthly schedule regardless of cadence
apps/web/src/components/subscriptions/kilo-pass/KiloPassDetail.tsx 239 Welcome-promo callout no longer bounded to streak months 1-2
Files Reviewed (30 files)
  • .specs/kilo-pass.md - no issues
  • .specs/impact-referrals.md - no issues
  • apps/web/src/app/(app)/claw/components/billing/PlanSelectionDialog.tsx - 2 issues
  • apps/web/src/app/(app)/claw/components/billing/WelcomePage.tsx - 2 issues
  • apps/web/src/components/profile/ProfileKiloPassSection.tsx - no issues
  • apps/web/src/components/profile/kilo-pass/KiloPassActiveSubscriptionCard.logic.ts - no issues
  • apps/web/src/components/profile/kilo-pass/KiloPassActiveSubscriptionCard.test.ts - no issues
  • apps/web/src/components/profile/kilo-pass/KiloPassBonusRampDialog.tsx - no issues
  • apps/web/src/components/profile/kilo-pass/KiloPassSubscribeCard.tsx - no issues
  • apps/web/src/components/profile/kilo-pass/KiloPassTierCard.tsx - no issues
  • apps/web/src/components/subscriptions/kilo-pass/KiloPassDetail.tsx - 1 issue
  • apps/web/src/components/subscriptions/kilo-pass/KiloPassGroup.tsx - no issues
  • apps/web/src/lib/kilo-pass/google-play-notifications.test.ts - no issues
  • apps/web/src/lib/kilo-pass/store-subscription-completion.ts - no issues
  • apps/web/src/lib/kilo-pass/store-subscription-completion.test.ts - no issues
  • apps/web/src/lib/kilo-pass/stripe-handlers-invoice-paid.ts - no issues
  • apps/web/src/lib/kilo-pass/stripe-handlers-invoice-paid.test.ts - no issues
  • apps/web/src/lib/kilo-pass/stripe-handlers-subscription-events.ts - no issues
  • apps/web/src/lib/kilo-pass/stripe-handlers-subscription-events.test.ts - no issues
  • apps/web/src/routers/kilo-pass-router.ts - no issues
  • apps/web/src/routers/kilo-pass-router.test.ts - no issues
  • apps/web/src/routers/kiloclaw-router.ts - no issues
  • packages/db/src/migrations/0272_equal_human_robot.sql - no issues
  • packages/db/src/migrations/meta/0272_snapshot.json - generated
  • packages/db/src/migrations/meta/_journal.json - generated
  • packages/db/src/schema.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/bonus-decision.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/bonus.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/bonus.test.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/constants.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/state.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/state.test.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.test.ts - no issues
  • packages/web-shared/src/lib/kilo-pass/usage-triggered-bonus.unit.test.ts - no issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 30.8K · Output: 2.2K · Cached: 198.8K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic changed the title Move new monthly Kilo Pass welcome bonus to month 2 Apply October 9 UTC cutoff to monthly Kilo Pass welcome bonuses Oct 8, 2026
A pending referral reward filled the month-2 issuance bonus slot. Starts at
or after the October 9 cutoff then lost the month-2 welcome promo. The reward
now waits for the next eligible issuance, for referees and referrers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants