Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(rpc-proxy): reset mocks between wake-and-hold route tests
Alfredo Lopez5dc1ad46c0bb
diff --git a/external-rest-api/src/releaseManifest.ts b/external-rest-api/src/releaseManifest.tsindex 1667e8927..ff255b2ae 100644--- a/external-rest-api/src/releaseManifest.ts+++ b/external-rest-api/src/releaseManifest.ts@@ -9,7 +9,7 @@ export type ReleaseManifest = {export const releaseManifest: ReleaseManifest = {releaseId: 'v0.10.0',externalRestApiVersion: '0.1.96',- rpcProxyVersion: '0.1.123',+ rpcProxyVersion: '0.1.124',desktopVersion: '0.10.0',minimumDesktopVersion: '0.1.252',}diff --git a/rpc-proxy/package-lock.json b/rpc-proxy/package-lock.jsonindex ba506ddc8..9c77755e3 100644--- a/rpc-proxy/package-lock.json+++ b/rpc-proxy/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-rpc-proxy",- "version": "0.1.123",+ "version": "0.1.124","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-rpc-proxy",- "version": "0.1.123",+ "version": "0.1.124","dependencies": {"@clerum/jwt-key-policy": "file:../packages/jwt-key-policy","cors": "^2.8.5",diff --git a/rpc-proxy/package.json b/rpc-proxy/package.jsonindex 50dd7efe8..b94756662 100644--- a/rpc-proxy/package.json+++ b/rpc-proxy/package.json@@ -1,6 +1,6 @@{"name": "clerum-rpc-proxy",- "version": "0.1.123",+ "version": "0.1.124","description": "External-facing RPC proxy for tenant-scoped MCP access","main": "dist/main.js","engines": {diff --git a/rpc-proxy/src/__tests__/wake-and-hold-route.test.ts b/rpc-proxy/src/__tests__/wake-and-hold-route.test.tsindex be5a47b10..09dffdda0 100644--- a/rpc-proxy/src/__tests__/wake-and-hold-route.test.ts+++ b/rpc-proxy/src/__tests__/wake-and-hold-route.test.ts@@ -107,7 +107,9 @@ function postMessage(app: express.Express) {}beforeEach(() => {- vi.clearAllMocks()+ // Reset, not clear: clearing keeps implementations and queued `*Once` values,+ // so a test that stops early would hand them to the next test.+ vi.resetAllMocks()authTokenMock.verifyRpcToken.mockReturnValue({ ...VALID_CLAIMS })serviceMock.resolveHostConnectionForUser.mockResolvedValue({ ...HOST_CONNECTION })})@@ -960,8 +962,9 @@ describe('Host error bodies stay out of rpc-proxy logs', () => {const failureLines = logs.warnLines().filter(line => line.includes('[RPC_PROXY] cancel forward failed'))- // Witness: the inner catch ran and logged exactly once (the outer catch,- // which logs the same prefix, did not run).+ // Witness: a cancel failure was logged exactly once. The inner and outer+ // catches log the same prefix and both answer 502, so this does not tell+ // them apart; both describe the error with `describeErrorForLog`.expect(failureLines).toHaveLength(1)expect(markerFragmentsIn(logs.allLines(), marker)).toEqual([])expect(failureLines[0]).toContain('error=UpstreamHostError status=500')