Skip to content

ci: macOS helper matrix + pinned shellcheck - #283

Merged
acburdine merged 3 commits into
nextfrom
claude/s2b-ci-macos
Sep 14, 2026
Merged

acburdine merged 3 commits into
nextfrom
claude/s2b-ci-macos

Conversation

@acburdine

@acburdine acburdine commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Stacked on S2 (#281). A focused CI/portability change kept out of S1/S2 so their diffs stay clean.

Why

The four portability bugs fixed across #280/#281 (BSD-vs-GNU stat, docker info exit code, shellcheck version skew, and now a bash-3.2 single-quote decode) were all invisible until CI ran on Linux — and one whole class (bash 3.2 + BSD userland) still had no coverage. macOS is a supported local-dev host (install.sh --local), so the shell helpers run there and must work.

What

  • test.yml — new macos-latest job. Runs the suite under /bin/bash (3.2) with the Docker CLI installed but no daemon. Daemon-backed tests (mode matrix, Caddy, ingress, installer e2e) skip themselves via dockerAvailable(); the config-parsing and unreachable-daemon tests still run and are meaningful. Production ingress stays a Linux concern.
  • helpers.mjs — honors GD_TEST_BASH; the macOS job sets it to /bin/bash so a newer bash on the runner can't hide a 3.2 incompatibility.
  • shellcheck.yml — pins shellcheck to 0.10.0 (installs the release) so CI and a developer's machine agree, instead of the runner's drifting apt version that disagreed with local 0.11 on SC2015/SC2002.

It earned its keep on the first run

Caught a real bash-3.2 bug it now guards:

  • env.sh — the single-quote \' decode ran inside the printf's double quotes, where bash 3.2 and 4+ parse the pattern backslashes differently, so a single-quoted value read back wrong on macOS. Moved the substitution to an unquoted assignment, which both agree on.

Verification

  • /bin/bash 3.2 + no daemon (the macOS-runner state): 109 pass, 0 fail
  • bash 5 + daemon: 234 pass, 0 fail
  • shellcheck clean under pinned 0.10.0 and local 0.11.0

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: bdf16530-e701-49ae-830c-47196109fa19

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@acburdine acburdine changed the title ci: macOS helper matrix + pinned shellcheck; fix env.sh single-quote decode on bash 3.2 ci: macOS helper matrix + pinned shellcheck Sep 3, 2026
@acburdine
acburdine marked this pull request as ready for review September 14, 2026 21:11
Base automatically changed from claude/s2-installer to next September 14, 2026 21:17
acburdine and others added 3 commits September 14, 2026 17:17
…decode on bash 3.2

macOS is a supported local-dev host (`install.sh --local`), so the shell helpers
run on its BSD userland and bash 3.2 — where a construct that passes on Linux or
a newer bash can break. Nothing exercised that until now.

- test.yml: add a macos-latest job running the suite under /bin/bash (3.2) with
  the Docker CLI but no daemon. Daemon-backed tests (mode matrix, Caddy, ingress,
  installer e2e) skip themselves via dockerAvailable(); the config-parsing and
  unreachable-daemon tests still run and are meaningful. Production ingress stays
  a Linux concern.
- helpers.mjs: honor GD_TEST_BASH so the suite can be pointed at a specific
  interpreter; the macOS job sets it to /bin/bash.
- shellcheck.yml: pin shellcheck to 0.10.0 (install the release) so CI and a
  developer's machine agree, instead of the runner's drifting apt version that
  disagreed with local on SC2015/SC2002.

The new job immediately caught a real bash-3.2 bug it now guards against:
- env.sh: the single-quote `\'` decode ran inside the printf's double quotes,
  where bash 3.2 and 4+ parse the pattern backslashes differently, so a
  single-quoted value read back wrong on macOS. Do the substitution in an
  unquoted assignment, which both agree on. Verified end to end under
  /bin/bash 3.2 (109 pass) and bash 5 (234 pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s the docker CLI

The macOS runner ships the Docker CLI (29.6.2) but no `docker compose` plugin,
and `brew install docker-compose` does not register it as a `docker compose`
subcommand, so the setup step failed on `docker compose version`. Install the
plugin binary into ~/.docker/cli-plugins directly (pinned, darwin-aarch64),
matching how the Linux job pins its Compose. No daemon involved — it is only
used to parse configuration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The prior "docker 29.6.2" came from the earlier `brew install docker`, not from
the runner: macOS runners have no Docker at all, so dropping the install left
`docker: command not found`. Restore `brew install docker` for the client
(no daemon) and keep the direct compose-plugin download, since Homebrew's
compose formula is not registered as a `docker compose` subcommand.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@acburdine
acburdine merged commit 29a344e into next Sep 14, 2026
6 checks passed
@acburdine
acburdine deleted the claude/s2b-ci-macos branch September 14, 2026 21:32
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