Skip to content

Fix the three macOS CI failures on main - #1

Merged
Portll merged 2 commits into
mainfrom
fix/ci-macos
Oct 10, 2026
Merged

Portll merged 2 commits into
mainfrom
fix/ci-macos

Conversation

@Portll

@Portll Portll commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Fixes the three macOS test failures in CI run 37767425796 on main (aa4ee769). Both macOS jobs (Node 22 and Node 24) failed on the same three tests. The Ubuntu and Windows jobs passed.

Failures and fixes

bin/test/build-health-parse.test.mjs: the two sh -c round-trip tests. The toolchain phase script wraps each phase in timeout, because it normally runs inside a Linux container. These two tests run it on the host's /bin/sh instead, and GitHub's macOS image has no timeout, so every phase exited 127. On a host without timeout, the tests now put a pass-through shim on PATH. Hosts that have timeout still use it.

monitor/test/package-inventory.test.mjs: "an unlocatable catalogue is UNKNOWN age". brewState() hard-coded /opt/homebrew/Library/Taps/homebrew/homebrew-core, and no override could move it. The macOS runner has that tap clone, so the test found a month-old catalogue where it expected none. The prefix is now resolved from CW_BREW_PREFIX (which monitor/update-vulns.mjs already reads), then HOMEBREW_PREFIX, then /opt/homebrew. The test points CW_BREW_PREFIX at a path that does not exist. docs/REFERENCE.md is regenerated, because CW_BREW_PREFIX now has a second reader.

Verification (macOS, Node 26)

  • With timeout removed from PATH (PATH=/usr/bin:/bin), the round-trip tests fail 2 on main and pass 33/33 on this branch.
  • CW_BREW_PREFIX pointing at a temporary tap directory gives catalogueAgeDays: 0. Pointing it at a missing path gives null and the UNKNOWN note.
  • node bin/reference.mjs --check exits 0.
  • The full npm test run had 6 failures across 7 files, none in a file this branch touches. Rerun alone on main and on this branch, those files gave identical results:
    • 4 passed on both.
    • 3 failed on both: get-focused-hook, history-guards D1 and brand-marks. Their results depend on the local checkout's branch layout and on a sibling site checkout.
  • This machine has no homebrew-core tap clone, so the original brew failure could not be reproduced locally. This PR's macOS CI jobs are the check for that fix.

The toolchain phase script runs inside a Linux container and wraps each
phase in timeout. Two tests run it on the host's /bin/sh, and GitHub's
macOS image has no timeout. Each phase exited 127 there. A host without
one now gets a pass-through shim on PATH, and a host with one still uses
it. With timeout off PATH the old test fails 2 and the new one passes 33
of 33.
The catalogue-age probe named /opt/homebrew/Library/Taps/homebrew/
homebrew-core outright. No override could move it, and GitHub's macOS
runner has that tap clone. "An unlocatable catalogue is UNKNOWN age"
found a month-old catalogue there and failed. The prefix now comes from
CW_BREW_PREFIX, which update-vulns already reads, then brew's own
HOMEBREW_PREFIX (an Intel Mac's /usr/local), then /opt/homebrew. The
test points it at a path that does not exist. docs/REFERENCE.md is
regenerated for the new reader.
@Portll
Portll merged commit a584e16 into main Oct 10, 2026
35 of 36 checks passed
@Portll
Portll deleted the fix/ci-macos branch October 10, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant