From 166b705610f1de50a31be40f1cb04d36571ae588 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Jul 2026 14:56:05 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=20HarnessRL=20Postgre?= =?UTF-8?q?SQL=20SSL=20=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/harnessrl/registry.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/harnessrl/registry.ts b/internal/harnessrl/registry.ts index e3941775..d7a278de 100644 --- a/internal/harnessrl/registry.ts +++ b/internal/harnessrl/registry.ts @@ -1,6 +1,7 @@ import pg from "pg"; import { readFile } from "node:fs/promises"; +import { buildPostgresPoolConfig, postgresSslModeFromConnectionString } from "../db/runtime-store-core.ts"; import type { ActivityResult, CaseRunEvent, CaseRunRecord, CaseRunStatus, HarnessRLRegistry, StartCaseRunInput } from "./contracts.ts"; import { terminalStatus } from "./contracts.ts"; @@ -14,7 +15,11 @@ export class PostgresHarnessRLRegistry implements HarnessRLRegistry { constructor(databaseUrl: string) { if (!databaseUrl) throw codedError("harnessrl_database_url_required", "HARNESSRL_DATABASE_URL is required"); - this.pool = new Pool({ connectionString: databaseUrl, max: 8 }); + this.pool = new Pool(buildPostgresPoolConfig({ + dbUrl: databaseUrl, + sslMode: postgresSslModeFromConnectionString(databaseUrl) ?? "disable", + poolMax: 8 + })); } ensureSchema() {