Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(control-api): seed per-connection Codex catalog and ChatGPT account id in T1 fixtures

Alfredo Lopez10718235bd86
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index e94b6c5e4..c1b47509b 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.493",
+ "version": "0.1.494",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.493",
+ "version": "0.1.494",
"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.json
index bbdeedfe8..f04ad5945 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.493",
+ "version": "0.1.494",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts b/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts
index ba99a383a..5e28c2c9f 100644
--- a/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts
+++ b/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts
@@ -116,7 +116,7 @@ describeRealPostgres('Codex provider-attempt authorization on real PostgreSQL',
await adminPool.query(`CREATE DATABASE ${quoteIdent(database)}`)
pool = new Pool({ connectionString })
await initDb({ connect: () => pool.connect() })
- await insertInitialCodexSubscriptionConnection(pool, KEY, {
+ const created = await insertInitialCodexSubscriptionConnection(pool, KEY, {
refreshToken: 'refresh-authz',
accountFingerprint: 'fp-authz',
})
@@ -126,8 +126,10 @@ describeRealPostgres('Codex provider-attempt authorization on real PostgreSQL',
expectedCatalogRevision: 0,
})
await pool.query(
- `INSERT INTO llm_allowed_models (provider, model, enabled, source, stale)
- VALUES ('codex-subscription', 'gpt-5.1', true, 'discovery', false)`
+ `INSERT INTO codex_catalog_models
+ (connection_id, model, enabled, source, discovered_at, last_seen_at, stale)
+ VALUES ($1, 'gpt-5.1', true, 'discovery', NOW(), NOW(), false)`,
+ [created.id]
)
}, 60_000)
@@ -154,6 +156,7 @@ describeRealPostgres('Codex provider-attempt authorization on real PostgreSQL',
model: REQUEST.model,
catalogRevision: current!.catalogRevision,
credentialRevision: current!.credentialRevision,
+ connectionKey: current!.connectionKey,
}),
}
const deps = testDeps()
@@ -192,6 +195,7 @@ describeRealPostgres('Codex provider-attempt authorization on real PostgreSQL',
model: REQUEST.model,
catalogRevision: current!.catalogRevision,
credentialRevision: current!.credentialRevision,
+ connectionKey: current!.connectionKey,
}),
}
diff --git a/control-api/test/services.llmProviderAttemptFinalization.realPostgres.integration.test.ts b/control-api/test/services.llmProviderAttemptFinalization.realPostgres.integration.test.ts
index ce68a8613..3c9b4c64f 100644
--- a/control-api/test/services.llmProviderAttemptFinalization.realPostgres.integration.test.ts
+++ b/control-api/test/services.llmProviderAttemptFinalization.realPostgres.integration.test.ts
@@ -75,6 +75,7 @@ describeRealPostgres('Codex attempt finalization on real PostgreSQL', () => {
await insertInitialCodexSubscriptionConnection(pool, KEY, {
refreshToken: 'refresh-secret',
accessToken: 'access-usable',
+ chatgptAccountId: 'acct_test_1',
accountFingerprint: 'fp-final',
})
}, 60_000)