From 3bc95815c8e0c0ef73adc6d12931eb32d2e37dbb Mon Sep 17 00:00:00 2001 From: Doug Mealing Date: Sun, 15 Nov 2026 14:44:20 -0500 Subject: [PATCH 1/3] ci: run the codegen-ts and cli conformance suites with bun test --parallel gate_conf_ts ran both suites serially. Run them with the same worker count the integration suite uses (MO_CI_TS_WORKERS, default 6). Same tests, same counts; three repeat runs showed no order or shared-state failures. The migrate-ts suite stays in both ts-fast (no Postgres, pg-mem paths) and ts-slow (real Postgres). --- scripts/ci-local.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/ci-local.sh b/scripts/ci-local.sh index c78b0c4e39..73d484cbc6 100755 --- a/scripts/ci-local.sh +++ b/scripts/ci-local.sh @@ -125,7 +125,8 @@ # slowest steps and each lane's wall time. Every step still runs and still fails the # run; only the order changes. --quick and --only run serially as before. # Worker counts inside the runners: MO_CI_PY_WORKERS (pytest-xdist, default 8), -# MO_CI_TS_WORKERS (bun test --parallel for the integration suite, default 6) and +# MO_CI_TS_WORKERS (bun test --parallel for the integration suite and the codegen-ts and +# cli suites in conformance: typescript, default 6) and # MO_CI_JVM_FORKS (surefire forkCount for the JVM integration modules, default 3). # # POSTGRES SIDECAR (see ensure_pg_sidecar below). Any lane that runs integration @@ -666,14 +667,18 @@ gate_conf_ts() { ( cd server/typescript/packages/render && bun test test/render-conformance.test.ts test/verify-conformance.test.ts test/extract/extract-conformance.test.ts test/output-prompt-conformance.test.ts ) || return 1 ( cd server/typescript/packages/integration-tests && bun test test/validation-conformance.test.ts test/validation-conformance-runtime.test.ts ) || return 1 ( cd server/typescript/packages/migrate-ts && bun test ) || return 1 - ( cd server/typescript/packages/codegen-ts && bun test --timeout 30000 ) || return 1 + # --parallel: both suites are many independent files (each builds its own model and writes + # into its own mkdtemp directory), so serially they spent minutes waiting on each other. + # Same worker count as the integration suite (scripts/integration-test.sh); MO_CI_TS_WORKERS + # overrides it. Measured 3,721 / 2,092 tests, 0 failures, either way. + ( cd server/typescript/packages/codegen-ts && bun test --timeout 30000 --parallel="${MO_CI_TS_WORKERS:-6}" ) || return 1 # --timeout 30000: the cli suite invokes full `meta`/run() dispatch, which lazily # imports each command's (sometimes heavy: codegen, migrate-ts) module on first # use. On a cold/contended self-hosted runner that first cold-start import can # exceed bun's default 5s per-test timeout, flaking otherwise-instant exit-code / # --format tests (bunfig.toml `[test] timeout` is NOT honored by bun, so it must # be the CLI flag). 30s keeps a real hang loud while removing the timing flake. - ( cd server/typescript/packages/cli && bun test --timeout 30000 ) || return 1 + ( cd server/typescript/packages/cli && bun test --timeout 30000 --parallel="${MO_CI_TS_WORKERS:-6}" ) || return 1 } # The per-package TS unit suites that no lane gated until 2026-07-19: the ts-fast # conformance gate runs only NAMED conformance files in metadata/render, so the rest From dfd868111af73f93ccf6c42601136139661b8231 Mon Sep 17 00:00:00 2001 From: Doug Mealing Date: Mon, 16 Nov 2026 07:31:27 -0500 Subject: [PATCH 2/3] no-mistakes(document): Documentation updated for the parallel codegen-ts and cli conformance runs: CONTRIBUTING.md now lists those suites under MO_CI_TS_WORKERS. The script's header comment and inline comments already matched the change, and no other doc describes these suites as serial. --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2eca094c8..6d5143d868 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -139,7 +139,8 @@ lane's output prints as one block when the lane finishes, so lanes never interle summary gives every step's time, the slowest steps and each lane's wall time. `--quick` and `--only` run serially. `MO_CI_PY_WORKERS` (default 8), `MO_CI_TS_WORKERS` (default 6) and `MO_CI_JVM_FORKS` (default 3) set the worker counts for pytest-xdist, the TypeScript -integration suite and the JVM integration modules' surefire forks. +integration suite and the TypeScript `codegen-ts` and `cli` conformance suites, and the JVM +integration modules' surefire forks. It SKIPS (loudly, not silently) any port whose toolchain (bun/dotnet/uv/mvn) isn't installed. The `.githooks/pre-push` hook additionally runs the TS build+typecheck From 506de41eece2382a0d21b398106818b7b5b12837 Mon Sep 17 00:00:00 2001 From: Doug Mealing Date: Mon, 16 Nov 2026 16:35:10 -0500 Subject: [PATCH 3/3] ci: keep the cli conformance suite serial; only codegen-ts runs under --parallel Under --parallel the cli tests that spawn prisma starved and timed out on the small hosted runner (pr-ci ts-fast). The cli suite goes back to serial; the codegen-ts suite stays parallel. --- CONTRIBUTING.md | 2 +- scripts/ci-local.sh | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d5143d868..076b7c2177 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -139,7 +139,7 @@ lane's output prints as one block when the lane finishes, so lanes never interle summary gives every step's time, the slowest steps and each lane's wall time. `--quick` and `--only` run serially. `MO_CI_PY_WORKERS` (default 8), `MO_CI_TS_WORKERS` (default 6) and `MO_CI_JVM_FORKS` (default 3) set the worker counts for pytest-xdist, the TypeScript -integration suite and the TypeScript `codegen-ts` and `cli` conformance suites, and the JVM +integration suite and the TypeScript `codegen-ts` conformance suite, and the JVM integration modules' surefire forks. It SKIPS (loudly, not silently) any port whose toolchain (bun/dotnet/uv/mvn) isn't diff --git a/scripts/ci-local.sh b/scripts/ci-local.sh index 73d484cbc6..e370f8e55b 100755 --- a/scripts/ci-local.sh +++ b/scripts/ci-local.sh @@ -125,8 +125,8 @@ # slowest steps and each lane's wall time. Every step still runs and still fails the # run; only the order changes. --quick and --only run serially as before. # Worker counts inside the runners: MO_CI_PY_WORKERS (pytest-xdist, default 8), -# MO_CI_TS_WORKERS (bun test --parallel for the integration suite and the codegen-ts and -# cli suites in conformance: typescript, default 6) and +# MO_CI_TS_WORKERS (bun test --parallel for the integration suite and the codegen-ts suite +# in conformance: typescript, default 6) and # MO_CI_JVM_FORKS (surefire forkCount for the JVM integration modules, default 3). # # POSTGRES SIDECAR (see ensure_pg_sidecar below). Any lane that runs integration @@ -667,10 +667,11 @@ gate_conf_ts() { ( cd server/typescript/packages/render && bun test test/render-conformance.test.ts test/verify-conformance.test.ts test/extract/extract-conformance.test.ts test/output-prompt-conformance.test.ts ) || return 1 ( cd server/typescript/packages/integration-tests && bun test test/validation-conformance.test.ts test/validation-conformance-runtime.test.ts ) || return 1 ( cd server/typescript/packages/migrate-ts && bun test ) || return 1 - # --parallel: both suites are many independent files (each builds its own model and writes + # --parallel: the suite is many independent files (each builds its own model and writes # into its own mkdtemp directory), so serially they spent minutes waiting on each other. # Same worker count as the integration suite (scripts/integration-test.sh); MO_CI_TS_WORKERS - # overrides it. Measured 3,721 / 2,092 tests, 0 failures, either way. + # overrides it. The cli suite below stays serial on purpose: under --parallel its tests + # that spawn prisma starved and timed out on the small hosted runner (pr-ci ts-fast). ( cd server/typescript/packages/codegen-ts && bun test --timeout 30000 --parallel="${MO_CI_TS_WORKERS:-6}" ) || return 1 # --timeout 30000: the cli suite invokes full `meta`/run() dispatch, which lazily # imports each command's (sometimes heavy: codegen, migrate-ts) module on first @@ -678,7 +679,7 @@ gate_conf_ts() { # exceed bun's default 5s per-test timeout, flaking otherwise-instant exit-code / # --format tests (bunfig.toml `[test] timeout` is NOT honored by bun, so it must # be the CLI flag). 30s keeps a real hang loud while removing the timing flake. - ( cd server/typescript/packages/cli && bun test --timeout 30000 --parallel="${MO_CI_TS_WORKERS:-6}" ) || return 1 + ( cd server/typescript/packages/cli && bun test --timeout 30000 ) || return 1 } # The per-package TS unit suites that no lane gated until 2026-07-19: the ts-fast # conformance gate runs only NAMED conformance files in metadata/render, so the rest