Skip to content

Commit 906aa5d

Browse files
test(server): reproduce Antigravity quota taken from the wrong endpoint
Reproduces #32419: for a personal sign-in, the probe merges both quota endpoints by keeping the most-used reading, so cloudcode-pa's exhausted Argon weekly bucket overrides the daily endpoint's real 13.77% reading and its reset. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 83a3674 commit 906aa5d

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

‎apps/server/src/provider/antigravityUsageLimits.test.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,42 @@ describe("Antigravity subscription limits", () => {
478478
}).pipe(Effect.scoped, Effect.provide(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))),
479479
);
480480

481+
// Oracle: reported payloads for a personal sign-in, whose runtime meters on the daily endpoint.
482+
it.effect("reports a personal account's quota from the daily endpoint it is metered on", () =>
483+
Effect.gen(function* () {
484+
yield* TestClock.setTime(DateTime.toEpochMillis(DateTime.makeUnsafe("2026-11-07T12:00:00Z")));
485+
const argon = (remainingFraction: number, resetTime: string) => ({
486+
groups: [
487+
{
488+
displayName: "Gemini 4 Argon",
489+
buckets: [
490+
{
491+
bucketId: "gemini-argon-wtu-weekly",
492+
window: "weekly",
493+
remainingFraction,
494+
resetTime,
495+
},
496+
],
497+
},
498+
],
499+
});
500+
const { probe } = yield* fixture({
501+
authMethod: "oauth-personal",
502+
summaryByHost: {
503+
"daily-cloudcode-pa.googleapis.com": argon(0.8623059, "2026-11-14T08:41:35Z"),
504+
"cloudcode-pa.googleapis.com": argon(0, "2026-11-08T18:27:14Z"),
505+
},
506+
});
507+
expect((yield* probe).windows).toEqual([
508+
expect.objectContaining({
509+
id: "gemini-argon-wtu-weekly",
510+
usedPercent: expect.closeTo(13.77, 2),
511+
resetsAt: "2026-11-14T08:41:35.000Z",
512+
}),
513+
]);
514+
}).pipe(Effect.scoped, Effect.provide(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))),
515+
);
516+
481517
it.effect("labels Argon's weekly quota apart from the default Gemini weekly quota", () =>
482518
Effect.gen(function* () {
483519
const { probe } = yield* fixture({

0 commit comments

Comments
 (0)