Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 1
Please check the settings in the CodeRabbit UI or the
|
b1c9aa0 to
12234c6
Compare
1d50ba2 to
7f67a5b
Compare
|
@claude review |
There was a problem hiding this comment.
An organization admin can view or raise the monthly spending cap at claude.ai/admin-settings/usage, on the Claude Code Review row under Services. The cap resets at the start of the next billing period.
Once the cap resets or is raised, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
12234c6 to
e036578
Compare
7f67a5b to
80eb401
Compare
e036578 to
ad3ecae
Compare
80eb401 to
1d9a57c
Compare
ad3ecae to
a39d61e
Compare
1d9a57c to
b020646
Compare
Referred sign-ups now get the env-configured referral trial deployment allowance instead of the standard trial amount, exposed via GET /v1/referral and shown on the onboarding page.
Kills two surviving mutants from the stryker run: a zero-cents edge case on the recorded referral trial amount, and a sign check on the trial activation latency passed to instrumentation.
recordTrialGranted ran after the wallet was marked activatedAt, so a failure there left the trial credits unrecorded while the retry short-circuited on the already-activated wallet and reported success. Granting on-chain, then recording the referral trial, then activating means a failure anywhere leaves the wallet unactivated and the retry replays the whole sequence.
A referred user briefly saw the default trial amount before the referral query resolved and swapped in the referral amount.
a39d61e to
ba1c23e
Compare
b020646 to
10cb1a6
Compare
Why
Closes CON-1190. A bigger trial gives affiliates something to offer and gives referred users enough credit to try a real workload. The standard trial is $1.
Stacked on #4276.
What
REFERRAL_TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNTas their trial deployment limit ($5 by default), and everyone else keeps the standard trial. The amount is an env value, so we can change it without a release. Fees, the anti-abuse checks, deployment limits and expiry are unchanged.trial_startedin Amplitude now carriesis_referralandtrial_credits_usd.GET /v1/referralreturns the referred user's trial amount ({ data: null }for everyone else). The onboarding page shows that amount and falls back toNEXT_PUBLIC_TRIAL_CREDITS_AMOUNT. It only asks whileaffiliate_programis on, so with the flag off it makes no new request and works against an API that predates this PR.Ops: set
REFERRAL_TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNTin Doppler if we want something other than $5 (same micro-denom unit asTRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT).Testing
Unit specs for the wallet initializer (referred, not referred, the anti-abuse checks for referred users, a failed record), the referral service, the query hook and the onboarding page, plus a functional spec for the endpoint. Mutation score on changed lines: API 100%, deploy-web 100%.
Screenshots
Onboarding for a user who signed up through an affiliate link: