Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(mcp-host): pin the compaction pre-prune default (#731)
Alfredo Lopeze6d43c7aa49e
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex cd947ff9e..31e677e92 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.368",+ "version": "0.1.369","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.368",+ "version": "0.1.369","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 3dc925d7b..826596dc8 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.368",+ "version": "0.1.369","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/config.compactionPrePrune.test.ts b/mcp-host/src/config.compactionPrePrune.test.tsnew file mode 100644index 000000000..efbba55f5--- /dev/null+++ b/mcp-host/src/config.compactionPrePrune.test.ts@@ -0,0 +1,24 @@+import { afterEach, describe, expect, it, vi } from 'vitest'++afterEach(() => {+ vi.unstubAllEnvs()+ vi.resetModules()+})++describe('compaction pre-prune default (#731)', () => {+ it('T-B pre-prune is on by default and the env var remains the kill switch', async () => {+ // Both halves live in one test on purpose: each is the other's liveness+ // witness. Two different values out of two evaluations prove the module was+ // really re-evaluated and the env really read, so neither assertion can+ // pass on a module cached from an earlier test.+ vi.resetModules()+ vi.stubEnv('CLERUM_COMPACTION_PRE_PRUNE', undefined)+ const unset = await import('./config')+ expect(unset.config.compactionPrePruneEnabled).toBe(true)++ vi.resetModules()+ vi.stubEnv('CLERUM_COMPACTION_PRE_PRUNE', 'false')+ const disabled = await import('./config')+ expect(disabled.config.compactionPrePruneEnabled).toBe(false)+ })+})