Skip to content

ci: harden installer canary and add pre-merge Bash 3.2 gate - #575

Merged
jeremy merged 5 commits into
mainfrom
ci/installer-canary-hardening
Jul 27, 2026
Merged

ci: harden installer canary and add pre-merge Bash 3.2 gate#575
jeremy merged 5 commits into
mainfrom
ci/installer-canary-hardening

Conversation

@jeremy

@jeremy jeremy commented Jul 27, 2026

Copy link
Copy Markdown
Member

Follow-on to the #558/#568 installer incident and the #569 canary: the canary had no Windows coverage, no alerting, and pre-merge CI had no real Bash 3.2 coverage.

Canary (installer-smoke.yml)

  • Push paths now include scripts/install.ps1 — the raw URL serves main, so merge == deploy for the PowerShell installer too.
  • Windows job runs the README's documented irm | iex shape under both Windows PowerShell 5.1 (the stock interpreter, exercising install.ps1's 5.1-specific branches) and pwsh 7, in a fail-fast-off matrix. Fetch and execution both happen inside the matrix interpreter (GitHub Actions doesn't evaluate expressions in steps[*].shell, so a pwsh launcher invokes it explicitly). Writes are contained under a scratch USERPROFILE/BASECAMP_BIN_DIR in RUNNER_TEMP; ?sha= cache-busts the raw URL (it varies its cache key on unknown query params). No basecamp.com endpoint exists for install.ps1, so the raw URL is the documented shape.
  • Notify job: on any leg's failure, files or updates an "Installer canary failure" issue (exact-title dedupe, best-effort gh calls, ::error:: annotation — same idiom as release.yml's skills-sync alert). Skipped entirely on green runs.

Pre-merge (test.yml): installer-bash32

Plain steps on macos-latest, not bats — bats 1.11 execs env bash at every layer, so the interpreter isn't pinnable through it. Asserts /bin/bash is exactly 3.2, syntax-checks install.sh, then runs it piped with curl off PATH and asserts the guard's clean failure message with no unbound-variable errors (the #558 regression class). Path-filtered to scripts/install.sh, e2e/installer.bats, and test.yml itself, so the job proves itself on this PR. Skipped filters still report job success, so it's safe to mark as a required check later (branch-protection change, out of repo).

Verification

Branch dispatches run the branch's workflow file against the published main installer — that validates the Windows matrix and notify mechanics, which is the correct scope for a post-deploy canary (PR-head script changes are covered pre-merge by bats + the new 3.2 gate, and post-merge by the push-triggered canary).

  • Green baseline dispatch: all four legs pass, notify skipped — run 30305890057.
  • Notify drill: temporarily broken Linux assert → notify filed Installer canary failure #574 with per-leg results (closed as drill) — run 30306010077.
  • Post-revert dispatch: green again, notify skipped — run 30306162446.
  • bin/ci green (actionlint + zizmor included).

The workflow-level BASECAMP_NO_KEYRING stays in place for now: the published v0.7.2 binary probes the keyring eagerly on startup and would hang the macOS leg without it. The follow-up PR (lazy store construction + installer belts) removes it.

Refs #558 #568 #569


Summary by cubic

Hardens the installer canary with Windows coverage and alerting, and adds a pre-merge Bash 3.2 gate with a full offline install to catch regressions early.

  • New Features

    • Canary: trigger on scripts/install.ps1.
    • Canary: Windows matrix (PowerShell 5.1 and pwsh 7) running the documented irm | iex, with isolated HOME/bin and ?sha= cache-busting.
    • Canary: notify job files/updates an "Installer canary failure" issue on any leg failure; skipped on green.
    • Pre-merge: installer-bash32 (PRs only, path-filtered) on macos-latest.
    • Pre-merge: assert /bin/bash is 3.2, bash -n on install.sh, piped run fails cleanly without curl (no unbound vars).
    • Pre-merge: full offline install under Bash 3.2 using a fixture curl and local release + checksums; assert expected output and that the installed stub runs.
  • Bug Fixes

    • Permissions: grant pull-requests: read so dorny/paths-filter can enumerate changed files.

Written for commit 2421186. Summary will update on new commits.

Review in cubic

jeremy added 3 commits July 27, 2026 14:12
Canary (installer-smoke.yml):
- Trigger on scripts/install.ps1 pushes too — the raw URL serves main, so
  merge == deploy for the PowerShell installer as well.
- New Windows job running the documented irm | iex shape under both
  Windows PowerShell 5.1 and pwsh 7 (matrix), against scratch
  USERPROFILE/BASECAMP_BIN_DIR under RUNNER_TEMP.
- New notify job: on any leg's failure, file or update an
  "Installer canary failure" issue (exact-title dedupe, best-effort gh
  calls, ::error:: annotation). Skipped entirely on green runs.

Pre-merge (test.yml): new installer-bash32 job on macos-latest — plain
steps, not bats (bats 1.11 execs `env bash` at every layer, so the
interpreter is not pinnable through it). Asserts /bin/bash is exactly
3.2, syntax-checks install.sh, and runs it piped with curl off PATH,
asserting the guard's clean failure message and the absence of
unbound-variable errors (the #558 regression class). Path-filtered to
installer files plus test.yml itself so the job proves itself on the PR
that introduces or edits it; skipped filters still report success, so
the job is safe to mark required.

Refs #558 #568 #569
Copilot AI review requested due to automatic review settings July 27, 2026 21:18
@github-actions github-actions Bot added the ci CI/CD workflows label Jul 27, 2026
@github-actions

Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/installer-smoke.yml
  • .github/workflows/test.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 27, 2026

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.

Pull request overview

This PR hardens the post-deploy installer canary by adding Windows coverage plus failure alerting, and adds a pre-merge “real Bash 3.2” CI gate to prevent scripts/install.sh regressions that only reproduce under macOS’s stock /bin/bash.

Changes:

  • Add installer-bash32 job to PR CI to run install.sh under macOS /bin/bash (3.2) with syntax-checking and a piped execution regression assertion.
  • Expand the installer smoke canary triggers to include scripts/install.ps1 and add a Windows matrix job exercising the documented irm | iex install shape in both Windows PowerShell 5.1 and PowerShell 7.
  • Add a notify-on-failure job that files or updates a deduped “Installer canary failure” issue with per-leg results.

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.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/test.yml Adds a PR-only macOS Bash 3.2 gate to catch installer regressions in the documented curl … | bash path.
.github/workflows/installer-smoke.yml Extends the post-deploy installer canary with Windows coverage, path triggers for install.ps1, and failure alerting via a deduped GitHub issue.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc68c3db5a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/test.yml

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

The piped-execution step stops at the curl prerequisite, and `bash -n`
only checks grammar — neither catches Bash-4-only constructs in the
download, checksum, extract, or post-install code. Add a step that runs
one complete install path under real /bin/bash 3.2 using a fixture curl
serving a local release (stub binary, real sha256 checksums) with PATH
restricted to fixture + system dirs, then asserts the installed stub
runs. Review feedback on #575.
Copilot AI review requested due to automatic review settings July 27, 2026 21:50

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d390d7d95

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/test.yml

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

dorny/paths-filter enumerates changed PR files via the REST API and
documents a pull-requests: read requirement; the job-level permissions
block zeroes everything unlisted. Review feedback on #575.
Copilot AI review requested due to automatic review settings July 27, 2026 22:06

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@jeremy
jeremy merged commit 48f4e58 into main Jul 27, 2026
28 checks passed
@jeremy
jeremy deleted the ci/installer-canary-hardening branch July 27, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants