Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

ci(macos): typecheck runs on macOS 26 under a 240 s per-check cap instead of being skipped; Linux keeps 120 s (#6056)

garrytan3d4971a9f211
diff --git a/.github/workflows/macos-validation.yml b/.github/workflows/macos-validation.yml
index 7b6998a58c..9f0eaf5dc5 100644
--- a/.github/workflows/macos-validation.yml
+++ b/.github/workflows/macos-validation.yml
@@ -17,7 +17,7 @@ name: macOS 26 validation
# --strict and --version against the release tag.
# #5810 every tracked *.sh parses under /bin/bash (GNU bash 3.2), and
# `bun run verify` passes with `bash` resolving to /bin/bash
-# (typecheck recorded as a skip, covered by test.yml's verify job).
+# (typecheck included, under a 240 s per-check cap on this runner).
on:
schedule:
@@ -94,10 +94,11 @@ jobs:
GBRAIN_BASH32: /bin/bash
GBRAIN_TEST_BASH32_REQUIRE: '1'
# #6056: a cold tsc takes 110-142 s alone on this 3-core arm64
- # runner, past verify's 120 s cap; its output is OS-independent and
- # test.yml's verify job gates it on every PR and push. Recorded as a
- # skip in the step summary; refused on any other OS.
- GBRAIN_VERIFY_TYPECHECK_COVERED_BY: test.yml verify job (Linux, every PR and push)
+ # runner (121-167 s inside verify), past the 120 s per-check cap that
+ # Linux keeps. Typecheck runs here too, so this runner's cap is 240 s
+ # (about 1.4x the slowest measured run); test.yml's Linux verify job
+ # keeps the default 120 s.
+ GBRAIN_VERIFY_TIMEOUT: '240'
# tsc peaks near 3.5 GB of heap; the typecheck script sets its own
# --max-old-space-size, so no NODE_OPTIONS here (it reached every node
# process verify spawns).
diff --git a/docs/operations/verify-and-nightly-e2e.md b/docs/operations/verify-and-nightly-e2e.md
index 086a716c9b..52ac1248ec 100644
--- a/docs/operations/verify-and-nightly-e2e.md
+++ b/docs/operations/verify-and-nightly-e2e.md
@@ -36,19 +36,18 @@ about 3.7 GB with ceilings of 3,800, 4,096 or 6,144 MB, and wall time is the
same. If tsc reaches the ceiling, find what grew the program (the
`Files`/`Memory used` lines of `--extendedDiagnostics`) before raising it.
-## macOS typecheck skip
+## macOS typecheck cap
-The macOS 26 validation job (`macos-validation.yml`) runs `bun run verify`
-with `GBRAIN_VERIFY_TYPECHECK_COVERED_BY` naming `test.yml`'s Linux verify
-job, so `typecheck` is recorded as a skip with that reason in
-`outcomes.tsv`, the receipt and the step summary. tsc output does not depend
-on the OS, the Linux verify job gates it on every PR and push, and a cold tsc
+The macOS 26 validation job (`macos-validation.yml`) runs every verify
+check, typecheck included, with `GBRAIN_VERIFY_TIMEOUT: '240'`. A cold tsc
takes 110-142 s alone on the 3-core arm64 runner (no swap, memory 57-76%
-free), past the 120 s per-check cap. A day-old incremental cache does not
-help: one edit to a widely imported file costs a 124 s recheck. The runner
-refuses the variable on any other OS (exit 2 with the next step), and
-`test/scripts/run-verify-parallel.test.ts` pins that only this workflow sets
-it.
+free) and 121-167 s inside verify, past the 120 s per-check cap that every
+other runner keeps. 240 s is about 1.4x the slowest measured run. A day-old
+incremental cache does not help: one edit to a widely imported file costs a
+124 s recheck. `test/scripts/run-verify-parallel.test.ts` pins that only this
+workflow sets `GBRAIN_VERIFY_TIMEOUT` and that `test.yml`'s Linux verify job
+keeps the 120 s default. If a check passes 240 s here, find what grew before
+raising it again.
## Full-corpus report states
diff --git a/scripts/run-verify-parallel.sh b/scripts/run-verify-parallel.sh
index f369dd58f4..86450d8faf 100755
--- a/scripts/run-verify-parallel.sh
+++ b/scripts/run-verify-parallel.sh
@@ -20,10 +20,6 @@
# GBRAIN_VERIFY_TIMEOUT per-check wallclock cap, seconds (default 120)
# GBRAIN_VERIFY_LOG_DIR where to write per-check logs (default tempdir,
# removed on success and kept on failure)
-# GBRAIN_VERIFY_TYPECHECK_COVERED_BY
-# macOS only: record typecheck as a skip naming
-# the job that covers it (see below); refused on
-# every other OS
# GBRAIN_TEST_RECEIPT_DIR also write the verify receipt (X2): one JUnit
# testcase per check with its real outcome
#
@@ -227,19 +223,6 @@ fi
TIMEOUT="${GBRAIN_VERIFY_TIMEOUT:-120}"
-# macOS 26 validation (#6056): tsc output does not depend on the OS and
-# test.yml's Linux verify job gates typecheck on every PR and push, but a cold
-# tsc takes 110-142 s alone on the 3-core arm64 macOS runner, past the 120 s
-# cap. That workflow names the covering job here; typecheck is then recorded
-# as a skip (never a pass). Any other OS refuses it, so it cannot spread.
-TYPECHECK_COVERED_BY="${GBRAIN_VERIFY_TYPECHECK_COVERED_BY:-}"
-if [ -n "$TYPECHECK_COVERED_BY" ] && [ "$(uname -s)" != "Darwin" ]; then
- echo "ERROR: GBRAIN_VERIFY_TYPECHECK_COVERED_BY is honored on macOS only (this is $(uname -s)): typecheck must run here." >&2
- echo "Why: the skip exists because the macOS 26 runner cannot finish a cold tsc within the 120 s cap; other platforms can." >&2
- echo "Next: unset GBRAIN_VERIFY_TYPECHECK_COVERED_BY and re-run bun run verify. Docs: docs/operations/verify-and-nightly-e2e.md#macos-typecheck-skip" >&2
- exit 2
-fi
-
# Per-check temp dir. Each check gets its own subdir so writes can't race
# on shared scratch state (the checks themselves are read-only — they grep
# the working tree — but defense-in-depth.)
@@ -295,10 +278,7 @@ spawn_check() {
EXIT_FILE="$LOG_DIR/$safe.exit"
(
started=$(date +%s)
- if [ "$c" = "typecheck" ] && [ -n "$TYPECHECK_COVERED_BY" ]; then
- echo "GBRAIN_CHECK_SKIPPED: typecheck covered by $TYPECHECK_COVERED_BY (tsc output is OS-independent; a cold tsc exceeds the 120 s cap on this macOS runner)" > "$LOG_FILE"
- rc=0
- elif [ -n "$TIMEOUT_BIN" ]; then
+ if [ -n "$TIMEOUT_BIN" ]; then
"$TIMEOUT_BIN" "${TIMEOUT}s" bun run "$c" > "$LOG_FILE" 2>&1
rc=$?
else
diff --git a/test/scripts/run-verify-parallel.test.ts b/test/scripts/run-verify-parallel.test.ts
index 274aa95fb1..be67c6bbba 100644
--- a/test/scripts/run-verify-parallel.test.ts
+++ b/test/scripts/run-verify-parallel.test.ts
@@ -386,56 +386,24 @@ exit 0
}
}, 60_000);
- it("GBRAIN_VERIFY_TYPECHECK_COVERED_BY skips typecheck on macOS only, as a skip naming the covering job (#6056)", () => {
- const { root, env } = makeFallbackHarness();
- const unameDir = join(root, "uname-bin");
- mkdirSync(unameDir);
- const run = (os: string, extra: Record<string, string>) => {
- writeFileSync(join(unameDir, "uname"), `#!/usr/bin/env bash\necho ${os}\n`, { mode: 0o755 });
- return spawnSync("bash", [join(root, "scripts", "run-verify-parallel.sh")], {
- encoding: "utf8",
- env: { ...env, PATH: `${unameDir}:${env.PATH}`, ...extra },
- });
- };
- const covered = { GBRAIN_VERIFY_TYPECHECK_COVERED_BY: "test.yml verify job (Linux, every PR and push)" };
- try {
- const summary = join(root, "summary.md");
- const mac = run("Darwin", { ...covered, GITHUB_STEP_SUMMARY: summary });
- expect(mac.status, mac.stderr).toBe(0);
- expect(mac.stderr).toMatch(/fail=0 skip=1\b/);
- const outcomes = readFileSync(join(root, "logs", "outcomes.tsv"), "utf8");
- expect(outcomes).toMatch(/^typecheck\tskip\t0\ttypecheck covered by test\.yml verify job \(Linux, every PR and push\)/m);
- expect(readFileSync(join(root, "logs", "typecheck.log"), "utf8")).not.toContain("stub check OK");
- expect(readFileSync(summary, "utf8")).toContain("- typecheck: typecheck covered by test.yml verify job");
- for (const os of ["Linux", "MINGW64_NT-10.0", "FreeBSD"]) {
- const other = run(os, covered);
- expect(other.status).toBe(2);
- expect(other.stderr).toContain("honored on macOS only");
- expect(other.stderr).toContain("Next: unset GBRAIN_VERIFY_TYPECHECK_COVERED_BY");
- }
- const plain = run("Darwin", {});
- expect(plain.status).toBe(0);
- expect(readFileSync(join(root, "logs", "outcomes.tsv"), "utf8")).toMatch(/^typecheck\tpass\t0\t/m);
- } finally {
- rmSync(root, { recursive: true, force: true });
- }
- }, 60_000);
-
- it("only the macOS 26 workflow sets the typecheck skip, and test.yml's verify job still runs typecheck", () => {
+ it("typecheck runs on every platform: only the macOS 26 workflow raises the per-check cap, Linux keeps 120 s (#6056)", () => {
const workflows = readdirSync(".github/workflows").filter((f) => /\.ya?ml$/.test(f));
- const setters = workflows.filter((f) => readFileSync(join(".github/workflows", f), "utf8").includes("GBRAIN_VERIFY_TYPECHECK_COVERED_BY"));
- expect(setters).toEqual(["macos-validation.yml"]);
- const mac = readFileSync(".github/workflows/macos-validation.yml", "utf8");
+ const read = (f: string) => readFileSync(join(".github/workflows", f), "utf8");
+ expect(workflows.filter((f) => read(f).includes("GBRAIN_VERIFY_TIMEOUT"))).toEqual(["macos-validation.yml"]);
+ const mac = read("macos-validation.yml");
expect(mac).toMatch(/^\s+runs-on: macos-26$/m);
- expect(mac).toContain("GBRAIN_VERIFY_TYPECHECK_COVERED_BY: test.yml verify job (Linux, every PR and push)");
- const testYml = readFileSync(".github/workflows/test.yml", "utf8");
+ expect(mac).toMatch(/^\s+GBRAIN_VERIFY_TIMEOUT: '240'$/m);
+ for (const f of workflows) expect(read(f)).not.toContain("TYPECHECK_COVERED_BY");
+ expect(readFileSync(SCRIPT, "utf8")).not.toContain("TYPECHECK_COVERED_BY");
+ expect(readFileSync(SCRIPT, "utf8")).toContain('TIMEOUT="${GBRAIN_VERIFY_TIMEOUT:-120}"');
+ const testYml = read("test.yml");
const verifyJob = testYml.slice(testYml.indexOf("\n verify:\n"), testYml.indexOf("\n verify:\n") + 4000);
expect(verifyJob).toContain("- run: bun run verify");
expect(verifyJob).toMatch(/runs-on: ubicloud-standard-\d+-ubuntu/);
const dry = spawnSync("bash", [SCRIPT, "--dry-list"], { encoding: "utf8" }).stdout.split("\n");
expect(dry).toContain("typecheck");
const pkgScripts = (JSON.parse(readFileSync("package.json", "utf8")) as { scripts: Record<string, string> }).scripts;
- for (const [name, cmd] of Object.entries(pkgScripts)) expect(`${name}: ${cmd}`).not.toContain("GBRAIN_VERIFY_TYPECHECK_COVERED_BY");
+ for (const [name, cmd] of Object.entries(pkgScripts)) expect(`${name}: ${cmd}`).not.toContain("GBRAIN_VERIFY_TIMEOUT");
});
it("one check failing → exit 1, sentinel records the check's own rc (7), not 143", () => {