feat(archera): soft-pitch insurance after CLI purchase + update web signup link#1280
Conversation
…ignup link After a successful real RI purchase, the CLI now prints a non-blocking suggestion to insure commitments to 100% coverage via Archera within the first 7 days, followed by the sponsorship disclosure. The pitch is gated on `!isDryRun && riSuccess > 0` so it never shows on dry runs or zero-purchase runs. The web interface (frontend) Archera signup link is updated to the new canonical attribution URL https://www.archera.ai/cudly, matching the URL used by the CLI pitch. - cmd/multi_service_stats.go: add archeraSignupURL const + printArcheraPitch() - cmd/multi_service_stats_test.go: regression test covering dry-run (no pitch), zero-success (no pitch), and success (pitch + URL + disclosure visible) - frontend/src/archera.ts: ARCHERA_SIGNUP_URL -> https://www.archera.ai/cudly Note: email templates (internal/email/templates.go) still reference the prior archera.ai/signup?mode=cudly URL; left out of this change as it targets the web interface + CLI only.
|
Warning Review limit reached
More reviews will be available in 34 minutes and 19 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe CLI final message now prints an Archera pitch after successful reserved-instance purchases, tests cover the new output conditions, and the frontend Archera signup URL now points to the canonical destination. ChangesArchera pitch and signup URL
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cmd/multi_service_stats_test.go (1)
529-532: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin the canonical URL in this assertion.
Using
archeraSignupURLhere only proves the message prints whatever the production constant currently contains. It will not catch a regression where the constant changes to the wrong destination. Assert the canonical literal URL (or add a dedicated literal-value test) so this PR’s contract is actually covered.Suggested change
- wantOutput: []string{"Purchase operations completed", "underutilization insurance", archeraSignupURL, "first 7 days", "sponsors CUDly's Open Source"}, + wantOutput: []string{"Purchase operations completed", "underutilization insurance", "https://www.archera.ai/cudly", "first 7 days", "sponsors CUDly's Open Source"},🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cmd/multi_service_stats_test.go` around lines 529 - 532, The test case in multi_service_stats_test.go is only checking the archeraSignupURL constant value indirectly, so it won’t catch a bad redirect target. Update the assertion in the "Successful purchase shows Archera pitch with URL and disclosure" case to pin the canonical literal URL directly (or add a separate literal-value assertion) in the wantOutput for the purchase flow. Use the existing test data around the purchase-success scenario and the archeraSignupURL reference to locate the assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@cmd/multi_service_stats_test.go`:
- Around line 529-532: The test case in multi_service_stats_test.go is only
checking the archeraSignupURL constant value indirectly, so it won’t catch a bad
redirect target. Update the assertion in the "Successful purchase shows Archera
pitch with URL and disclosure" case to pin the canonical literal URL directly
(or add a separate literal-value assertion) in the wantOutput for the purchase
flow. Use the existing test data around the purchase-success scenario and the
archeraSignupURL reference to locate the assertion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d2dddb6d-f56a-4c26-85bd-98e19e93dd7f
📒 Files selected for processing (3)
cmd/multi_service_stats.gocmd/multi_service_stats_test.gofrontend/src/archera.ts
Replace archeraSignupURL constant with the literal URL in the positive wantOutput assertion so the test catches regressions where the constant changes to a wrong destination, not just that the constant's current value appears in output.
|
@coderabbitai review |
|
@coderabbitai full review |
✅ Action performedReview finished.
|
✅ Action performedFull review finished. |
The CLI pitch printed after a successful RI purchase included the
sponsorship disclosure but not the non-gating disclosure ("CUDly works
fully without Archera"). The project_archera_partnership memory commits
to keeping BOTH disclosures visible everywhere the Archera integration
is surfaced: education pages, modal CTAs, email templates, and now the
CLI pitch.
Add the non-gating disclosure as a short paragraph between the signup
prompt and the sponsorship paragraph, and extend the regression test to
assert both disclosures appear in the success-path output.
|
Adversarial review applied (PR #1280): In-scope fix landed (e250de0): the CLI pitch carried the sponsorship disclosure but was missing the non-gating disclosure. The Adversarial findings on the rest of the PR — all green:
UNSTABLE check: all three failing checks ( Follow-ups filed (out of scope):
@coderabbitai review |
|
(•ᴗ•)っ🐇 ✏️ Learnings added
✅ Action performedReview finished.
|
What
Two related Archera changes:
ARCHERA_SIGNUP_URLis updated to the new canonical attribution URLhttps://www.archera.ai/cudly, matching the URL used by the CLI pitch.Details
cmd/multi_service_stats.go: newarcheraSignupURLconst +printArcheraPitch(). The pitch is gated on!isDryRun && riSuccess > 0, so it never appears on dry runs or runs with zero successful purchases.cmd/multi_service_stats_test.go:TestPrintFinalMessageregression test covering all three cases — dry-run (no pitch), zero-success (no pitch), and success (pitch + URL + 7-day window + sponsorship disclosure all visible).frontend/src/archera.ts:ARCHERA_SIGNUP_URL->https://www.archera.ai/cudly(and its docstring). The existing frontend tests assert against the exported const, so they remain green.Pitch copy (CLI)
Out of scope / follow-up
The approval/confirmation email templates (
internal/email/templates.go, asserted ininternal/email/template_renderers_test.go) still reference the priorhttps://archera.ai/signup?mode=cudlyURL. This PR is scoped to the web interface + CLI as requested. If the new URL should be canonical everywhere, the email templates and their test should be updated in a follow-up.Testing
go build ./cmd/...— successgo test ./cmd/ -run TestPrintFinalMessage— 4 passnpx jest archera(frontend) — passSummary by CodeRabbit