Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test: fix CI regressions for the sdk-only Codex dual-ledger suite
Alfredo Lopeza00b0cb34465
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 5d430cb4d..62ec1ae47 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.524",+ "version": "0.1.525","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.524",+ "version": "0.1.525","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 fa90332bd..0d1304ce4 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.524",+ "version": "0.1.525","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/db.oauthGrantsOwnerGeneralization.test.ts b/control-api/test/db.oauthGrantsOwnerGeneralization.test.tsindex 936985932..99c133ed3 100644--- a/control-api/test/db.oauthGrantsOwnerGeneralization.test.ts+++ b/control-api/test/db.oauthGrantsOwnerGeneralization.test.ts@@ -17,10 +17,17 @@ describe('0101 oauth_grants owner generalization migration', () => {clientQuery.mockResolvedValue({ rows: [], rowCount: 0 })})- it('is registered last in the migration array, after 0100_seed_minimax', async () => {+ it('is registered after 0100_seed_minimax and before later additive migrations', async () => {const { CONTROL_API_MIGRATIONS } = await import('../src/db.js')const versions = CONTROL_API_MIGRATIONS.map(m => m.version)- expect(versions.at(-1)).toBe('0106_oauth_grants_owner_generalization')+ expect(versions).toContain('0106_oauth_grants_owner_generalization')+ expect(versions.at(-1)).toBe('0107_llm_provider_attempts_sdk_link')+ expect(versions.indexOf('0100_seed_minimax_allowed_model')).toBeLessThan(+ versions.indexOf('0106_oauth_grants_owner_generalization')+ )+ expect(versions.indexOf('0106_oauth_grants_owner_generalization')).toBeLessThan(+ versions.indexOf('0107_llm_provider_attempts_sdk_link')+ )expect(versions).toContain('0099_gfs_upload_finalizing_recovery')expect(versions).toContain('0100_seed_minimax_allowed_model')})diff --git a/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts b/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.tsindex dfbcdf40a..65b622424 100644--- a/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts+++ b/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts@@ -168,23 +168,25 @@ describeRealPostgres('Plugin Workload SDK Codex dual ledger on real PostgreSQL',`INSERT INTO plugin_workload_sdk_invocations (id, recipe_namespace, recipe_name, caller_ref, method, detail,idempotency_key_hash, status, authorization_decision, contract_version,- attempt_generation+ attempt_generation, lease_expires_at) VALUES ($1, $2, $3, 'api', 'promptBridge', 'prompt', $4, 'in_progress',- 'allow', 2, 1)`,+ 'allow', 2, 1, now() + interval '5 minutes')`,[invocationId, NS, RECIPE, randomBytes(32).toString('hex')])await pool.query(`INSERT INTO plugin_workload_sdk_invocation_attempts (invocation_id, recipe_namespace, recipe_name, attempt_generation,- method, status- ) VALUES ($1, $2, $3, 1, 'promptBridge', 'in_progress')`,+ method, status, lease_expires_at+ ) VALUES ($1, $2, $3, 1, 'promptBridge', 'in_progress',+ now() + interval '5 minutes')`,[invocationId, NS, RECIPE])const inserted = await pool.query<{ id: string }>(`INSERT INTO plugin_workload_sdk_provider_attempts (invocation_id, recipe_namespace, recipe_name, attempt_generation,- attempt_index, target_ref, provider, model, credential_slot, status- ) VALUES ($1, $2, $3, 1, 1, $4, $5, $6, $7, $8)+ attempt_index, target_ref, provider, model, credential_slot, status,+ lease_expires_at+ ) VALUES ($1, $2, $3, 1, 1, $4, $5, $6, $7, $8, now() + interval '5 minutes')RETURNING id::text AS id`,[invocationId,diff --git a/scripts/tests/test-codex-subscription-t0.sh b/scripts/tests/test-codex-subscription-t0.shindex c4d17f01d..70789afaa 100755--- a/scripts/tests/test-codex-subscription-t0.sh+++ b/scripts/tests/test-codex-subscription-t0.sh@@ -193,6 +193,7 @@ run_group "control-api" "control-api" \"test/services.pluginWorkloadSdkFinalization.test.ts" \"test/routes.mcp-host.plugin-workload-sdk.test.ts" \"test/db.llmProviderAttemptMigration.test.ts" \+ "test/db.oauthGrantsOwnerGeneralization.test.ts" \"test/routes.usageEvents.test.ts"run_group "codex-llm-proxy" "codex-llm-proxy" \