fix(kiloclaw): tighten checkout guardrails#2579
Open
jeanduplessis wants to merge 2 commits intojdp/kiloclaw-spec-compliance-pr1-specsfrom
Open
fix(kiloclaw): tighten checkout guardrails#2579jeanduplessis wants to merge 2 commits intojdp/kiloclaw-spec-compliance-pr1-specsfrom
jeanduplessis wants to merge 2 commits intojdp/kiloclaw-spec-compliance-pr1-specsfrom
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 230,931 tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rejects invalid Kilo Pass upsell selections server-side while preserving standalone checkout promo-code support.
Why this change is needed
The upsell flow allowed a monthly tier 19 selection to proceed with commit hosting even though that tier cannot fund the first commit period. This rule must be enforced on the server so invalid combinations cannot slip past UI checks. Promo-code support on standalone Stripe checkout also needed to remain intact after product clarified that spec requirement.
How this is addressed
19when paired withhostingPlan='commit'before creating a Stripe checkout session.Verification
pnpm test -- apps/web/src/routers/kiloclaw-billing-router.test.tspnpm typecheckpnpm formatVisual Changes
N/A
Reviewer Notes
Human Reviewer
Code Reviewer Agent
Code Reviewer Notes
- Validation lives in `createKiloPassUpsellCheckout` and intentionally rejects before Stripe session creation. - Regression coverage was added in `apps/web/src/routers/kiloclaw-billing-router.test.ts` for the invalid monthly-19/commit path. - Followed `Kilo Pass Upsell Checkout` rule 4 from the billing spec and kept standalone checkout promo-code behavior aligned with updated product guidance.