Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
verify: macOS 26 records typecheck as a skip covered by test.yml's verify job (#6056)
garrytand559a27633d0
diff --git a/.github/workflows/macos-validation.yml b/.github/workflows/macos-validation.ymlindex 391367880f..ff36c6484e 100644--- a/.github/workflows/macos-validation.yml+++ b/.github/workflows/macos-validation.yml@@ -16,7 +16,8 @@ name: macOS 26 validation# #5286 the published signed darwin-arm64 release binary: codesign --verify# --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.+# `bun run verify` passes with `bash` resolving to /bin/bash+# (typecheck recorded as a skip, covered by test.yml's verify job).on:schedule:@@ -90,6 +91,11 @@ jobs:env:GBRAIN_BASH32: /bin/bashGBRAIN_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)# 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.mdindex 1c1373e1bb..086a716c9b 100644--- a/docs/operations/verify-and-nightly-e2e.md+++ b/docs/operations/verify-and-nightly-e2e.md@@ -36,6 +36,20 @@ about 3.7 GB with ceilings of 3,800, 4,096 or 6,144 MB, and wall time is thesame. If tsc reaches the ceiling, find what grew the program (the`Files`/`Memory used` lines of `--extendedDiagnostics`) before raising it.+## macOS typecheck skip++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+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.+## Full-corpus report states`coverage-full-report` in `.github/workflows/e2e.yml` first runs@@ -59,4 +73,5 @@ does, so a push to master does not cancel the nightly full corpus.## Changelog- 2026-10-05: created (green master wave, lane C): solo verify phase,- typecheck heap ceiling, full-corpus shard classification (#6040, #6056).+ typecheck heap ceiling, full-corpus shard classification, macOS typecheck+ skip (#6040, #6056).diff --git a/scripts/run-verify-parallel.sh b/scripts/run-verify-parallel.shindex f54bacb7bb..f369dd58f4 100755--- a/scripts/run-verify-parallel.sh+++ b/scripts/run-verify-parallel.sh@@ -20,6 +20,10 @@# 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#@@ -223,6 +227,19 @@ fiTIMEOUT="${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.)@@ -278,7 +295,10 @@ spawn_check() {EXIT_FILE="$LOG_DIR/$safe.exit"(started=$(date +%s)- if [ -n "$TIMEOUT_BIN" ]; then+ 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"$TIMEOUT_BIN" "${TIMEOUT}s" bun run "$c" > "$LOG_FILE" 2>&1rc=$?else@@ -405,6 +425,13 @@ if [ -n "$SKIP_REPORT" ]; thenecho "[verify-parallel] $SKIP check(s) self-skipped (recorded as skip, not pass):"printf '%s' "$SKIP_REPORT"} >&2+ if [ -n "${GITHUB_STEP_SUMMARY:-}" ]; then+ {+ echo "### bun run verify: $SKIP check(s) skipped (not passed)"+ echo+ printf '%s' "$SKIP_REPORT" | sed 's/^ /- /'+ } >> "$GITHUB_STEP_SUMMARY"+ fifireceipt_begin primary all "" "" "" verifydiff --git a/scripts/structural-suites.tsv b/scripts/structural-suites.tsvindex 79bd320951..fdf71e6c42 100644--- a/scripts/structural-suites.tsv+++ b/scripts/structural-suites.tsv@@ -283,6 +283,7 @@ test/scripts/nightly-issue.test.ts nightly-watch incidents 9 readFileSynctest/scripts/postgres-lane-coverage.test.ts check-postgres-lane-coverage.ts 6 readFileSynctest/scripts/regen-all.test.ts regen:all 4 readFileSynctest/scripts/run-verify-parallel.test.ts guard registration ⇒ execution coverage 1 readFileSync+test/scripts/run-verify-parallel.test.ts run-verify-parallel.sh — no-timeout-binary fallback rc capture (regression) 8 readFileSynctest/scripts/serial-files.test.ts scripts/serial-files.tsv (serial lane manifest) 5 readFileSynctest/scripts/test-env-opt-ins-guard.test.ts check-test-env-opt-ins 2 readFileSynctest/scripts/test-shard.slow.test.ts test-shard.sh — LPT balance contract 5 readFileSyncdiff --git a/test/scripts/run-verify-parallel.test.ts b/test/scripts/run-verify-parallel.test.tsindex 390653d604..274aa95fb1 100644--- a/test/scripts/run-verify-parallel.test.ts+++ b/test/scripts/run-verify-parallel.test.ts@@ -257,7 +257,7 @@ describe("run-verify-parallel.sh — no-timeout-binary fallback rc capture (regrconst bin = join(root, "bin");mkdirSync(bin);// Everything the dispatcher and its subshells invoke, minus timeout bins.- for (const tool of ["bash", "sh", "env", "dirname", "mktemp", "date", "sleep", "cat", "tail", "head", "rm", "mkdir", "pkill", "grep", "sed", "awk", "wc", "tr"]) {+ for (const tool of ["bash", "sh", "env", "dirname", "mktemp", "date", "sleep", "cat", "tail", "head", "rm", "mkdir", "pkill", "grep", "sed", "awk", "wc", "tr", "sort"]) {const p = Bun.which(tool);if (p) symlinkSync(p, join(bin, tool));}@@ -386,6 +386,58 @@ 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", () => {+ 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");+ 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");+ 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");+ });+it("one check failing → exit 1, sentinel records the check's own rc (7), not 143", () => {const { root, env } = makeFallbackHarness();try {