Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-api): honor query-form postgres ports in test proxy
Josué46b62c84cfc9
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 3d59738d0..ee317e212 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.748",+ "version": "0.1.750","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.748",+ "version": "0.1.750","dependencies": {"@clerum/display-field": "file:../packages/display-field","@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",diff --git a/control-api/package.json b/control-api/package.jsonindex 5536d5d8b..b375972b9 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.748",+ "version": "0.1.750","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/test/helpers.realPostgresCancellation.test.ts b/control-api/test/helpers.realPostgresCancellation.test.tsindex fa265f4de..b420b1abb 100644--- a/control-api/test/helpers.realPostgresCancellation.test.ts+++ b/control-api/test/helpers.realPostgresCancellation.test.ts@@ -49,9 +49,10 @@ it('forwards fragmented COMMIT bytes, discards the reply and recovers later replconst address = backend.address()if (!address || typeof address === 'string') throw new Error('missing fixture backend address')const proxy = await createPostgresCommitReplyBlackhole(- ['postgresql:', `//[email protected]:${address.port}/fixture`].join('')+ ['postgresql:', `//fixture@ignored/fixture?host=127.0.0.1&port=${address.port}`].join(''))const target = new URL(proxy.connectionString)+ expect(target.searchParams.has('port')).toBe(false)const client = createConnection({ host: target.hostname, port: Number(target.port) })const replies: Buffer[] = []client.on('data', chunk => replies.push(chunk))diff --git a/control-api/test/helpers/realPostgresCancellation.ts b/control-api/test/helpers/realPostgresCancellation.tsindex b60b5f018..a67a7cb95 100644--- a/control-api/test/helpers/realPostgresCancellation.ts+++ b/control-api/test/helpers/realPostgresCancellation.ts@@ -24,7 +24,8 @@ async function createPostgresProtocolBlackhole(}const target = new URL(connectionString)const targetHost = target.searchParams.get('host') || target.hostname.replace(/^\[|\]$/g, '')- const targetPort = Number(target.searchParams.get('port') || target.port || 5432)+ const queryPort = target.searchParams.get('port')+ const targetPort = Number(queryPort || target.port || 5432)const sslMode = target.searchParams.get('sslmode')if (sslMode && sslMode !== 'disable') {throw new Error('COMMIT reply observation requires the harness plaintext PostgreSQL connection')