Skip to content

Commit 831472e

Browse files
committed
ci: cap per-test time in the ts-unit lane so a stall names itself
The ts-unit lane has repeatedly stalled on the self-hosted runner until the job's 20-minute cap -- three times in the last dozen main runs, most recently twice in a row on one commit (including its re-run). Each stall was at a DIFFERENT file (metadata/index.test.ts, react/currency-input.test.tsx, tanstack/grid-from-metadata.test.ts), never with a failing assertion, and once all three ts lanes stalled together. Every one of those files passes locally in well under a second, and the whole lane runs in ~4s on an idle box. This does NOT root-cause the stall -- it is not reproducible locally and the box is idle after the fact -- but a 20-minute cancel reports nothing at all, which is what makes each occurrence cost a full re-run to learn nothing. bun's per-test --timeout turns the next one into a named failure in 30s. gate_cli already does exactly this a few lines above, for the same reason and with the same value; ts-unit was simply never given the flag. Note bunfig.toml's [test] timeout is NOT honored by bun, so it has to be the CLI flag. Lane verified locally: scripts/ci-local.sh --only ts-unit --strict-toolchains, 3.8s, all six package suites green.
1 parent 314c36f commit 831472e

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎scripts/ci-local.sh‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,21 @@ gate_conf_ts() {
166166
# Measured ~5s total, so the independent signal is nearly free.
167167
# NOTE: per-package `bun test` only — a bare root `bun test` walks java/python/
168168
# csharp/fixtures and takes many minutes.
169+
# --timeout 30000 (same reasoning as gate_cli above; bunfig.toml `[test] timeout`
170+
# is NOT honored by bun, so it must be the CLI flag): this lane has repeatedly
171+
# stalled on the self-hosted runner until the job's 20-minute cap, at a DIFFERENT
172+
# file each time (metadata/index.test.ts, react/currency-input.test.tsx,
173+
# tanstack/grid-from-metadata.test.ts) and never with a failing assertion — so the
174+
# stall is environmental, not one bad test. A 20-minute cancel reports nothing;
175+
# a per-test cap turns the next occurrence into a named failure in 30s. The whole
176+
# lane measures ~5s, so any single test past 30s is a hang by definition.
169177
gate_ts_unit() {
170178
bun_install || return 1
171179
for p in metadata render runtime-ts; do
172-
( cd "server/typescript/packages/$p" && bun test ) || return 1
180+
( cd "server/typescript/packages/$p" && bun test --timeout 30000 ) || return 1
173181
done
174182
for p in runtime-web react tanstack; do
175-
( cd "client/web/packages/$p" && bun test ) || return 1
183+
( cd "client/web/packages/$p" && bun test --timeout 30000 ) || return 1
176184
done
177185
}
178186
gate_conf_csharp() {

0 commit comments

Comments
 (0)