openclaw/scripts/test-database-conformance-preload.mjs
Peter Steinberger 58c0073dff
feat(state): select the shared-state database engine at the state owner (#171962)
Shared-state owner cutover through openEngineStore; production remains SQLite. All 104 captured SQLite statements are byte-identical. PostgreSQL conformance/catalog checks and wrapper inventory/closure pass; two accepted review rounds found no actionable issue.

Landed under the authorized inherited-CI exception. The cron persisted-retry failure reproduces on clean main 9a45c61f4d, as documented in #171883. Vitest shutdown also fails in main run 38543352664 at 89f8764fa2. The four locally failing SQLite cases all pass in this head's CI. No source fix or expectation change was made for landing.
2026-10-14 07:17:26 -07:00

8 lines
377 B
JavaScript

import { setEnvironmentData } from "node:worker_threads";
const connection = new URL(import.meta.url).searchParams.get("connection");
if (!connection) {
throw new Error("Database conformance preload requires a connection");
}
setEnvironmentData("openclaw.test.workboard.connection", connection);
setEnvironmentData("openclaw.test.state.conformance.connection", connection);