Skip to content

Commit fdc03e3

Browse files
test: keep 429 title coverage at the provider failure layer
AI-assisted; verified with the tests and tools listed above.
1 parent 4a54bce commit fdc03e3

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

‎apps/web/src/components/chat/UsageLimitRecoveryBanner.test.tsx‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,6 @@ function bannerDescription(resetAt: Date, timestampFormat: TimestampFormat) {
2222
}
2323

2424
describe("usageLimitRecoveryBannerItem", () => {
25-
it.each([
26-
["responseTooManyFailedAttempts", "Provider rate limit (HTTP 429)"],
27-
["usageLimitExceeded", "Usage limit reached"],
28-
] as const)("keeps %s manually recoverable without a reported reset", (errorCode, title) => {
29-
const banner = usageLimitRecoveryBannerItem({
30-
runId: RunId.make("run-1"),
31-
errorCode,
32-
resetAt: null,
33-
stoppedAt: stoppedAt.toISOString(),
34-
snoozedUntil: null,
35-
recovery: null,
36-
timestampFormat: "24-hour",
37-
onChange: async () => {},
38-
});
39-
expect(banner.title).toBe(title);
40-
expect(banner.description).toBe("No reset time reported; retry manually");
41-
expect(banner.actions).toBeNull();
42-
});
43-
4425
it.each([
4526
["12-hour", "Resets 5:30 PM"],
4627
["24-hour", "Resets 17:30"],

‎packages/provider-core/src/server/failure.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ it("does not serialize arbitrary provider causes", () => {
279279
it.each([
280280
["usage_limit", "responseTooManyFailedAttempts", "Provider rate limit (HTTP 429)"],
281281
["usage_limit", "usageLimitExceeded", "Usage limit reached"],
282-
["usage_limit", "rateLimitExceeded", "Usage limit reached"],
283282
["provider_error", "responseTooManyFailedAttempts", "Provider error"],
284283
] as const)(
285284
"titles %s / %s failures without changing recovery evidence",

0 commit comments

Comments
 (0)