Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(codex-sdk): finish the review-tag sweep and correct three comments
Alfredo Lopezc757f421f876
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex cf4cd86cf..393a08442 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.545",+ "version": "0.1.546","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.545",+ "version": "0.1.546","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 de15299f8..b934aa580 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.545",+ "version": "0.1.546","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/src/services/pluginWorkloadSdkFinalization.ts b/control-api/src/services/pluginWorkloadSdkFinalization.tsindex 0bc70f09c..952c72629 100644--- a/control-api/src/services/pluginWorkloadSdkFinalization.ts+++ b/control-api/src/services/pluginWorkloadSdkFinalization.ts@@ -500,7 +500,7 @@ export async function finalizePromptBridgeInTransaction(// a second billable Codex call. Only a spend proved `not_executed` — no// linked Codex row at all — is safe to leave revivable. `exact` obviously// billed; `unknown` means we cannot prove it did not, which is the same- // hazard — the invariant stated at pluginWorkloadSdkDb.ts:2118-2122.+ // hazard — the invariant stated in `failStaleInvocations`' docblock.// provider_unavailable is the non-revivable terminal state for both. The// RESULT still echoes input.status: mcp-host's controlApiClient requires// result.status === body.status.diff --git a/control-api/test/services.pluginWorkloadSdkAuthorizer.test.ts b/control-api/test/services.pluginWorkloadSdkAuthorizer.test.tsindex 16f0a95d4..2abd78af1 100644--- a/control-api/test/services.pluginWorkloadSdkAuthorizer.test.ts+++ b/control-api/test/services.pluginWorkloadSdkAuthorizer.test.ts@@ -603,7 +603,7 @@ describe('authorizePromptBridge', () => {})if (!result.ok) throw new Error('expected the authorization to succeed')// The grant's output ceiling travels on the authorization again.- // J8 removed it on the premise that nothing enforced it, which held only+ // An earlier round removed it on the premise that nothing enforced it, which held only// for codex-subscription; every API-key provider sends it as `max_tokens`,// so for them it was a working per-grant billing control.expect(result.value.maxOutputTokens).toBe(2048)diff --git a/control-api/test/services.pluginWorkloadSdkFinalization.realPostgres.integration.test.ts b/control-api/test/services.pluginWorkloadSdkFinalization.realPostgres.integration.test.tsindex ff2c4363b..2babc2f9a 100644--- a/control-api/test/services.pluginWorkloadSdkFinalization.realPostgres.integration.test.ts+++ b/control-api/test/services.pluginWorkloadSdkFinalization.realPostgres.integration.test.ts@@ -643,7 +643,7 @@ describeRealPostgres('Plugin Workload SDK finalization on real PostgreSQL', () =replayClient)await commit(replayClient)- // J3: the outcome reports the derived truth...+ // The outcome reports the derived truth...expect(replay).toMatchObject({ outcome: 'exact', idempotent: true, usageAccepted: false })} finally {replayClient.release()diff --git a/control-api/test/services.pluginWorkloadSdkSpend.properties.test.ts b/control-api/test/services.pluginWorkloadSdkSpend.properties.test.tsindex 3ea5597a3..dc128af27 100644--- a/control-api/test/services.pluginWorkloadSdkSpend.properties.test.ts+++ b/control-api/test/services.pluginWorkloadSdkSpend.properties.test.ts@@ -6,9 +6,11 @@ import { isOauthBrokerProvider } from '../src/services/pluginWorkloadSdkSpendLed/*** `deriveEffectiveSpend` is a pure `(floor, linkedCodex) -> spend` merge* with precedence rules, and it was covered only by hand-enumerated cases.- * Two sibling defects in that merge were both cases enumeration missed — the shape- * of that miss is what these properties close: they quantify over the whole- * input space instead of the examples someone thought of.+ * Two sibling defects in that merge — a ledger_pending gate keyed on the wrong+ * status, and a floor that skipped the linked Codex row — were both cases the+ * enumeration missed. The shape of that miss is what these properties close:+ * they quantify over the whole input space instead of the examples someone+ * thought of.*/const OUTCOMES = ['exact', 'unknown', 'not_executed'] as constdiff --git a/control-ui/app/plugin-workload-sdk/page.tsx b/control-ui/app/plugin-workload-sdk/page.tsxindex 2b05120c1..b5ac1f830 100644--- a/control-ui/app/plugin-workload-sdk/page.tsx+++ b/control-ui/app/plugin-workload-sdk/page.tsx@@ -678,7 +678,7 @@ function GrantFormModal({setError('')// Edit mode: the upsert is a full-column overwrite, and the form does not expose// the quota fields. Round-trip every quota key from the original grant except the- // deprecated ones (per-run: issue #348; maxOutputTokens: J8 — no longer enforced)+ // deprecated ones (per-run: issue #348; maxOutputTokens — no longer enforced)// so editing does not silently wipe values configured outside this form.const quotaLimits: PluginWorkloadSdkGrantInput['quotaLimits'] = {}if (grant) {diff --git a/control-ui/lib/api.ts b/control-ui/lib/api.tsindex 9a0e8c877..42235a71f 100644--- a/control-ui/lib/api.ts+++ b/control-ui/lib/api.ts@@ -3666,7 +3666,7 @@ export type PluginWorkloadSdkQuotaLimits = {maxInvocationsPerMinute?: numbermaxNotificationsPerMinute?: number/**- * @deprecated No longer enforced (J8); the Codex ChatGPT wire discards+ * @deprecated No longer enforced; the Codex ChatGPT wire discards* max_output_tokens, so no layer capped the response by token count. Still* returned on legacy grants; never sent by this UI.*/diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 3409d994f..da2202e58 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.498",+ "version": "0.1.499","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.498",+ "version": "0.1.499","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/llm-providers": "file:../packages/llm-providers",diff --git a/control-ui/package.json b/control-ui/package.jsonindex 7572241c9..39f181a43 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.498",+ "version": "0.1.499","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.jsonindex 4bf9e7784..989fabd78 100644--- a/mcp-host/package-lock.json+++ b/mcp-host/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-mcp-host",- "version": "0.1.317",+ "version": "0.1.318","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-mcp-host",- "version": "0.1.317",+ "version": "0.1.318","license": "SEE LICENSE IN LICENSE","dependencies": {"@anthropic-ai/sdk": "^0.32.0",diff --git a/mcp-host/package.json b/mcp-host/package.jsonindex 738d792f2..ab015268a 100644--- a/mcp-host/package.json+++ b/mcp-host/package.json@@ -1,6 +1,6 @@{"name": "clerum-mcp-host",- "version": "0.1.317",+ "version": "0.1.318","description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude","main": "dist/main.js","engines": {diff --git a/mcp-host/src/pluginWorkloadSdk/promptBridge/handler.test.ts b/mcp-host/src/pluginWorkloadSdk/promptBridge/handler.test.tsindex 138218a74..adfe1c551 100644--- a/mcp-host/src/pluginWorkloadSdk/promptBridge/handler.test.ts+++ b/mcp-host/src/pluginWorkloadSdk/promptBridge/handler.test.ts@@ -207,7 +207,7 @@ describe('PromptBridgeHandler', () => {)})- // J8 dropped the clamp on the premise that nothing enforced the+ // An earlier round dropped the clamp on the premise that nothing enforced the// ceiling. That held only for codex-subscription, whose ChatGPT wire rejects// `max_output_tokens`; every API-key provider does send it, so for them the// per-grant cap was a working billing control that the removal silenced.diff --git a/packages/codex-catalog-projection/index.test.cjs b/packages/codex-catalog-projection/index.test.cjsindex b987ef6eb..63fd68102 100644--- a/packages/codex-catalog-projection/index.test.cjs+++ b/packages/codex-catalog-projection/index.test.cjs@@ -352,7 +352,7 @@ test('toEligiblePolicyBinding withholds the binding when the catalog carries no})test('parity oracle: the execution binding and the execute scope never disagree', () => {- // The invariant behind unifying the two gates (N-03). A binding minted where+ // The invariant behind unifying the two gates. A binding minted where// the scope gate says no is the dangerous direction — the recipe would hold// an execution policy the reconciler refuses to authorize — so it is// asserted unconditionally. The converse holds for every ConfigMap that@@ -381,7 +381,8 @@ test('parity oracle: the execution binding and the execute scope never disagree'test('toPolicyBinding still serves Host chat through a degraded connection', () => {// Contract guard for mcp-host's configStore: hardening `toPolicyBinding` in// place would wipe a live Host binding on a transient `unavailable`, which is- // exactly the regression J4 closed. The execution gate is a separate function.+ // exactly the regression an earlier round closed. The execution gate is a+ // separate function.for (const status of ['reauth-required', 'unavailable', 'revoked', 'disconnected']) {const cm = withConnections(FIXTURE.mapped, parsed => {parsed['personal-pro'].status = statusdiff --git a/workflow-recipes/package-lock.json b/workflow-recipes/package-lock.jsonindex afe8e301a..bd7095d74 100644--- a/workflow-recipes/package-lock.json+++ b/workflow-recipes/package-lock.json@@ -1,12 +1,12 @@{"name": "workload-recipes-controller",- "version": "0.1.338",+ "version": "0.1.339","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "workload-recipes-controller",- "version": "0.1.338",+ "version": "0.1.339","license": "SEE LICENSE IN LICENSE","dependencies": {"@aws-sdk/client-s3": "^3.1009.0",diff --git a/workflow-recipes/package.json b/workflow-recipes/package.jsonindex d94a13589..c043e5cb5 100644--- a/workflow-recipes/package.json+++ b/workflow-recipes/package.json@@ -1,6 +1,6 @@{"name": "workload-recipes-controller",- "version": "0.1.338",+ "version": "0.1.339","description": "Workload Recipes Controller (WRC) - WorkloadRecipe lifecycle management and MCP server interface","main": "dist/main.js","engines": {diff --git a/workflow-recipes/src/workflow/codexRecipeVerdict.test.ts b/workflow-recipes/src/workflow/codexRecipeVerdict.test.tsindex 7d8cf60e4..86fdef352 100644--- a/workflow-recipes/src/workflow/codexRecipeVerdict.test.ts+++ b/workflow-recipes/src/workflow/codexRecipeVerdict.test.ts@@ -18,10 +18,12 @@ import { parseAllowedModelsSnapshot, snapshotFromConfigMapError } from './llmAll* The last case in the file is the invariant sweep: it quantifies over every* row rather than trusting that someone remembered to assert it per case.*- * Views are built by the SAME producers the reconciler uses — a hand-written- * snapshot would let a ConfigMap-shape change break parsing in production- * while these stayed green, because the verdict only falls back to- * `view.snapshot` when it cannot re-derive from `view.configMap`.+ * Views are built by the SAME producers `refreshCodexSnapshot` uses. Where a+ * ConfigMap is present that is a typing fix rather than new coverage: the+ * verdict re-derives from `view.configMap` and reads `view.snapshot` only for+ * an unassigned grant. Where no ConfigMap arrived at all, the snapshot IS the+ * only input, so deriving it from the real error producer is what keeps these+ * cases from drifting away from what production would hand them.*/const MODEL = 'gpt-5.6-luna'