Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(codex): keep T0 host validation and oauth-broker mirrors green
Alfredo Lopeza03a49622fa8
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 86fb0fcd1..bff1abf2b 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.490",+ "version": "0.1.491","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.490",+ "version": "0.1.491","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 9b05f4639..f4fad6068 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.490",+ "version": "0.1.491","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/src/routes/admin/hostSpecValidation.ts b/control-api/src/routes/admin/hostSpecValidation.tsindex 164eb026e..deafd9da2 100644--- a/control-api/src/routes/admin/hostSpecValidation.ts+++ b/control-api/src/routes/admin/hostSpecValidation.ts@@ -248,7 +248,7 @@ const HostLifecycleSchema = zexport async function validateHostSpec(spec: Record<string, unknown>,deps: HostSpecValidationDeps = {- isModelAllowed: isModelAllowedDefault,+ isModelAllowed: (provider, model) => isModelAllowedDefault(provider, model),getModelAllowlistState: getModelAllowlistStateDefault,},context: HostSpecValidationContext = {}diff --git a/control-api/test/llmProviderMirrors.test.ts b/control-api/test/llmProviderMirrors.test.tsindex 9fdefd311..34b3cf2c0 100644--- a/control-api/test/llmProviderMirrors.test.ts+++ b/control-api/test/llmProviderMirrors.test.ts@@ -29,7 +29,9 @@ describe('hand-maintained provider mirrors (shell scripts)', () => {it('check-prereqs.sh PROVIDER_KEYS maps every provider to its primary env', () => {const script = read('scripts/check-prereqs.sh')for (const id of PROVIDER_IDS) {- const primaryEnv = PROVIDER_CREDENTIAL_SLOTS[id][0].envName+ const slots = PROVIDER_CREDENTIAL_SLOTS[id]+ if (slots.length === 0) continue+ const primaryEnv = slots[0].envNameexpect(script, `missing provider key ${id}:${primaryEnv}`).toContain(`${id}:${primaryEnv}`)}})@@ -44,7 +46,9 @@ describe('hand-maintained provider mirrors (shell scripts)', () => {// multiple case blocks.const lines = read(rel).split('\n')for (const id of PROVIDER_IDS) {- const primarySlot = PROVIDER_CREDENTIAL_SLOTS[id][0].dataKey+ const slots = PROVIDER_CREDENTIAL_SLOTS[id]+ if (slots.length === 0) continue+ const primarySlot = slots[0].dataKeyconst idArms = lines.filter(line => line.trimStart().startsWith(`${id})`))expect(idArms.length, `${rel}: missing case arm ${id})`).toBeGreaterThan(0)expect(diff --git a/control-api/test/routes.hostSpecValidation.test.ts b/control-api/test/routes.hostSpecValidation.test.tsindex 39d4cc1bc..b2085e700 100644--- a/control-api/test/routes.hostSpecValidation.test.ts+++ b/control-api/test/routes.hostSpecValidation.test.ts@@ -26,7 +26,7 @@ describe('validateHostSpec', () => {{ isModelAllowed })expect(res).toBeNull()- expect(isModelAllowed).toHaveBeenCalledWith('claude', 'claude-haiku-4-5')+ expect(isModelAllowed).toHaveBeenCalledWith('claude', 'claude-haiku-4-5', undefined)})it('accepts a newly added provider (groq) as spec.model.provider', async () => {@@ -36,7 +36,7 @@ describe('validateHostSpec', () => {{ isModelAllowed })expect(res).toBeNull()- expect(isModelAllowed).toHaveBeenCalledWith('groq', 'llama-3.3-70b-versatile')+ expect(isModelAllowed).toHaveBeenCalledWith('groq', 'llama-3.3-70b-versatile', undefined)})it('accepts azure as a Host provider (host.yaml enum carries azure)', async () => {@@ -48,7 +48,7 @@ describe('validateHostSpec', () => {{ isModelAllowed })expect(res).toBeNull()- expect(isModelAllowed).toHaveBeenCalledWith('azure', 'my-gpt-4o-deployment')+ expect(isModelAllowed).toHaveBeenCalledWith('azure', 'my-gpt-4o-deployment', undefined)})it('rejects a present-but-non-string spec.model.name (fail-closed, no lookup)', async () => {