Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(proxy): name the principal in the visual_host_share refusal log
Alfredo Lopezc707ef88a20d
diff --git a/codex-llm-proxy/src/server.ts b/codex-llm-proxy/src/server.tsindex f96d91823..50b5fe372 100644--- a/codex-llm-proxy/src/server.ts+++ b/codex-llm-proxy/src/server.ts@@ -377,6 +377,8 @@ export function createProxyApps(event: 'codex_proxy_admission_refused',reason: 'visual_host_share',limit: VISUAL_PER_HOST_MAX_ADMITTED,+ sub: platform.sub,+ hostRefs: [...platform.hostRefs].sort(),},'admission refused')diff --git a/codex-llm-proxy/test/streamGate.handoff.test.ts b/codex-llm-proxy/test/streamGate.handoff.test.tsindex 02187e89e..13a402958 100644--- a/codex-llm-proxy/test/streamGate.handoff.test.ts+++ b/codex-llm-proxy/test/streamGate.handoff.test.ts@@ -530,11 +530,16 @@ describe('visual stream-gate handoff', () => {const fifth = await postBody(port, platformToken(), invalidTicketBody(maxBodyBytes))expect(fifth.status).toBe(503)expect(await fifth.json()).toEqual({ error: 'provider_unavailable' })+ // The refusal names the principal it applied to, so an operator can tell+ // which host was throttled.expect(warn).toHaveBeenCalledWith(- expect.objectContaining({+ {event: 'codex_proxy_admission_refused',reason: 'visual_host_share',- }),+ limit: VISUAL_PER_HOST_MAX_ADMITTED,+ sub: 'default/research-host',+ hostRefs: ['research-host'],+ },'admission refused')// The share refusal happens before the global gate is touched.diff --git a/grok-llm-proxy/src/server.ts b/grok-llm-proxy/src/server.tsindex adb791755..973fb7a54 100644--- a/grok-llm-proxy/src/server.ts+++ b/grok-llm-proxy/src/server.ts@@ -388,6 +388,8 @@ export function createProxyApps(event: 'grok_proxy_admission_refused',reason: 'visual_host_share',limit: VISUAL_PER_HOST_MAX_ADMITTED,+ sub: platform.sub,+ hostRefs: [...platform.hostRefs].sort(),},'admission refused')diff --git a/grok-llm-proxy/test/streamGate.handoff.test.ts b/grok-llm-proxy/test/streamGate.handoff.test.tsindex 42de3eeed..a771f3ea1 100644--- a/grok-llm-proxy/test/streamGate.handoff.test.ts+++ b/grok-llm-proxy/test/streamGate.handoff.test.ts@@ -518,11 +518,16 @@ describe('grok visual stream-gate handoff', () => {const third = await postBody(port, platformToken(), invalidTicketBody(maxBodyBytes))expect(third.status).toBe(503)expect(await third.json()).toEqual({ error: 'provider_unavailable' })+ // The refusal names the principal it applied to, so an operator can tell+ // which host was throttled.expect(warn).toHaveBeenCalledWith(- expect.objectContaining({+ {event: 'grok_proxy_admission_refused',reason: 'visual_host_share',- }),+ limit: VISUAL_PER_HOST_MAX_ADMITTED,+ sub: 'default/research-host',+ hostRefs: ['research-host'],+ },'admission refused')// The share refusal happens before the global gate is touched.