Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(control-api): generalize block-scoping to sibling gateway assertions (R1-H4)
Diego Zacariasc6208370e5a8
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex ef2da0e91..b912e773f 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.508",+ "version": "0.1.509","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.508",+ "version": "0.1.509","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/image-policy": "file:../packages/image-policy",diff --git a/control-api/package.json b/control-api/package.jsonindex 1d80aea3f..3b32a33e1 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.508",+ "version": "0.1.509","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/network.gateway.intent.test.ts b/control-api/test/network.gateway.intent.test.tsindex c420a6c13..aa7ab77d0 100644--- a/control-api/test/network.gateway.intent.test.ts+++ b/control-api/test/network.gateway.intent.test.ts@@ -356,13 +356,13 @@ describe('network/gateway intent (manifest-level)', () => {expect(connectorsIdx).toBeLessThan(defaultDenyIdx)expect(gatewayConf).toContain('location ~ ^/api/v1/rpc/access/users/[^/]+/mcp-hosts/[^/]+$')expect(gatewayConf).toMatch(- /location ~ \^\/api\/v1\/rpc\/access\/users\/\[\^\/\]\+\/mcp-hosts\/\[\^\/\]\+\$ \{[\s\S]*?limit_except GET POST/+ /location ~ \^\/api\/v1\/rpc\/access\/users\/\[\^\/\]\+\/mcp-hosts\/\[\^\/\]\+\$ \{[^}]*?limit_except GET POST/)expect(gatewayConf).not.toContain('/api/v1/internal/tracing/direct-run-bindings')expect(gatewayConf).toContain('location ~ ^/api/v1/rpc/hosts/[^/]+/wake$')expect(gatewayConf).toContain('limit_except GET')expect(gatewayConf).toMatch(- /location ~ \^\/api\/v1\/rpc\/hosts\/\[\^\/\]\+\/wake\$ \{[\s\S]*?limit_except POST/+ /location ~ \^\/api\/v1\/rpc\/hosts\/\[\^\/\]\+\/wake\$ \{[^}]*?limit_except POST/)expect(gatewayConf).toContain('location / {')expect(gatewayConf).toContain('return 403;')@@ -496,7 +496,7 @@ describe('network/gateway intent (manifest-level)', () => {expect(gatewayConf).toContain('location = /api/v1/mcp-host/hosts/heartbeat')expect(gatewayConf).toMatch(- /location = \/api\/v1\/mcp-host\/hosts\/heartbeat \{[\s\S]*?limit_except POST/+ /location = \/api\/v1\/mcp-host\/hosts\/heartbeat \{[^}]*?limit_except POST/)})@@ -571,7 +571,7 @@ describe('network/gateway intent (manifest-level)', () => {expect(gatewayConf).toContain('location = /api/v1/internal/tracing/agent-run-events')expect(gatewayConf).toMatch(- /location = \/api\/v1\/internal\/tracing\/agent-run-events \{[\s\S]*?limit_except POST/+ /location = \/api\/v1\/internal\/tracing\/agent-run-events \{[^}]*?limit_except POST/)expect(gatewayConf).toMatch(/location = \/api\/v1\/internal\/tracing\/agent-run-events \{[\s\S]*?proxy_set_header Authorization \$http_authorization;/@@ -584,7 +584,7 @@ describe('network/gateway intent (manifest-level)', () => {expect(gatewayConf).toContain('location = /api/v1/internal/tracing/approval-prompt-history')expect(gatewayConf).toMatch(- /location = \/api\/v1\/internal\/tracing\/approval-prompt-history \{[\s\S]*?limit_except POST/+ /location = \/api\/v1\/internal\/tracing\/approval-prompt-history \{[^}]*?limit_except POST/)expect(gatewayConf).toMatch(/location = \/api\/v1\/internal\/tracing\/approval-prompt-history \{[\s\S]*?proxy_set_header Authorization \$http_authorization;/