Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Cloud computer limits: a trial's hours "come back on" their date (#5497)

Milind Soni624cd607c524
diff --git a/server/auto-vm-claims.test.ts b/server/auto-vm-claims.test.ts
index 2ab7eaab54..28cff4e3f0 100644
--- a/server/auto-vm-claims.test.ts
+++ b/server/auto-vm-claims.test.ts
@@ -209,8 +209,8 @@ describe("lazyClaimFailedText", () => {
it("names the plan's limit in its own sentence when the Admin turned the computer away", () => {
expect(lazyClaimFailedText({ ...boat, cause: "Your Pro free trial's 20 cloud computer hours are used up.",
- limit: "This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.", backOnAuto: true })).toBe(
- "The cloud computer could not be started. This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov. " +
+ limit: "This Cloud's free trial cloud computer hours are used up; they come back on 14 Nov.", backOnAuto: true })).toBe(
+ "The cloud computer could not be started. This Cloud's free trial cloud computer hours are used up; they come back on 14 Nov. " +
"This call was not performed. This conversation is back on Auto. Do not retry computer work in this turn; tell the person what you could not do.");
});
diff --git a/server/boat-limit.test.ts b/server/boat-limit.test.ts
index 3fb45d74bc..7851f769c0 100644
--- a/server/boat-limit.test.ts
+++ b/server/boat-limit.test.ts
@@ -12,7 +12,7 @@ describe("a refused cloud computer start, from the Admin's answer to the bot and
const refused = boatRefusal(429, "boat create", envelope(TRIAL_HOURS, { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20, resetsAt: "2026-11-14T09:00:00.000Z" }), true);
expect(cloudFailureOf(refused)).toEqual({ message: TRIAL_HOURS, code: "limit_reached", status: 429,
limit: { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20, resetsAt: "2026-11-14T09:00:00.000Z" } });
- expect(cloudLimitText(refused)).toBe("This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.");
+ expect(cloudLimitText(refused)).toBe("This Cloud's free trial cloud computer hours are used up; they come back on 14 Nov.");
expect(cloudLimitFields(refused)).toEqual({ cloudLimit: { reason: "hours_used", trial: true, plan: "Pro", limit: 20, used: 20, resetsAt: "2026-11-14T09:00:00.000Z" } });
});
diff --git a/shared/place-view.test.ts b/shared/place-view.test.ts
index c01a854572..ccbea2ff72 100644
--- a/shared/place-view.test.ts
+++ b/shared/place-view.test.ts
@@ -245,9 +245,9 @@ describe("the Admin's limit, read and told to the bot", () => {
expect(told(undefined, "Your Pro plan's 50 cloud computer hours for October are used up. They reset on 1 November."))
.toBe("This Cloud's cloud computer hours for this month are used up; they reset on 1 November.");
expect(told({ reason: "hours_used", trial: true, resetsAt: "2026-11-14T09:00:00.000Z" }))
- .toBe("This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.");
+ .toBe("This Cloud's free trial cloud computer hours are used up; they come back on 14 Nov.");
expect(told(undefined, "Your Pro free trial's 20 cloud computer hours are used up. Your full allowance starts with your first payment on 14 Nov."))
- .toBe("This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment on 14 Nov.");
+ .toBe("This Cloud's free trial cloud computer hours are used up; they come back on 14 Nov.");
expect(told({ reason: "hours_used" })).toBe("This Cloud's cloud computer hours for this month are used up.");
for (const message of ["Your Personal plan includes 1 cloud computer at once. Delete one to start another.", "Your Pro free trial includes 2 cloud computers at once. Delete 2 to start one again."]) {
expect(told(undefined, message)).toBe("This Cloud already has as many cloud computers running as its plan allows.");
diff --git a/shared/place-view.ts b/shared/place-view.ts
index 2a72d9c70e..0aa6a8a0d6 100644
--- a/shared/place-view.ts
+++ b/shared/place-view.ts
@@ -550,7 +550,7 @@ export function cloudLimitSentence(failure: CloudFailure): string | null {
switch (limit?.reason) {
case "hours_used":
return limit.trial
- ? `This Cloud's free trial cloud computer hours are used up; its full allowance starts with its first payment${limit.resets ? ` on ${limit.resets}` : ""}.`
+ ? `This Cloud's free trial cloud computer hours are used up${limit.resets ? `; they come back on ${limit.resets}` : ""}.`
: `This Cloud's cloud computer hours for this month are used up${limit.resets ? `; they reset on ${limit.resets}` : ""}.`;
case "at_once":
return "This Cloud already has as many cloud computers running as its plan allows.";