Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(mcp-host): a non-positive Retry-After is not retried (#720)

Alfredo Lopezf9c07083e8cc
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index 2040221ae..2553ab767 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.462",
+ "version": "0.1.463",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.462",
+ "version": "0.1.463",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.0",
diff --git a/mcp-host/package.json b/mcp-host/package.json
index fadcf0a3b..023bec761 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.462",
+ "version": "0.1.463",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/llm/__tests__/codexSubscription.test.ts b/mcp-host/src/llm/__tests__/codexSubscription.test.ts
index 91dc1be51..b42ee4ce2 100644
--- a/mcp-host/src/llm/__tests__/codexSubscription.test.ts
+++ b/mcp-host/src/llm/__tests__/codexSubscription.test.ts
@@ -1519,6 +1519,10 @@ describe('CodexSubscriptionProvider Retry-After retry (G1-9, #720)', () => {
it.each([
['G1-9b: without Retry-After', undefined],
['G1-9c: over the 30 s cap', 31_000],
+ // The Host parser never yields these; a non-positive value built directly
+ // into the error is treated as absent (@claude review, PR #821).
+ ['G1-9j: a zero Retry-After', 0],
+ ['G1-9j: a negative Retry-After', -1000],
])('%s the 429 is thrown with no retry', async (_label, retryAfterMs) => {
vi.useFakeTimers()
const err = limited(retryAfterMs)
diff --git a/mcp-host/src/llm/__tests__/grokSubscription.test.ts b/mcp-host/src/llm/__tests__/grokSubscription.test.ts
index 41e6f63de..e11fe0a33 100644
--- a/mcp-host/src/llm/__tests__/grokSubscription.test.ts
+++ b/mcp-host/src/llm/__tests__/grokSubscription.test.ts
@@ -904,6 +904,10 @@ describe('GrokSubscriptionProvider Retry-After retry (G1-9, #720)', () => {
it.each([
['G1-9b: without Retry-After', undefined],
['G1-9c: over the 30 s cap', 31_000],
+ // The Host parser never yields these; a non-positive value built directly
+ // into the error is treated as absent (@claude review, PR #821).
+ ['G1-9j: a zero Retry-After', 0],
+ ['G1-9j: a negative Retry-After', -1000],
])('%s the 429 is thrown with no retry', async (_label, retryAfterMs) => {
vi.useFakeTimers()
const err = limited(retryAfterMs)