Skip to content

Fix bin/ci's skipped signoff and native builds racing for Homebrew - #12

Merged
jeremy merged 3 commits into
mainfrom
ci-harness-fixes
Oct 24, 2026
Merged

jeremy merged 3 commits into
mainfrom
ci-harness-fixes

Conversation

@jeremy

@jeremy jeremy commented Oct 24, 2026

Copy link
Copy Markdown
Member

Three harness fixes found while running CI for #11.

bin/ci skipped the signoff on most green runs

It checks for gh-signoff with gh extension list | grep -q gh-signoff. grep -q exits at the first match, so gh dies writing the rest of its list (SIGPIPE, 141), and set -o pipefail reports the pipeline as failed. So bin/ci printed "gh signoff not installed", skipped the signoff, and still exited 0. With the extension installed, the check failed 4 of 5 times. It now uses plain grep to /dev/null, which reads to the end, and passes 10 of 10.

test/build's multiarch-builder check has the same shape. Its input is small enough that it hasn't misfired (10 of 10 before and after), but it's the same latent bug, so it gets the same fix.

Parallel native builds raced for Homebrew's lock

The definitions run brew install while ruby-build sources them, and every brew call auto-updates first. In a test/build native all run, 1.9.3, 2.3.3 and 2.3.8 died within 5 seconds on "Another brew update process is already running" and "Failed to upgrade Homebrew Portable Ruby!". They passed when run one at a time.

Native builds now install every formula the chosen definitions name (today automake and basecamp/dev/openssl@1.0) once, one at a time, before launching. The builds then run with HOMEBREW_NO_AUTO_UPDATE=1, so their own brew installs are no-ops on installed formulae.

Evidence:

  • Four concurrent brew install basecamp/dev/openssl@1.0, auto-update forced on: 3 printed the lock error. With auto-update off: none did.
  • What I couldn't reproduce: the fatal Portable Ruby failure. It needs a Portable Ruby upgrade to be pending, and none was.
  • test/build native all, with HOMEBREW_AUTO_UPDATE_SECS=1: 6 of 6 pass on this branch. main also passed 6 of 6 under the same setting, so that run doesn't prove the fix either.

.dockerignore

test/build builds its images from the repo root, and there was no .dockerignore. So .claude/ (agent worktrees, whole extra checkouts) and .git went to the builder on every image build. The images copy only what they build from.

Verified

bin/ci decided whether gh-signoff is installed with
`gh extension list | grep -q gh-signoff`. grep -q exits at its first
match, gh then dies writing the rest of its list (SIGPIPE, 141), and
pipefail reports the whole pipeline as failed. So a green full run
usually printed "gh signoff not installed", skipped the signoff, and
still exited 0: 4 of 5 checks failed here with the extension installed.
Plain grep to /dev/null reads to the end; 10 of 10 pass.

test/build's multiarch builder check has the same shape. Its input is
small enough that it hasn't misfired, but it's the same latent bug, so
it gets the same fix.
The definitions run `brew install` while ruby-build sources them, and
`test/build native all` sources several at once. Each brew call
auto-updates first, so they race for Homebrew's lock, and the losers die
within seconds on "Another `brew update` process is already running":
1.9.3, 2.3.3 and 2.3.8 failed that way in one run, before compiling
anything.

Before launching native builds, install every formula the chosen
definitions name, one at a time, then export HOMEBREW_NO_AUTO_UPDATE for
the builds. Their own `brew install`s are then no-ops on installed
formulae, which run concurrently without contending.
test/build builds its images from the repo root, which had no
.dockerignore, so agent worktrees under .claude/ (whole extra checkouts)
and .git were sent to the builder on every image build. The images copy
only what they build from, so neither belongs in the context.
Copilot AI balanced review requested due to automatic review settings October 24, 2026 19:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T19:41:32.336869Z acc038d PR opened
🔒 Security Review ✅ Completed 2026-10-24T19:43:21.516284Z acc038d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

Review of the changed hunks and relevant build context identified no unresolved correctness issues.

No open issues 🎉

What changed in this PR

This PR improves CI reliability by fixing extension detection, coordinating Homebrew setup before parallel native builds, and reducing Docker build context size.

Changes:

  • Replaces early-exiting grep -q checks to avoid false failures under pipefail.
  • Installs required Homebrew formulae sequentially before native builds and disables auto-update for those builds.
  • Excludes .claude and .git from Docker build contexts.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
test/​build Fixes builder detection and prepares Homebrew dependencies before parallel native builds.
bin/​ci Prevents installed signoff extensions from being incorrectly treated as missing.
.dockerignore Excludes agent worktrees and Git metadata from image build contexts.

Review effort: Balanced

@jeremy
jeremy merged commit 1efdb1d into main Oct 24, 2026
1 check passed
@jeremy
jeremy deleted the ci-harness-fixes branch October 24, 2026 20:06
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.

2 participants