Skip to content

feat(credits): add CLAWNYC promo code#1089

Open
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
add-clawnyc-promo-code
Open

feat(credits): add CLAWNYC promo code#1089
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
add-clawnyc-promo-code

Conversation

@kilo-code-bot
Copy link
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 13, 2026

Summary

  • Add user-redeemable promo code CLAWNYC with $10 credit value and 2,000 max redemptions
  • Added as a self-service encrypted entry in encryptedSelfServicePromos following the existing pattern
  • Action required before merge: the encrypted_credit_category value must be re-encrypted with the production CREDIT_CATEGORIES_ENCRYPTION_KEY by running pnpm promo encrypt CLAWNYC and updating the value

Verification

  • pnpm typecheck — passes
  • prettier --write — no formatting changes needed
  • Verified entry structure matches SelfServicePromoCreditCategoryConfig type requirements (is_user_selfservicable: true, is_idempotent: true, total_redemptions_allowed, amount_usd)

Visual Changes

N/A

Reviewer Notes

  • The encrypted_credit_category is a placeholder encrypted with a temporary key. Before merging, a team member with access to the production CREDIT_CATEGORIES_ENCRYPTION_KEY must run pnpm promo encrypt CLAWNYC and replace the value. This follows the same workflow seen in commits aacccb3f191eabf6.
  • No customer_requirement is set, making this redeemable by any user.
  • No promotion_ends_at or expiry_hours is set — add these if the promo should have a time limit.

Built for Brendan by Kilo for Slack

},
{
// TODO: re-encrypt with production key: pnpm promo encrypt CLAWNYC
encrypted_credit_category: 'BQvtkd104X5pIN+mKn21Tw==:PLQKIZGhb19EG21tRBjV7w==:0MmIBfnr3g==',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: This promo is encrypted with the wrong key and will fail to load in production

encryptedSelfServicePromos is decrypted eagerly when this module is imported. Because this ciphertext is still marked for re-encryption with the production key, decryptPromoCode(encrypted_credit_category) will throw under the production CREDIT_CATEGORIES_ENCRYPTION_KEY, which can break promo loading at startup.

@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Mar 13, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

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

CRITICAL

File Line Issue
src/lib/promoCreditCategories.ts 652 Promo ciphertext is still using a non-production key, so eager decryption can fail in production.
Other Observations (not in diff)

None.

Fix these issues in Kilo Cloud

Files Reviewed (1 files)
  • src/lib/promoCreditCategories.ts - 1 issue

Reviewed by gpt-5.4-20260305 · 149,662 tokens

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.

0 participants