CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(ci): a typecheck that gets OOM-killed now says so, and fits #5566

MergedXSccantynz wants to mergefix/ci-oom-ceilingmainopened 2d ago
2 changed files+16−2
Modifiedscripts/ci-typecheck.sh+7−1View fileUnifiedSplit
2525rc=$?
2626
2727if [ "$rc" = "137" ]; then
28 cat >&2 <<'MSG'
28 # Builtins only — no `cat`. This message prints when the environment is
29 # already broken, and in the CI runner sandbox PATH can be bare enough that
30 # `cat` is not resolvable at all: the first firing of this diagnostic died
31 # with "line 28: cat: command not found", losing the very explanation it
32 # exists to give. read + printf are bash builtins and cannot go missing.
33 while IFS= read -r line; do printf '%s
34' "$line" >&2; done <<'MSG'
2935
3036 ────────────────────────────────────────────────────────────────────────
3137 TYPECHECK WAS OOM-KILLED (exit 137 = SIGKILL), NOT a type error.
Modifiedsrc/__tests__/ci-typecheck-oom.test.ts+9−1View fileUnifiedSplit
6767 const proc = Bun.spawn([BASH, SCRIPT], {
6868 // path.delimiter, not a hardcoded ":" — this suite runs on Windows dev
6969 // machines as well as the Linux container.
70 env: { ...process.env, PATH: `${bin}${delimiter}${process.env.PATH ?? ""}` },
70 //
71 // The fallback is load-bearing, not defensive dressing: the CI runner
72 // hands the test process no PATH at all, so `?? ""` built a PATH of just
73 // the stub dir and the spawned shell could no longer find `cat`. Prefixing
74 // the stub must SHADOW the environment, never replace it.
75 env: {
76 ...process.env,
77 PATH: `${bin}${delimiter}${process.env.PATH || "/usr/local/bin:/usr/bin:/bin"}`,
78 },
7179 stdout: "pipe",
7280 stderr: "pipe",
7381 });
7482
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts