Skip to content

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

TypeScript

test(mcp-host): give the slow-backlog shutdown test room above load

Alfredo Lopezd983af862b99
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index ac0c8c719..b7d1ee9a8 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.577",
+ "version": "0.1.578",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.577",
+ "version": "0.1.578",
"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 a3cd4abbc..bf210a010 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.577",
+ "version": "0.1.578",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/core/conversation/persistence/__tests__/persistFailureExit.test.ts b/mcp-host/src/core/conversation/persistence/__tests__/persistFailureExit.test.ts
index 7258b1032..6d3a723f8 100644
--- a/mcp-host/src/core/conversation/persistence/__tests__/persistFailureExit.test.ts
+++ b/mcp-host/src/core/conversation/persistence/__tests__/persistFailureExit.test.ts
@@ -66,7 +66,11 @@ const handle = createConversationStore({
cacheSize: 10,
syncTimeoutMs: 5000,
asyncTimeoutMs: 50,
- stallTimeoutMs: 300,
+ // The slow backlog needs room above a loaded machine's ACK gap: 30 ms per
+ // write, yet one full-suite run stopped it after 4 writes in 1.5 s, which
+ // in this stand-in only the 300 ms bound can do. It still has to finish
+ // past asyncTimeoutMs, the old close() budget.
+ stallTimeoutMs: scenario === 'shutdown-slow-backlog' ? 5000 : 300,
checkpointEveryWrites: 100,
heartbeatMs: 60000,
workerScriptPath: workerPath,
@@ -195,9 +199,12 @@ describe('Host process exit on a graceful shutdown', () => {
const run = runChild('shutdown-slow-backlog')
expect(run.out).toContain('FIRST_WRITE_ACKED')
// Liveness witness: every queued write reached the store.
- expect(run.writes).toEqual(['first', ...Array.from({ length: 20 }, (_, i) => `slow${i}`)])
+ expect(run.writes, run.out).toEqual([
+ 'first',
+ ...Array.from({ length: 20 }, (_, i) => `slow${i}`),
+ ])
expect(run.out).not.toContain('ConversationStore shutdown failed')
- expect(run.status).toBe(0)
+ expect(run.status, run.out).toBe(0)
})
it('exits 1 when the store cannot drain because the worker is wedged', () => {