From 8d58beb3f121a8bcf8cf3e0f1b1c75bd68a6ccc1 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 15:04:24 +0000 Subject: [PATCH 1/3] ci(test-core): a shard whose tests read no .d.ts builds its closure with OS_SKIP_DTS=1 A new step after "Compute this shard's package set" writes OS_SKIP_DTS=1 to $GITHUB_ENV unless the shard carries @objectstack/cli or @objectstack/metadata, so the closure build, the slice build, the test step and the main seed hash in one namespace (turbo.json globalEnv). Those two are kept on DTS because their tests compile against built declarations: under OS_SKIP_DTS=1 the whole Test Core list on 830a63a went red only in cli's published-subpath-console/-hook-body pins and scaffold typecheck tests, and in metadata's typescript-serializer-annotation test (TS7016). Every other package's test counts matched the DTS-on run except spec's root-entry-type-nameability pin, which skips by design and runs in lint.yml's built-dist step. Local cold closure, 65 packages, 4 cores, --force: 5m59s with declarations, 1m24s without. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01VqzDQEbeHPVJoaEoutGsTi --- .github/workflows/ci.yml | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b17e65cca0c..99150596b1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -713,6 +713,45 @@ jobs: echo 'Items on this shard (a package name, or a package plus a k/n file-level slice):' cat "$RUNNER_TEMP/shard-packages.txt" + # ⭐ A SHARD WHOSE TESTS READ NO `.d.ts` BUILDS ITS CLOSURE WITHOUT THEM + # (#25375). vitest loads JavaScript, so on most shards every declaration + # the closure emits -- spec's 6 GB-heap pass, cli's type-checking `tsc` + # -- is written and never read. `OS_SKIP_DTS=1` goes to $GITHUB_ENV, so + # both closure builds below, the test step and the shard's main seed all + # hash in one namespace (turbo.json `globalEnv`). + # + # ⛔ EXCEPT a shard carrying a package in DTS_READERS, whose tests compile + # against BUILT declarations and go red without them (TS7016). Measured + # on 830a63a, the whole Test Core list under `OS_SKIP_DTS=1`: red only in + # @objectstack/cli published-subpath-console/-hook-body.pin (its + # own dist/*.d.ts), scaffold-emission-typechecks, + # scaffold-test-script-passes (spec's .d.ts) + # @objectstack/metadata typescript-serializer-annotation (spec's .d.ts) + # A new test that reads a built `.d.ts` reds the same loud way on a + # skipping shard: add its package here. Every other package's counts + # matched the DTS-on run but one: spec's root-entry-type-nameability + # pin skips (by its own design) and runs in lint.yml's built-dist step. + # + # Local cold closure, 65 packages, 4 cores, `--force`: 5m59s with + # declarations, 1m24s without. The cost is replay: a skipping shard + # cannot replay Build Core's DTS-on remote artifacts, only the DTS-off + # ones the queue and main runs of these shards write. + - name: Choose this shard's declaration build + run: | + DTS_READERS='@objectstack/cli @objectstack/metadata' + KEEP="" + while read -r PKG _; do + for R in $DTS_READERS; do + [ "$PKG" = "$R" ] && KEEP="$KEEP $PKG" + done + done < "$RUNNER_TEMP/shard-packages.txt" + if [ -n "$KEEP" ]; then + echo "Declarations kept: this shard tests$KEEP, which read built .d.ts." + else + echo "OS_SKIP_DTS=1" >> "$GITHUB_ENV" + echo "Declarations skipped: OS_SKIP_DTS=1 for the rest of this shard." + fi + # ⛔ THIS SHARD'S `^build` CLOSURE IS BUILT HERE, ON THE TURBO REMOTE # CACHE (#22077), so `Run this shard's tests` REPLAYS it from the local # cache instead of building it. Before this step the closure was built @@ -728,7 +767,7 @@ jobs: # 3d9188502e, turbo 2.11.5, all six shards of the local partition: this # plan equals the test plan's build tasks, 32 to 63 per shard, with # identical hashes, 0 differing and 0 extra, and every one of them has - # Build Core's hash. A `test` task that `dependsOn: ["build"]` (cli and + # Build Core's hash -- unless the step above set OS_SKIP_DTS (#25375). A `test` task that `dependsOn: ["build"]` (cli and # metadata in turbo.json) also needs its OWN package's build. This filter # leaves that out on purpose, so a shard never builds a package its tests # do not need; the test step builds it as before. Today that is From a0b56bdbe8e003cc484c74024374edb945f1242a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 15:14:45 +0000 Subject: [PATCH 2/3] =?UTF-8?q?ci(test-core):=20TEMPORARY=20measurement=20?= =?UTF-8?q?push=20=E2=80=94=20DTS=20on=20and=20--force=20for=20this=20PR's?= =?UTF-8?q?=20closure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Measures the cold DTS-on closure build for the same closure the previous push built cold with OS_SKIP_DTS=1. Reverted by the next push. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01VqzDQEbeHPVJoaEoutGsTi --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99150596b1b..8a621a4e730 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -738,7 +738,7 @@ jobs: # ones the queue and main runs of these shards write. - name: Choose this shard's declaration build run: | - DTS_READERS='@objectstack/cli @objectstack/metadata' + DTS_READERS='@objectstack/cli @objectstack/metadata @objectstack/driver-sql' KEEP="" while read -r PKG _; do for R in $DTS_READERS; do @@ -803,7 +803,7 @@ jobs: mkdir -p "$RUNNER_TEMP/stall-reports" node scripts/run-with-stall-guard.mjs --log "$RUNNER_TEMP/test-core-closure-build.log" --stall-minutes 10 \ --report-dir "$RUNNER_TEMP/stall-reports" -- \ - pnpm turbo run build $FILTERS --concurrency=4 --log-order=stream + pnpm turbo run build $FILTERS --concurrency=4 --force --log-order=stream # ⛔ A FILE-LEVEL SLICE BUILDS ITS DEPENDENCY CLOSURE HERE, IN ITS OWN # GUARDED STEP, so the slice leg in the next step REPLAYS it. Since #19278 From be7daa3f2ecdea5730da399c6d93f8eb7c3f5134 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 23 Oct 2026 15:25:33 +0000 Subject: [PATCH 3/3] Revert the temporary measurement push: drop driver-sql from DTS_READERS and --force The measurement it ran is posted on the PR. ci.yml is back to 8d58beb3's. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01VqzDQEbeHPVJoaEoutGsTi --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a621a4e730..99150596b1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -738,7 +738,7 @@ jobs: # ones the queue and main runs of these shards write. - name: Choose this shard's declaration build run: | - DTS_READERS='@objectstack/cli @objectstack/metadata @objectstack/driver-sql' + DTS_READERS='@objectstack/cli @objectstack/metadata' KEEP="" while read -r PKG _; do for R in $DTS_READERS; do @@ -803,7 +803,7 @@ jobs: mkdir -p "$RUNNER_TEMP/stall-reports" node scripts/run-with-stall-guard.mjs --log "$RUNNER_TEMP/test-core-closure-build.log" --stall-minutes 10 \ --report-dir "$RUNNER_TEMP/stall-reports" -- \ - pnpm turbo run build $FILTERS --concurrency=4 --force --log-order=stream + pnpm turbo run build $FILTERS --concurrency=4 --log-order=stream # ⛔ A FILE-LEVEL SLICE BUILDS ITS DEPENDENCY CLOSURE HERE, IN ITS OWN # GUARDED STEP, so the slice leg in the next step REPLAYS it. Since #19278