Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(mcp-host): prove removed GFS storage variables do not limit retained storage
Alfredo Lopez3389c0794da9
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex 749f1749e..36bbaa7f8 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.548",+ "version": "0.1.549","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.548",+ "version": "0.1.549","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 6ce40b79c..228af3c56 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.548",+ "version": "0.1.549","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/internalTools/gfsDownloadStoreBudget.test.ts b/mcp-host/src/internalTools/gfsDownloadStoreBudget.test.tsindex 51182bae5..e34ed0a5d 100644--- a/mcp-host/src/internalTools/gfsDownloadStoreBudget.test.ts+++ b/mcp-host/src/internalTools/gfsDownloadStoreBudget.test.ts@@ -502,6 +502,24 @@ describe('GFS download store budget: removed variables', () => {).toEqual([...REMOVED_GFS_STORAGE_VARIABLES].sort())})+ it('BUD-9c: removed variables set to 1 byte and 1 file do not limit retained storage', async () => {+ // Set for the whole test and the store re-imported with them, so a limit+ // read at module load or at admission would apply. Two 40-byte copies for+ // one caller exceed both old limits; the 85-byte budget of a 101-byte+ // volume admits them.+ const removed = Object.fromEntries(REMOVED_GFS_STORAGE_VARIABLES.map(name => [name, '1']))+ for (const [name, value] of Object.entries(removed)) vi.stubEnv(name, value)+ volumeOf(101n)+ const store = await limitedStore(removed)+ const first = await completedCopy(store, rootA, A, 1, 40)+ tick()+ const second = await completedCopy(store, rootA, A, 2, 40)++ await expect(store.readManagedFile(first.receipt.path, A)).resolves.toEqual(first.bytes)+ await expect(store.readManagedFile(second.receipt.path, A)).resolves.toEqual(second.bytes)+ expect(statfsBoundary).toHaveBeenCalled()+ })+it('BUD-10: with no removed variable set nothing is warned and the store initializes', async () => {for (const name of REMOVED_GFS_STORAGE_VARIABLES) vi.stubEnv(name, undefined)const warn = vi.spyOn(logger, 'warn')diff --git a/scripts/ci/pinned-vitest-cases/mcp-host.json b/scripts/ci/pinned-vitest-cases/mcp-host.jsonindex 11e8f5fb8..482c21444 100644--- a/scripts/ci/pinned-vitest-cases/mcp-host.json+++ b/scripts/ci/pinned-vitest-cases/mcp-host.json@@ -815,6 +815,10 @@"suite": "gfsDownloadStoreBudget.test.ts","fullName": "GFS download store budget: removed variables BUD-9b: every removed variable set at once gives one warning each"},+ {+ "suite": "gfsDownloadStoreBudget.test.ts",+ "fullName": "GFS download store budget: removed variables BUD-9c: removed variables set to 1 byte and 1 file do not limit retained storage"+ },{"suite": "gfsDownloadStoreBudget.test.ts","fullName": "GFS download store budget: removed variables BUD-10: with no removed variable set nothing is warned and the store initializes"